2023-08-31 13:11:29 -04:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2024-01-20 12:33:45 -05:00
|
|
|
;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
|
2023-08-31 13:11:29 -04:00
|
|
|
;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org>
|
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages books)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (guix build-system gnu)
|
2023-08-31 13:11:29 -04:00
|
|
|
#:use-module (guix download)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (guix gexp)
|
2023-08-31 13:11:29 -04:00
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module (guix packages)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (guix utils)
|
2023-08-31 13:11:29 -04:00
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages autotools)
|
|
|
|
#:use-module (gnu packages base)
|
|
|
|
#:use-module (gnu packages bash)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (gnu packages fonts)
|
|
|
|
#:use-module (gnu packages fontutils)
|
2023-08-31 13:11:29 -04:00
|
|
|
#:use-module (gnu packages inkscape)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (gnu packages music)
|
2023-08-31 13:11:29 -04:00
|
|
|
#:use-module (gnu packages perl)
|
|
|
|
#:use-module (gnu packages python-xyz)
|
|
|
|
#:use-module (gnu packages tex)
|
|
|
|
#:use-module (gnu packages texlive)
|
2024-01-25 16:31:18 -05:00
|
|
|
#:use-module (gnu packages version-control))
|
2023-08-31 13:11:29 -04:00
|
|
|
|
|
|
|
(define-public book-sparc
|
|
|
|
(package
|
|
|
|
(name "book-sparc")
|
2024-01-20 12:33:45 -05:00
|
|
|
(version "2.0.0")
|
2023-08-31 13:11:29 -04:00
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/artyom-poptsov/SPARC")
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2024-01-20 12:33:45 -05:00
|
|
|
"0bn3a3m0kcjybyaz1a7pj8n48jh1cg4szwi9px3zjhhm5818wi7z"))
|
2023-08-31 13:11:29 -04:00
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
(snippet
|
|
|
|
#~(begin
|
|
|
|
(substitute* "version.tex.in"
|
|
|
|
(("@COMMIT@") ""))
|
|
|
|
(substitute* "Makefile"
|
|
|
|
(("all: sparc.pdf") "all: install")
|
|
|
|
(("^sparc.pdf:") "install:")
|
|
|
|
(("(cp out/sparc.pdf) sparc.pdf" all cp)
|
|
|
|
(string-append
|
|
|
|
"mkdir -p $(DESTDIR)$(PREFIX)/share/doc/book-sparc"
|
|
|
|
" && " cp
|
|
|
|
" $(DESTDIR)$(PREFIX)/share/doc/book-sparc/sparc.pdf")))))))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(native-inputs
|
|
|
|
(list bash-minimal
|
|
|
|
fontconfig
|
|
|
|
inkscape
|
|
|
|
lilypond
|
|
|
|
perl
|
|
|
|
python-pygments
|
|
|
|
which))
|
|
|
|
(inputs
|
|
|
|
(list font-liberation
|
|
|
|
texlive-acronym
|
|
|
|
texlive-adjustbox
|
|
|
|
texlive-bibtex
|
|
|
|
texlive-bibtexperllibs
|
|
|
|
texlive-bigfoot
|
2024-01-25 16:31:18 -05:00
|
|
|
texlive-chngcntr
|
2023-08-31 13:11:29 -04:00
|
|
|
texlive-circuitikz
|
|
|
|
texlive-collection-langcyrillic
|
|
|
|
texlive-fontspec
|
|
|
|
texlive-glossaries
|
2023-11-22 15:13:18 -05:00
|
|
|
texlive-glossaries-english
|
2023-08-31 13:11:29 -04:00
|
|
|
texlive-glossaries-extra
|
|
|
|
texlive-koma-script
|
|
|
|
texlive-lilyglyphs
|
|
|
|
texlive-minted
|
|
|
|
texlive-multirow
|
|
|
|
texlive-pgf
|
|
|
|
texlive-pgfplots
|
|
|
|
texlive-subfiles
|
|
|
|
texlive-svg
|
|
|
|
texlive-t1utils
|
|
|
|
texlive-textpos
|
|
|
|
texlive-transparent
|
|
|
|
texlive-trimspaces
|
|
|
|
texlive-xetex))
|
|
|
|
(arguments
|
|
|
|
(list #:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(delete 'check)
|
|
|
|
(delete 'configure)
|
|
|
|
(add-before 'build 'set-envs
|
|
|
|
(lambda _
|
|
|
|
(setenv "REPRODUCIBILITY" "yes")
|
|
|
|
(setenv "PREFIX" #$output))))))
|
|
|
|
(home-page "https://github.com/artyom-poptsov/SPARC")
|
|
|
|
(synopsis "Book on combining art and technology")
|
|
|
|
(description
|
|
|
|
"Science, Programming, Art and Radioelectronics Club (SPARC) is a book that
|
|
|
|
explains how to combine the topics mentined in the title to build projects. The
|
|
|
|
book can be used to teach programming classes in colleges and to organize
|
|
|
|
workshops in hackerspaces or other community-driven spaces. Currently the book
|
|
|
|
is available only in Russian.")
|
|
|
|
(license license:cc-by-sa4.0)))
|