summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix.scm38
1 files changed, 37 insertions, 1 deletions
diff --git a/guix.scm b/guix.scm
index c019235..e90b835 100644
--- a/guix.scm
+++ b/guix.scm
@@ -2,6 +2,7 @@
(srfi srfi-1)
(guix build-system gnu)
(guix download)
+ (guix gexp)
(guix git-download)
((guix licenses) #:prefix license:)
(guix packages)
@@ -175,11 +176,46 @@ yet.")
(home-page "https://git.dthompson.us/starling.git")
(license license:gpl3+))))
+(define %source-dir (dirname (current-filename)))
+
(package
(name "spring-lisp-game-jam-2021")
(version "0.1")
- (source #f)
+ (source (local-file %source-dir
+ #:recursive? #t
+ #:select? (git-predicate %source-dir)))
(build-system gnu-build-system)
+ (arguments
+ `(#:modules (((guix build guile-build-system)
+ #:select (target-guile-effective-version))
+ (ice-9 match)
+ (ice-9 ftw)
+ ,@%gnu-build-system-modules)
+ #:imported-modules ((guix build guile-build-system) ,@%gnu-build-system-modules)
+ #:make-flags '("GUILE_AUTO_COMPILE=0")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (invoke "sh" "bootstrap")))
+ (add-after 'install 'wrap-script
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (version (target-guile-effective-version))
+ (scm (string-append out "/share/guile/site/" version))
+ (go (string-append out "/lib/guile/" version "/site-ccache"))
+ (guile (which "guile")))
+ (substitute* (string-append out "/bin/the-test-subject")
+ (("exec guile" cmd)
+ (string-append "export GUILE_LOAD_PATH=\""
+ scm ":"
+ (getenv "GUILE_LOAD_PATH")
+ "\"\n"
+ "export GUILE_LOAD_COMPILED_PATH=\""
+ go ":"
+ (getenv "GUILE_LOAD_COMPILED_PATH")
+ "\"\n"
+ "exec " guile)))))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)