summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.scm29
1 files changed, 27 insertions, 2 deletions
diff --git a/package.scm b/package.scm
index 2cb202f..c76a5db 100644
--- a/package.scm
+++ b/package.scm
@@ -23,15 +23,40 @@
(use-modules (guix packages)
(guix licenses)
(guix build-system gnu)
+ (guix build utils)
(gnu))
(use-package-modules autotools pkg-config guile gnupg xdisorg)
+(define %source-dir
+ (dirname (current-filename)))
+
(package
(name "shroud")
- (version "0.1")
- (source #f)
+ (version "git")
+ (source %source-dir)
(build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 popen)
+ (ice-9 rdelim))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-shroud
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (guile (assoc-ref inputs "guile"))
+ (effective (read-line
+ (open-pipe* OPEN_READ
+ (string-append guile "/bin/guile")
+ "-c" "(display (effective-version))")))
+ (ccachedir (string-append out
+ "/lib/guile/" effective "/site-ccache"))
+ (prog (string-append out "/bin/shroud")))
+ (wrap-program prog
+ `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
+ #t))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)