| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 |
|
| 31 | (define-module (gnu packages books)
|
| 32 | #:use-module ((guix licenses) #:prefix license:)
|
| 33 | #:use-module (guix build-system asdf)
|
| 34 | #:use-module (guix build-system cmake)
|
| 35 | #:use-module (guix build-system copy)
|
| 36 | #:use-module (guix build-system emacs)
|
| 37 | #:use-module (guix build-system gnu)
|
| 38 | #:use-module (guix deprecation)
|
| 39 | #:use-module (guix download)
|
| 40 | #:use-module (guix gexp)
|
| 41 | #:use-module (guix git-download)
|
| 42 | #:use-module (guix packages)
|
| 43 | #:use-module (guix utils)
|
| 44 | #:use-module (gnu packages)
|
| 45 | #:use-module (gnu packages autotools)
|
| 46 | #:use-module (gnu packages base)
|
| 47 | #:use-module (gnu packages bash)
|
| 48 | #:use-module (gnu packages cpp)
|
| 49 | #:use-module (gnu packages compression)
|
| 50 | #:use-module (gnu packages curl)
|
| 51 | #:use-module (gnu packages emacs)
|
| 52 | #:use-module (gnu packages fonts)
|
| 53 | #:use-module (gnu packages fontutils)
|
| 54 | #:use-module (gnu packages freedesktop)
|
| 55 | #:use-module (gnu packages gettext)
|
| 56 | #:use-module (gnu packages glib)
|
| 57 | #:use-module (gnu packages gtk)
|
| 58 | #:use-module (gnu packages gnome)
|
| 59 | #:use-module (gnu packages inkscape)
|
| 60 | #:use-module (gnu packages icu4c)
|
| 61 | #:use-module (gnu packages linux)
|
| 62 | #:use-module (gnu packages lisp-xyz)
|
| 63 | #:use-module (gnu packages music)
|
| 64 | #:use-module (gnu packages perl)
|
| 65 | #:use-module (gnu packages pkg-config)
|
| 66 | #:use-module (gnu packages python)
|
| 67 | #:use-module (gnu packages python-build)
|
| 68 | #:use-module (gnu packages speech)
|
| 69 | #:use-module (gnu packages tex)
|
| 70 | #:use-module (gnu packages texinfo)
|
| 71 | #:use-module (gnu packages version-control)
|
| 72 | #:use-module (gnu packages webkit)
|
| 73 | #:use-module (gnu packages xml))
|
| 74 |
|
| 75 | (define-public book-faif
|
| 76 | (package
|
| 77 | (name "book-faif")
|
| 78 | (version "2.0")
|
| 79 | (source (origin
|
| 80 | (method url-fetch)
|
| 81 | (uri (string-append "https://www.fsf.org/faif/faif-" version
|
| 82 | ".tar.bz2"))
|
| 83 | (sha256
|
| 84 | (base32
|
| 85 | "0qf14d0n6k1dn9z0fdnx9qkhn4iq685xd443w7l7w54bm931p7dw"))))
|
| 86 | (build-system copy-build-system)
|
| 87 | (native-inputs
|
| 88 | (list (texlive-local-tree
|
| 89 | (list texlive-caption
|
| 90 | texlive-endnotes
|
| 91 | texlive-etoolbox
|
| 92 | texlive-fncychap
|
| 93 | texlive-helvetic
|
| 94 | texlive-times
|
| 95 | texlive-ucs))))
|
| 96 | (arguments
|
| 97 | (list
|
| 98 | #:install-plan #~'(("faif-2.0.pdf" "share/doc/faif/"))
|
| 99 | #:phases
|
| 100 | #~(modify-phases %standard-phases
|
| 101 | (add-after 'unpack 'writable-texmfvar
|
| 102 | |
| 103 | (lambda _ (setenv "TEXMFVAR" "/tmp")))
|
| 104 | (add-before 'install 'build
|
| 105 | (lambda _
|
| 106 | (invoke "pdflatex" "faif-2.0.tex"))))))
|
| 107 | (home-page "https://www.fsf.org/faif")
|
| 108 | (synopsis "Free as in Freedom (2.0)")
|
| 109 | (description
|
| 110 | "In 2002, Sam Williams wrote Free as in Freedom, a biography of Richard
|
| 111 | M. Stallman. In its epilogue, Williams expressed hope that choosing to
|
| 112 | distribute his book under the GNU Free Documentation License would enable and
|
| 113 | encourage others to share corrections and their own perspectives through
|
| 114 | modifications to his work. Free as in Freedom (2.0) is Stallman's revision of
|
| 115 | the original biography. While preserving Williams's viewpoint, it includes
|
| 116 | factual corrections and extensive new commentary by Stallman, as well as new
|
| 117 | prefaces by both authors written for the occasion. It is a rare kind of
|
| 118 | biography, where the reader has the benefit of both the biographer's original
|
| 119 | words and the subject's response.")
|
| 120 | (license license:fdl1.3+)))
|
| 121 |
|
| 122 | (define-public book-metaspec
|
| 123 | |
| 124 | (let ((commit "108544f2e5f483571522f9aa52e6097f47d0c0f1")
|
| 125 | (revision "0"))
|
| 126 | (package
|
| 127 | (name "book-metaspec")
|
| 128 | (version (git-version "1.0.0" revision commit))
|
| 129 | (source
|
| 130 | (origin
|
| 131 | (method git-fetch)
|
| 132 | (uri (git-reference
|
| 133 | (url "https://codeberg.org/dlowe/metaspectre")
|
| 134 | (commit commit)))
|
| 135 | (file-name (git-file-name name version))
|
| 136 | (sha256
|
| 137 | (base32 "131445qrxwfn7057p9jjg2lnpwyfj0n49cbcfws6jsd2lhv9fvbg"))))
|
| 138 | (build-system asdf-build-system/sbcl)
|
| 139 | (arguments
|
| 140 | (list
|
| 141 | #:tests? #f |
| 142 | |
| 143 | #:asd-systems ''("metaspectre")
|
| 144 | #:modules `((guix build emacs-utils)
|
| 145 | ,@%asdf-build-modules)
|
| 146 | #:imported-modules `((guix build emacs-utils)
|
| 147 | ,@%asdf-build-system-modules)
|
| 148 | #:phases
|
| 149 | #~(modify-phases %standard-phases
|
| 150 | |
| 151 | |
| 152 | |
| 153 | (add-after 'unpack 'set-version
|
| 154 | (lambda _
|
| 155 | (with-output-to-file "config.lisp-expr"
|
| 156 | (lambda _
|
| 157 | (format #t "~s"
|
| 158 | '(:version #$version
|
| 159 | |
| 160 | :origin "https://codeberg.org/dlowe/metaspectre"
|
| 161 | |
| 162 | :built "1970-01-01T00:00:00Z"))))))
|
| 163 | (add-after 'set-version 'fix-render-times
|
| 164 | (lambda _
|
| 165 | |
| 166 | |
| 167 | (substitute* "src/render.lisp"
|
| 168 | (("\\(\\*render-built\\*\\s+(\\(?[a-zA-Z0-9\\-]+\\)?)\\)")
|
| 169 | "(*render-built* \"1970-01-01T00:00:00Z\")"))
|
| 170 | |
| 171 | |
| 172 | |
| 173 | (substitute* "src/parser.lisp"
|
| 174 | ((":built \\(iso8601-utc\\)")
|
| 175 | ":built \"1970-01-01T00:00:00Z\""))))
|
| 176 | |
| 177 | |
| 178 | |
| 179 | (add-after 'build 'convert-to-sdoc
|
| 180 | (lambda _
|
| 181 | (lisp-eval-program
|
| 182 | `((require :asdf)
|
| 183 | (asdf:initialize-source-registry
|
| 184 | |
| 185 | |
| 186 | |
| 187 | (list :source-registry
|
| 188 | (list :tree (uiop:ensure-pathname ,(getcwd)
|
| 189 | :truenamize t
|
| 190 | :ensure-directory t))
|
| 191 | :inherit-configuration))
|
| 192 | (require :metaspectre)
|
| 193 | |
| 194 | |
| 195 | |
| 196 | (metaspectre::convert-whole-spec)))))
|
| 197 | (add-after 'convert-to-sdoc 'render-html
|
| 198 | (lambda _
|
| 199 | (lisp-eval-program
|
| 200 | `((require :asdf)
|
| 201 | (asdf:initialize-source-registry
|
| 202 | (list
|
| 203 | :source-registry
|
| 204 | (list :tree (uiop:ensure-pathname ,(getcwd)
|
| 205 | :truenamize t
|
| 206 | :ensure-directory t))
|
| 207 | :inherit-configuration))
|
| 208 | (require :metaspectre)
|
| 209 | (metaspectre::render-whole-spec)))))
|
| 210 | |
| 211 | |
| 212 | |
| 213 | (add-after 'render-html 'render-texinfo
|
| 214 | (lambda _
|
| 215 | (lisp-eval-program
|
| 216 | `((require :asdf)
|
| 217 | (asdf:initialize-source-registry
|
| 218 | (list
|
| 219 | :source-registry
|
| 220 | (list :tree (uiop:ensure-pathname ,(getcwd)
|
| 221 | :truenamize t
|
| 222 | :ensure-directory t))
|
| 223 | :inherit-configuration))
|
| 224 | (require :metaspectre)
|
| 225 | (metaspectre/texinfo::render-whole-spec)))
|
| 226 | (with-directory-excursion "out/texi"
|
| 227 | (invoke "makeinfo" "--no-split" "metaspec.texi"))))
|
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | (add-after 'render-texinfo 'install
|
| 233 | (lambda* (#:key name outputs #:allow-other-keys)
|
| 234 | (let* ((out (assoc-ref outputs "out"))
|
| 235 | (html (string-append out "/share/doc/" name))
|
| 236 | (info (string-append out "/share/info")))
|
| 237 | |
| 238 | |
| 239 | (copy-recursively "out/html" html)
|
| 240 | (install-file "out/texi/metaspec.info" info))))
|
| 241 | (add-after 'install 'install-emacs-files
|
| 242 | (lambda _
|
| 243 | (let ((lisp-dir
|
| 244 | (string-append #$output "/share/emacs/site-lisp")))
|
| 245 | (install-file "assets/metaspec.el" lisp-dir)
|
| 246 | (emacs-generate-autoloads #$name lisp-dir))))
|
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | (add-after 'cleanup 'remove-sbcl-files
|
| 252 | (lambda* (#:key outputs #:allow-other-keys)
|
| 253 | (let ((out (assoc-ref outputs "out")))
|
| 254 | (with-directory-excursion out
|
| 255 | (delete-file-recursively "etc")
|
| 256 | (delete-file-recursively "lib")
|
| 257 | (delete-file-recursively "share/common-lisp"))))))))
|
| 258 | (native-inputs
|
| 259 | (list cl-alexandria
|
| 260 | cl-ppcre
|
| 261 | cl-stencl
|
| 262 | emacs-minimal
|
| 263 | texinfo))
|
| 264 | (home-page "https://metaspec.dev/")
|
| 265 | (synopsis "Produce ANSI Common Lisp standard")
|
| 266 | (description
|
| 267 | "A parsed and rendered version of the draft ANSI standard for Common Lisp
|
| 268 | (dpANS3). Produces an HTML rendering with search features, an Info manual, and
|
| 269 | an Emacs package. The default HTML rendering is similar to the Common Lisp
|
| 270 | Hyperspec.")
|
| 271 | (license (list
|
| 272 | |
| 273 | license:expat
|
| 274 | |
| 275 | license:cc0
|
| 276 | |
| 277 | license:public-domain)))))
|
| 278 |
|
| 279 | (define-public book-sicp
|
| 280 | (let ((commit "bda03f79d6e2e8899ac2b5ca6a3732210e290a79")
|
| 281 | (revision "3"))
|
| 282 | (package
|
| 283 | (name "book-sicp")
|
| 284 | (version (git-version "20180718" revision commit))
|
| 285 | (source (origin
|
| 286 | (method git-fetch)
|
| 287 | (uri (git-reference
|
| 288 | (url "https://github.com/sarabander/sicp")
|
| 289 | (commit commit)))
|
| 290 | (sha256
|
| 291 | (base32
|
| 292 | "0mng7qrj2dvssyffr9ycnf4a5k0kadp4dslq7mc5bhzq1qxyjs2w"))
|
| 293 | (file-name (git-file-name name version))))
|
| 294 | (build-system copy-build-system)
|
| 295 | (native-inputs (list gzip texinfo))
|
| 296 | (arguments
|
| 297 | (list #:install-plan ''(("html" "share/doc/sicp/")
|
| 298 | ("sicp.info" "share/info/"))
|
| 299 | #:phases #~(modify-phases %standard-phases
|
| 300 | (add-after 'unpack 'remove-obsolete-commands
|
| 301 | (lambda _
|
| 302 | |
| 303 | |
| 304 | (substitute* "sicp-pocket.texi"
|
| 305 | (("@setshortcontentsaftertitlepage")
|
| 306 | ""))))
|
| 307 | (add-before 'install 'build
|
| 308 | (lambda _
|
| 309 | (invoke "makeinfo" "--no-split"
|
| 310 | "--output=sicp.info"
|
| 311 | "sicp-pocket.texi"))))))
|
| 312 | (home-page "https://sarabander.github.io/sicp")
|
| 313 | (synopsis "Structure and Interpretation of Computer Programs")
|
| 314 | (description "Structure and Interpretation of Computer Programs (SICP) is
|
| 315 | a textbook aiming to teach the principles of computer programming.
|
| 316 |
|
| 317 | Using Scheme, a dialect of the Lisp programming language, the book explains
|
| 318 | core computer science concepts such as abstraction in programming,
|
| 319 | metalinguistic abstraction, recursion, interpreters, and modular programming.")
|
| 320 | (license license:cc-by-sa4.0))))
|
| 321 |
|
| 322 | (define-public book-sparc
|
| 323 | (package
|
| 324 | (name "book-sparc")
|
| 325 | (version "6.0.0")
|
| 326 | (source (origin
|
| 327 | (method git-fetch)
|
| 328 | (uri (git-reference
|
| 329 | (url "https://github.com/artyom-poptsov/SPARC")
|
| 330 | (commit (string-append "v" version))))
|
| 331 | (sha256
|
| 332 | (base32
|
| 333 | "1lvaa4265ddbasf8kzk0s6m3ylsjm4ckgg0hk86fapvk2dfzdvgp"))
|
| 334 | (file-name (git-file-name name version))
|
| 335 | (modules '((guix build utils)))))
|
| 336 | (build-system gnu-build-system)
|
| 337 | (native-inputs
|
| 338 | (list autoconf
|
| 339 | automake
|
| 340 | bash-minimal
|
| 341 | fontconfig
|
| 342 | inkscape
|
| 343 | lilypond
|
| 344 | perl
|
| 345 | python-pygments
|
| 346 | (texlive-local-tree
|
| 347 | (list texlive-acronym
|
| 348 | texlive-adjustbox
|
| 349 | texlive-biblatex
|
| 350 | texlive-bibtex
|
| 351 | texlive-bibtexperllibs
|
| 352 | texlive-bigfoot
|
| 353 | texlive-chngcntr
|
| 354 | texlive-circuitikz
|
| 355 | texlive-collection-langcyrillic
|
| 356 | texlive-csquotes
|
| 357 | texlive-fancyvrb
|
| 358 | texlive-fontspec
|
| 359 | texlive-framed
|
| 360 | texlive-glossaries
|
| 361 | texlive-glossaries-english
|
| 362 | texlive-glossaries-extra
|
| 363 | texlive-imakeidx
|
| 364 | texlive-koma-script
|
| 365 | texlive-libkpathsea
|
| 366 | texlive-lilyglyphs
|
| 367 | texlive-lineno
|
| 368 | texlive-minted
|
| 369 | texlive-multirow
|
| 370 | texlive-pgf
|
| 371 | texlive-pgfplots
|
| 372 | texlive-subfiles
|
| 373 | texlive-svg
|
| 374 | texlive-t1utils
|
| 375 | texlive-textpos
|
| 376 | texlive-tikz-timing
|
| 377 | texlive-transparent
|
| 378 | texlive-trimspaces
|
| 379 | texlive-upquote
|
| 380 | texlive-xetex
|
| 381 | texlive-xstring))
|
| 382 | which))
|
| 383 | (inputs (list font-liberation git))
|
| 384 | (arguments
|
| 385 | (list #:tests? #f |
| 386 | #:modules (append %default-gnu-imported-modules
|
| 387 | '((ice-9 regex)
|
| 388 | (srfi srfi-1)))
|
| 389 | #:phases #~(modify-phases %standard-phases
|
| 390 | (add-before 'build 'configure-environment
|
| 391 | (lambda* (#:key inputs make-flags parallel-build?
|
| 392 | #:allow-other-keys)
|
| 393 | (let* ((src (assoc-ref inputs "source"))
|
| 394 | (rx (make-regexp "/gnu/store/(.*)-book-sparc-.*"))
|
| 395 | (src-hash (match:substring (regexp-exec rx src) 1))
|
| 396 | (random-seed
|
| 397 | (fold (lambda (ch prev)
|
| 398 | (+ (char->integer ch)
|
| 399 | prev))
|
| 400 | 0
|
| 401 | (string->list src-hash))))
|
| 402 | (setenv "RANDOMSEED" (number->string random-seed))
|
| 403 | (setenv "REPRODUCIBILITY" "yes"))))
|
| 404 | (replace 'install
|
| 405 | (lambda _
|
| 406 | (let ((doc-dir (string-append #$output
|
| 407 | "/share/doc/sparc/")))
|
| 408 | (mkdir-p doc-dir)
|
| 409 | (copy-file "sparc.ru.pdf"
|
| 410 | (string-append doc-dir
|
| 411 | "sparc.ru.pdf"))
|
| 412 | (copy-file "sparc.en.pdf"
|
| 413 | (string-append doc-dir
|
| 414 | "sparc.en.pdf"))))))))
|
| 415 | (home-page "https://github.com/artyom-poptsov/SPARC")
|
| 416 | (synopsis "Book on combining art and technology")
|
| 417 | (description
|
| 418 | "Science, Programming, Art and Radioelectronics Club (SPARC) is a book that
|
| 419 | explains how to combine the topics mentioned in the title to build projects. The
|
| 420 | book can be used to teach programming classes in colleges and to organize
|
| 421 | workshops in hackerspaces or other community-driven spaces. Currently the book
|
| 422 | is available in Russian and English.")
|
| 423 | (license license:cc-by-sa4.0)))
|
| 424 |
|
| 425 | (define-public sword
|
| 426 | (package
|
| 427 | (name "sword")
|
| 428 | (version "1.9.0")
|
| 429 | (source
|
| 430 | (origin
|
| 431 | (method url-fetch)
|
| 432 | (uri (string-append
|
| 433 | "https://www.crosswire.org/ftpmirror/pub/sword/source/v"
|
| 434 | (version-major+minor version) "/sword-" version ".tar.gz"))
|
| 435 | (sha256
|
| 436 | (base32 "12kb881w7p79is3ysy2w5bnzj8axfk05lb1ya8413brgvvrrqh22"))))
|
| 437 | (build-system cmake-build-system)
|
| 438 | (native-inputs (list curl icu4c-73 zlib))
|
| 439 | (arguments
|
| 440 | (list
|
| 441 | #:configure-flags
|
| 442 | #~(list "-DSWORD_BUILD_TESTS=Yes"
|
| 443 | "-DSWORD_USE_INTERNAL_ZLIB=No")))
|
| 444 | (home-page "https://www.crosswire.org/sword/")
|
| 445 | (synopsis "Cross-platform open source tools for writing Bible software")
|
| 446 | (description
|
| 447 | "The SWORD Project is a free Bible software project used to create Bible
|
| 448 | software, with support for multiple texts and languages.")
|
| 449 | (license license:gpl2+)))
|
| 450 |
|
| 451 | (define-public xiphos
|
| 452 | (package
|
| 453 | (name "xiphos")
|
| 454 | (version "4.4.0")
|
| 455 | (source
|
| 456 | (origin
|
| 457 | (method git-fetch)
|
| 458 | (uri (git-reference
|
| 459 | (url "https://github.com/crosswire/xiphos")
|
| 460 | (commit version)))
|
| 461 | (sha256
|
| 462 | (base32 "1xcbf5w09hiz50a981dsmnlyg0ag15w1isazcmqk3zd7hjay3ikj"))
|
| 463 | (file-name (git-file-name name version))))
|
| 464 | (build-system cmake-build-system)
|
| 465 | (native-inputs (list appstream
|
| 466 | appstream-glib
|
| 467 | at-spi2-core
|
| 468 | biblesync
|
| 469 | desktop-file-utils |
| 470 | (list glib "bin")
|
| 471 | gettext-minimal
|
| 472 | gsettings-desktop-schemas
|
| 473 | gtk+
|
| 474 | libgsf
|
| 475 | minizip
|
| 476 | pkg-config
|
| 477 | sword
|
| 478 | util-linux |
| 479 | (list util-linux "lib") |
| 480 | webkitgtk-for-gtk3
|
| 481 | yelp-tools
|
| 482 | zip))
|
| 483 | (inputs (list dbus dbus-glib libxml2 python python-lxml speech-dispatcher))
|
| 484 | (arguments
|
| 485 | (list
|
| 486 | #:tests? #f)) |
| 487 | (home-page "https://xiphos.org/")
|
| 488 | (synopsis "Open Source Bible Study Software")
|
| 489 | (description
|
| 490 | "Xiphos is a Bible study tool using GTK. It uses Sword to
|
| 491 | display bibles, commentaries, dictionaries, and other texts and images.
|
| 492 | Xiphos includes features such as searching, biblesync, bookmarks,
|
| 493 | parallel study, and original language study.")
|
| 494 | (license license:gpl2+)))
|
| 495 |
|
| 496 | (define-public book-emacs-lisp-elements
|
| 497 | (package
|
| 498 | (name "book-emacs-lisp-elements")
|
| 499 | (version "2.0.4")
|
| 500 | (source
|
| 501 | (origin
|
| 502 | (method git-fetch)
|
| 503 | (uri (git-reference
|
| 504 | (url "https://github.com/protesilaos/emacs-lisp-elements")
|
| 505 | (commit version)))
|
| 506 | (file-name (git-file-name name version))
|
| 507 | (sha256
|
| 508 | (base32 "06mhrb16h93n3s3srcfgmzsyh2lxx4ffj1di6qvczfg4039pi3c8"))))
|
| 509 | (build-system emacs-build-system)
|
| 510 | (arguments
|
| 511 | (list
|
| 512 | #:tests? #f |
| 513 | #:phases
|
| 514 | #~(modify-phases %standard-phases
|
| 515 | (add-before 'install 'makeinfo
|
| 516 | (lambda _
|
| 517 | (emacs-makeinfo "elispelem.org"))))))
|
| 518 | (native-inputs (list texinfo))
|
| 519 | (home-page "https://protesilaos.com/emacs/emacs-lisp-elements")
|
| 520 | (synopsis "Overview of the Emacs Lisp programming language")
|
| 521 | (description
|
| 522 | "Emacs Lisp Elements is a book written by Protesilaos Stavrou, providing
|
| 523 | a big picture view of the @acronym{Elisp, Emacs Lisp} programming language by
|
| 524 | combining prose with code. This book aims to provide an idea of how Elisp
|
| 525 | works by showing some of the main concepts and patterns encountered in
|
| 526 | everyday Elisp code.
|
| 527 |
|
| 528 | This book is not intended as a replacement for the built-in Emacs Lisp
|
| 529 | Reference Manual, but instead to give readers enough information to reason
|
| 530 | about Elisp code.")
|
| 531 | (license license:fdl1.3+)))
|