;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages compression)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages tex)
#:use-module (gnu packages compression)
(define nanopass
(let ((version "1.9"))
(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/nanopass/nanopass-framework-scheme/archive"
- "/v" version ".tar.gz"))
- (sha256 (base32 "11pwyy4jiwhcl2am3a4ciczacjbjkyvdizqzdglb3l1hj2gj6nv2"))
- (file-name (string-append "nanopass-" version ".tar.gz")))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nanopass/nanopass-framework-scheme")
+ (commit (string-append "v" version))))
+ (sha256 (base32 "0lrngdna6w7v9vlp1a873hgwrwsz2p0pgkccswa4smzvdyhgfsri"))
+ (file-name (git-file-name "nanopass" version)))))
(define stex
(let ((version "1.2.1"))
(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/dybvig/stex/archive"
- "/v" version ".tar.gz"))
- (sha256 (base32 "03pl3f668h24dn51vccr1sj5lsba9zq3j37bnxjvdadcdaj4qy5z"))
- (file-name (string-append "stex-" version ".tar.gz")))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dybvig/stex")
+ (commit (string-append "v" version))))
+ (sha256 (base32 "1jiawhhqnsj42hzmlbq5xby3iarhf8vhiqs0kg1a0zg5jsn6cf8n"))
+ (file-name (git-file-name "stex" version)))))
(define-public chez-scheme
(package
(name "chez-scheme")
- (version "9.5")
+ (version "9.5.2")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://github.com/cisco/ChezScheme/archive/"
- "v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cisco/ChezScheme")
+ (commit (string-append "v" version))))
(sha256
- (base32 "135991hspq0grf26pvl2lkwhp92yz204h6rgiwyym0x6v0xzknd1"))
- (file-name (string-append "chez-scheme-" version ".tar.gz"))
- (modules '((guix build utils)))
- (snippet
- ;; Fix compilation with glibc >= 2.26, which removed xlocale.h.
- '(begin
- (substitute* "c/expeditor.c"
- (("xlocale\\.h") "locale.h"))
- #t))))
+ (base32 "1hagrqdp649n2g0wq2a9gfnz7mjcjakkw7ziplbj3db412bb7kx5"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(inputs
`(("ncurses" ,ncurses)
+ ("libuuid" ,util-linux "lib")
("libx11" ,libx11)
("xorg-rgb" ,xorg-rgb)
("nanopass" ,nanopass)
("zlib:static" ,zlib "static")
("stex" ,stex)))
(native-inputs
- `(("texlive" ,texlive)
+ `(("texlive" ,(texlive-union (list texlive-latex-oberdiek
+ texlive-generic-epsf)))
("ghostscript" ,ghostscript)
("netpbm" ,netpbm)))
(native-search-paths
(lambda _ (substitute* "configure"
(("uname -a") "uname -m"))
#t))
- (add-after 'unpack 'patch-broken-documentation
- (lambda _
- ;; Work around an oversight in the 9.5 release tarball that causes
- ;; building the documentation to fail. This should be fixed in the
- ;; next one; see <https://github.com/cisco/ChezScheme/issues/209>.
- (substitute* "csug/copyright.stex"
- (("\\\\INSERTREVISIONMONTHSPACEYEAR" )
- "October 2017")))) ; tarball release date
;; Adapt the custom 'configure' script.
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(apply unpack (list #:source src))
(apply patch-source-shebangs (list #:source src)))
(delete-file-recursively new-name)
- (system* "mv" orig-name new-name)))
- `((,nanopass "nanopass-framework-scheme-1.9" "nanopass")
- (,stex "stex-1.2.1" "stex")))
- ;; The Makefile wants to download and compile "zlib". We patch
- ;; it to use the one from our 'zlib' package.
+ (invoke "mv" orig-name new-name)))
+ `((,nanopass "source" "nanopass")
+ (,stex "source" "stex")))
+ ;; The configure step wants to CURL all submodules as it
+ ;; detects a checkout without submodules. Disable curling,
+ ;; and manually patch the needed modules for compilation.
(substitute* "configure"
- (("rmdir zlib .*$") "echo \"using system zlib\"\n"))
+ (("! -f '") "-d '")) ; working around CURL.
(substitute* (find-files "./c" "Mf-[a-zA-Z0-9.]+")
(("\\$\\{Kernel\\}: \\$\\{kernelobj\\} \\.\\./zlib/libz\\.a")
"${Kernel}: ${kernelobj}")
(("/bin/true") (which "true")))
(substitute* "stex/Makefile"
(("PREFIX=/usr") (string-append "PREFIX=" out)))
- (zero? (system* "./configure" "--threads"
- (string-append "--installprefix=" out))))))
+ (invoke "./configure" "--threads"
+ (string-append "--installprefix=" out)))))
;; Installation of the documentation requires a running "chez".
(add-after 'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
- (doc (string-append (assoc-ref outputs "doc")
+ (let ((doc (string-append (assoc-ref outputs "doc")
"/share/doc/" ,name "-" ,version)))
- (setenv "HOME" (getcwd))
- (setenv "PATH" (string-append (getenv "PATH") ":" bin))
- (with-directory-excursion "stex"
- (system* "make" (string-append "BIN=" bin)))
- (system* "make" "docs")
+ (invoke "make" "docs")
(with-directory-excursion "csug"
(substitute* "Makefile"
- (("/tmp/csug9") doc))
- (system* "make" "install")
+ ;; The ‘installdir=’ can't be overruled on the command line.
+ (("/tmp/csug9") doc)
+ ;; $m is the ‘machine type’, e.g. ‘ta6le’ on x86_64, but is
+ ;; set incorrectly for some reason, e.g. to ‘a6le’ on x86_64.
+ ;; Avoid the whole mess by running the (machine-independent)
+ ;; ‘installsh’ script at its original location.
+ (("\\$m/installsh") "makefiles/installsh"))
+ (invoke "make" "install")
(install-file "csug.pdf" doc))
(with-directory-excursion "release_notes"
(install-file "release_notes.pdf" doc))
;; Cross-compiling for the Raspberry Pi is supported, but not native ARM.
(supported-systems (fold delete %supported-systems
'("mips64el-linux" "armhf-linux")))
- (home-page "http://www.scheme.com")
+ (home-page "https://cisco.github.io/ChezScheme/")
(synopsis "R6RS Scheme compiler and run-time")
(description
"Chez Scheme is a compiler and run-time system for the language of the
(version "1.0")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/fedeinthemix/chez-srfi/archive"
- "/v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fedeinthemix/chez-srfi")
+ (commit (string-append "v" version))))
(sha256
- (base32 "17i4wly7bcr5kb5hf04ljpbvv4r5hsr9xsmw650fj43z9jr303gs"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (base32 "1vgn984mj2q4w6r2q66h7qklp2hrh85wwh4k9yisga5fi0ps7myf"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(native-inputs
`(("chez-scheme" ,chez-scheme)))
(arguments
`(#:make-flags (let ((out (assoc-ref %outputs "out")))
- (list (string-append "PREFIX=" out)))
+ (list (string-append "PREFIX=" out)
+ "CHEZ=chez-scheme --libdirs ./"
+ (string-append "chezversion=" ,(package-version chez-scheme))))
#:test-target "test"
#:phases (modify-phases %standard-phases
(delete 'configure))))
(revision "1"))
(package
(name "chez-web")
- ;; release 2.0 is different and doesn't work.
- (version (string-append "2.0-" revision "."
- (string-take commit 7)))
+ ;; Release 2.0 is different and doesn't work.
+ (version (git-version "2.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/arcfide/ChezWEB.git")
+ (url "https://github.com/arcfide/ChezWEB")
(commit commit)))
- (file-name (string-append name "-" version "-checkout"))
+ (file-name (git-file-name name version))
(sha256
(base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b"))))
(build-system gnu-build-system)
(native-inputs
`(("chez-scheme" ,chez-scheme)
- ("texlive" ,texlive)))
+ ("ghostscript" ,ghostscript)
+ ("texlive" ,(texlive-union (list texlive-latex-oberdiek
+ texlive-generic-epsf
+ texlive-metapost
+ texlive-fonts-charter
+ texlive-generic-pdftex
+ texlive-context-base
+ texlive-fonts-cm
+ texlive-tex-plain)))))
(arguments
`(#:make-flags (list (string-append "PREFIX=" %output)
(string-append "DOCDIR=" %output "/share/doc/"
#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _
+ ;; FIXME: texlive-union does not find the built
+ ;; metafonts, so it tries to generate them in HOME.
+ (setenv "HOME" "/tmp")
+ #t))
+ ;; This package has a custom "bootstrap" script that
+ ;; is meant to be run from the Makefile.
+ (delete 'bootstrap)
(replace 'configure
(lambda* _
(copy-file "config.mk.template" "config.mk")
(("\\./chezweave" all)
(string-append "chez-scheme --program " all)))
(substitute* "installit"
- (("-g \\$GROUP -o \\$OWNER") "")))))))
+ (("-g \\$GROUP -o \\$OWNER") ""))
+ #t)))))
(home-page "https://github.com/arcfide/ChezWEB")
(synopsis "Hygienic Literate Programming for Chez Scheme")
(description "ChezWEB is a system for doing Knuthian style WEB
(revision "1"))
(package
(name "chez-sockets")
- (version (string-append "0.0-" revision "."
- (string-take commit 7)))
+ (version (git-version "0.0.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/arcfide/chez-sockets.git")
+ (url "https://github.com/arcfide/chez-sockets")
(commit commit)))
- (file-name (string-append name "-" version "-checkout"))
+ (file-name (git-file-name name version))
(sha256
(base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m"))))
(build-system gnu-build-system)
(native-inputs
`(("chez-scheme" ,chez-scheme)
("chez-web" ,chez-web)
- ("texlive" ,texlive)))
+ ("texlive" ,(texlive-union (list texlive-generic-pdftex)))))
(arguments
`(#:tests? #f ; no tests
#:phases
(string-append var chez-h)))
#t)))
(add-before 'build 'tangle
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TEXINPUTS"
+ (string-append
+ (getcwd) ":"
+ (assoc-ref inputs "chez-web") "/share/texmf-local/tex/generic:"
+ ":"))
;; just using "make" tries to build the .c files before
;; they are created.
- (and (zero? (system* "make" "sockets"))
- (zero? (system* "make")))))
+ (and (invoke "make" "sockets")
+ (invoke "make"))))
(replace 'build
(lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
;; files.
(define (chez-make-flags name version)
`(let ((out (assoc-ref %outputs "out")))
- (list (string-append "PREFIX=" out)
- (string-append "DOCDIR=" out "/share/doc/"
- ,name "-" ,version))))
+ (list
+ ;; Set 'chezversion' so that libraries are installed in
+ ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects.
+ (string-append "chezversion=" ,(package-version chez-scheme))
+ (string-append "PREFIX=" out)
+ (string-append "DOCDIR=" out "/share/doc/"
+ ,name "-" ,version))))
(define-public chez-matchable
(package
(home-page "https://github.com/fedeinthemix/chez-matchable")
(source
(origin
- (method url-fetch)
- (uri (string-append home-page "/archive" "/v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
(sha256
- (base32 "0cl4vc6487pikjq159pj4n5ghyaax31nywb5n4yn1682h3ir1hs0"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (base32 "02qn7x348p23z1x5lwhkyj7i8z6mgwpzpnwr8dyina0yzsdkr71s"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(inputs
`(("chez-srfi" ,chez-srfi))) ; for tests
(version "0.9.4")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/fedeinthemix/chez-irregex/archive"
- "/v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fedeinthemix/chez-irregex")
+ (commit (string-append "v" version))))
(sha256
- (base32 "0ywy5syaw549a58viz68dmgnv756ic705rcnlqxgjq27lnaim53b"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (base32 "0jh6piylw545j81llay9wfivgpv6lcnwd81gm4w17lkasslir50q"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(inputs
`(("chez-matchable" ,chez-matchable))) ; for tests
(replace 'configure ,chez-configure)
(replace 'build
(lambda* (#:key (make-flags '()) #:allow-other-keys)
- (zero? (apply system* "make" "chez-build" make-flags))))
+ (apply invoke "make" "chez-build" make-flags)))
(replace 'install
(lambda* (#:key (make-flags '()) #:allow-other-keys)
- (zero? (apply system* "make" "chez-install" make-flags)))))))
+ (apply invoke "make" "chez-install" make-flags))))))
(home-page "http://synthcode.com/scheme/fmt")
(synopsis "Combinator formatting library for Chez Scheme")
(description "This package provides a library of procedures for
(home-page "https://github.com/fedeinthemix/chez-mit")
(source
(origin
- (method url-fetch)
- (uri (string-append home-page "/archive/v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
(sha256
- (base32 "1p11q061znwxzxrxg3vw4dbsnpv1dav12hjhnkrjnzyyjvvdm2kn"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (base32 "0c7i3b6i90xk96nmxn1pc9272a4yal4v40dm1a4ybdi87x53zkk0"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(inputs
- `(("chez-srfi" ,chez-srfi))) ; for tests
+ `(("chez-srfi" ,chez-srfi))) ; for tests
(native-inputs
`(("chez-scheme" ,chez-scheme)))
(arguments
(synopsis "MIT/GNU Scheme compatibility library for Chez Scheme")
(description "This package provides a set of MIT/GNU Scheme compatibility
libraries for Chez Scheme. The main goal was to provide the functionality
-required to port the program 'Scmutils' to Chez Scheme.")
+required to port the program @code{Scmutils} to Chez Scheme.")
(license gpl3+)))
(define-public chez-scmutils
(home-page "https://github.com/fedeinthemix/chez-scmutils")
(source
(origin
- (method url-fetch)
- (uri (string-append home-page "/archive/v" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
(sha256
- (base32 "1a5j61pggaiwl1gl6m038rcy5n8r2sj5nyjmz86jydx97mm5i8hj"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (base32 "0lb05wlf8qpgg8y0gdsyaxg1nbfx1qbaqdjvygrp64ndn8fnhq7l"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(inputs
- `(("chez-srfi" ,chez-srfi))) ; for tests
+ `(("chez-srfi" ,chez-srfi))) ; for tests
(native-inputs
`(("chez-scheme" ,chez-scheme)))
(propagated-inputs
("chez-srfi" ,chez-srfi)))
(arguments
`(#:make-flags ,(chez-make-flags name version)
- #:tests? #f ; no test suite
+ #:tests? #f ; no test suite
#:phases
(modify-phases %standard-phases
(replace 'configure ,chez-configure)
(delete 'build)
(add-after 'install 'install-src
(lambda* (#:key (make-flags '()) #:allow-other-keys)
- (zero? (apply system* "make" "install-src" make-flags))))
+ (apply invoke "make" "install-src" make-flags)))
(add-after 'install-src 'absolute-path-in-scm-files
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(let* ((out (assoc-ref outputs "out"))
(mk-file (car (find-files out "Makefile"))))
(with-directory-excursion (dirname mk-file)
- (zero? (apply system* "make" "build" make-flags))))))
+ (apply invoke "make" "build" make-flags)))))
(add-after 'build 'clean-up
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
(for-each delete-file
- (find-files out "Makefile|compile-all\\.ss"))))))))
+ (find-files out "Makefile|compile-all\\.ss"))
+ #t))))))
(synopsis "Port of MIT/GNU Scheme Scmutils to Chez Scheme")
(description "This package provides a port of the MIT/GNU Scheme
Scmutils program to Chez Scheme. The port consists of a set of