Archived
1
0
Fork 0

gnu: gerbil: Update to 0.18.1.

* gnu/packages/scheme.scm (gerbil): Update to 0.18.1.
[arguments]: Remove ‘chdir’ and ‘configure’ phases.  Add ‘set-cc’ phase.
Adjust ‘fix-gxi-shebangs’ phase.
[native-inputs]: Remove ‘coreutils’ and ‘gcc’.

Change-Id: I4248ae3d6df3beaf57b6036f5329374da79e26f1
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Skylar Hill 2024-03-23 19:50:40 -05:00 committed by Ludovic Courtès
parent 6b138626e4
commit 4b23fd7adb
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -23,6 +23,7 @@
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au> ;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
;;; Copyright © 2023 Juliana Sims <juli@incana.org> ;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -1117,95 +1118,72 @@ a Common Lisp environment.")
(define-public gerbil (define-public gerbil
(package (package
(name "gerbil") (name "gerbil")
(version "0.17.0") (version "0.18.1")
(source (origin (source
(method git-fetch) (origin
(uri (git-reference (method url-fetch)
(url "https://github.com/vyzo/gerbil") (uri (string-append
(commit (string-append "v" version)))) "https://github.com/mighty-gerbils/gerbil/releases/download/v"
(file-name (git-file-name name version)) version "/gerbil-v" version ".tar.gz"))
(sha256 (sha256
(base32 (base32 "1dff14bzqkq6scyyhnwhc3ky96j6lr84mnghk4da0x6vifw7p0p1"))))
"0c0nspm659ybgmqlppdv7sxzll4hwkvcp9qmcsip6d0kz0p8r9c3"))))
(arguments (arguments
(list #:phases (list
#~(modify-phases %standard-phases #:phases #~(modify-phases %standard-phases
(delete 'bootstrap) (delete 'bootstrap)
(add-before 'configure 'chdir (add-after 'set-paths 'set-cc
(lambda _
(chdir "src")))
(replace 'configure
(lambda _
(invoke "chmod" "755" "-R" ".")
;; Otherwise fails when editing an r--r--r-- file.
(invoke "gsi-script"
"configure"
"--prefix"
#$output
"--with-gambit"
#$gambit-c)))
(add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
(lambda _
;; Some .ss files refer to gxi using /usr/bin/env gxi
;; and 'patch-generated-file-shebangs can't fix that
;; because gxi has not been compiled yet.
;; We know where gxi is going to end up so we
;; Doctor Who our fix here before the problem
;; happens towards the end of the build.sh script.
(let ((abs-srcdir (getcwd)))
(for-each (lambda (f)
(substitute* f
(("#!/usr/bin/env gxi")
(string-append "#!" abs-srcdir
"/../bin/gxi"))))
'("./gerbil/gxc" "./lang/build.ss"
"./misc/http-perf/build.ss"
"./misc/rpc-perf/build.ss"
"./misc/scripts/docsnarf.ss"
"./misc/scripts/docstub.ss"
"./misc/scripts/docsyms.ss"
"./r7rs-large/build.ss"
"./release.ss"
"./std/build.ss"
"./std/run-tests.ss"
"./std/web/fastcgi-test.ss"
"./std/web/rack-test.ss"
"./tools/build.ss"
"./tutorial/httpd/build.ss"
"./tutorial/kvstore/build.ss"
"./tutorial/lang/build.ss"
"./tutorial/proxy/build-static.ss"
"./tutorial/proxy/build.ss")))))
(add-after 'configure 'create-gx-version.scm
(lambda _
(with-output-to-file (string-append (getcwd)
"/gerbil/runtime/gx-version.scm")
(lambda _ (lambda _
(write `(define (gerbil-version-string) (setenv "CC" #$(cc-for-target))))
,(string-append "v" (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
#$(version-major+minor (lambda _
version)))))))) ;; Some .ss files refer to gxi using /usr/bin/env gxi
(replace 'build ;; and 'patch-generated-file-shebangs can't fix that
(lambda _ ;; because gxi has not been compiled yet.
(setenv "HOME" ;; We know where gxi is going to end up so we
(getcwd)) ;; Doctor Who our fix here before the problem
(invoke ;; happens towards the end of the build.sh script.
;; The build script needs a tty or it'll crash on an ioctl (let ((abs-srcdir (getcwd)))
;; trying to find the width of the terminal it's running on. (for-each (lambda (f)
;; Calling in script prevents that. (substitute* f
"script" (("#!/usr/bin/env gxi")
"-qefc" (string-append "#!" abs-srcdir
"./build.sh"))) "/../bin/gxi"))))
(replace 'install '("./src/std/web/rack-test.ss"
(lambda _ "./src/std/web/fastcgi-test.ss"
(let* ((bin (string-append #$output "/bin")) "./src/std/build.ss"
(lib (string-append #$output "/lib"))) "./src/build/build-libgerbil.ss"
(mkdir-p bin) "./src/gerbil/test/test-build-static-exe.ss"
(mkdir-p lib) "./src/gerbil/test/test-build-optimized-static-exe.ss"
(copy-recursively "../bin" bin) "./src/gerbil/test/test-build-optimized-exe.ss"
(copy-recursively "../lib" lib))))) "./src/gerbil/test/test-build-exe.ss"
#:tests? #f)) "./src/srfi/build.ss"
(native-inputs (list coreutils gambit-c util-linux)) "./src/r7rs-large/build.ss"
"./src/misc/rpc-perf/build.ss"
"./src/misc/http-perf/build.ss"
"./src/misc/scripts/docsnarf.ss"
"./src/misc/scripts/docstub.ss"
"./src/misc/scripts/docsyms.ss"
"./src/tools/gxpkg.ss"
"./src/tools/build.ss"
"./src/lang/build.ss"
"./src/tutorial/kvstore/build.ss"
"./src/tutorial/httpd/build.ss"
"./src/tutorial/proxy/build.ss"
"./src/tutorial/ensemble/build.ss"
"./src/tutorial/lang/build.ss")))))
(replace 'build
(lambda _
(setenv "HOME"
(getcwd))
(invoke
;; The build script needs a tty or it'll crash on an ioctl
;; trying to find the width of the terminal it's running on.
;; Calling in script prevents that.
"script"
"-qefc"
"./build.sh"))))
#:tests? #f))
(native-inputs (list gambit-c util-linux))
(propagated-inputs (list gambit-c openssl sqlite zlib)) (propagated-inputs (list gambit-c openssl sqlite zlib))
(build-system gnu-build-system) (build-system gnu-build-system)
(synopsis "Meta-dialect of Scheme with post-modern features") (synopsis "Meta-dialect of Scheme with post-modern features")