guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/06: gnu: sicp: Fix build.


From: guix-commits
Subject: 04/06: gnu: sicp: Fix build.
Date: Mon, 24 Apr 2023 23:49:37 -0400 (EDT)

apteryx pushed a commit to branch core-updates
in repository guix.

commit c9f82d57eb40d8ed4ca1c7ddf03d0f7284d7f9c2
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 24 20:58:37 2023 -0400

    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.
---
 gnu/packages/scheme.scm | 43 +++++++++++++++++++------------------------
 1 file changed, 19 insertions(+), 24 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]