Archived
1
0
Fork 0

gnu: sicp: Fix build.

* gnu/packages/scheme.scm (sicp) [build-system]: Use copy-build-system.
[native-inputs]: Remove source input.
[arguments]: Remove #:modules and #:builder arguments.  Add #:install-plan and
 #:phases arguments.  Patch out obsolete call.
This commit is contained in:
Maxim Cournoyer 2023-04-24 20:58:37 -04:00
parent 941adac603
commit c9f82d57eb
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -22,6 +22,7 @@
;;; Copyright © 2022 Robby Zambito <contact@robbyzambito.me> ;;; Copyright © 2022 Robby Zambito <contact@robbyzambito.me>
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au> ;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
;;; Copyright © 2023 Juliana Sims <jtsims@protonmail.com> ;;; Copyright © 2023 Juliana Sims <jtsims@protonmail.com>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -49,6 +50,7 @@
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix build-system asdf) #:use-module (guix build-system asdf)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system trivial) #:use-module (guix build-system trivial)
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
@ -608,7 +610,7 @@ threads.")
(define-public sicp (define-public sicp
(let ((commit "bda03f79d6e2e8899ac2b5ca6a3732210e290a79") (let ((commit "bda03f79d6e2e8899ac2b5ca6a3732210e290a79")
(revision "2")) (revision "3"))
(package (package
(name "sicp") (name "sicp")
(version (git-version "20180718" revision commit)) (version (git-version "20180718" revision commit))
@ -621,30 +623,23 @@ threads.")
(base32 (base32
"0mng7qrj2dvssyffr9ycnf4a5k0kadp4dslq7mc5bhzq1qxyjs2w")) "0mng7qrj2dvssyffr9ycnf4a5k0kadp4dslq7mc5bhzq1qxyjs2w"))
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system trivial-build-system) (build-system copy-build-system)
(native-inputs `(("gzip" ,gzip) (native-inputs (list gzip texinfo))
("source" ,source)
("texinfo" ,texinfo)))
(arguments (arguments
`(#:modules ((guix build utils)) (list #:install-plan ''(("html" "share/doc/sicp/")
#:builder ("sicp.info" "share/info/"))
(begin #:phases #~(modify-phases %standard-phases
(use-modules (guix build utils) (add-after 'unpack 'remove-obsolete-commands
(srfi srfi-26)) (lambda _
(let ((gzip (assoc-ref %build-inputs "gzip")) ;; Reported upstream:
(source (assoc-ref %build-inputs "source")) ;; https://github.com/sarabander/sicp/issues/46.
(texinfo (assoc-ref %build-inputs "texinfo")) (substitute* "sicp-pocket.texi"
(html-dir (string-append %output "/share/doc/" ,name "/html")) (("@setshortcontentsaftertitlepage")
(info-dir (string-append %output "/share/info"))) ""))))
(copy-recursively (string-append source "/html") html-dir) (add-before 'install 'build
(setenv "PATH" (string-append gzip "/bin" (lambda _
":" texinfo "/bin")) (invoke "makeinfo" "--output=sicp.info"
(mkdir-p info-dir) "sicp-pocket.texi"))))))
(invoke "makeinfo" "--output"
(string-append info-dir "/sicp.info")
(string-append source "/sicp-pocket.texi"))
(for-each (cut invoke "gzip" "-9n" <>)
(find-files info-dir))))))
(home-page "https://sarabander.github.io/sicp") (home-page "https://sarabander.github.io/sicp")
(synopsis "Structure and Interpretation of Computer Programs") (synopsis "Structure and Interpretation of Computer Programs")
(description "Structure and Interpretation of Computer Programs (SICP) is (description "Structure and Interpretation of Computer Programs (SICP) is