diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2015-09-18 16:58:31 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-10-11 21:30:12 -0400 |
commit | 9d373377c96d9e83653f9edc04bbc8566a5174b6 (patch) | |
tree | 5e2d2c2f3a1e80628549b78bf43dd2aec8a71445 | |
parent | 7f39e181dfb34db8f245f3ffafe34eec9cee910d (diff) | |
download | patches-9d373377c96d9e83653f9edc04bbc8566a5174b6.tar patches-9d373377c96d9e83653f9edc04bbc8566a5174b6.tar.gz |
gnu: guile: Add guile-wisp.
* gnu/packages/guile.scm (guile-wisp): New variable.
-rw-r--r-- | gnu/packages/guile.scm | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index d5a95a0444..1b01c4d7ca 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -39,6 +39,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages gettext) #:use-module (gnu packages gdbm) + #:use-module (gnu packages python) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -600,4 +601,80 @@ interface for reading articles in any format.") key-value cache and store.") (license lgpl3+))) +(define-public guile-wisp + (package + (name "guile-wisp") + (version "0.9.0") + (source (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/ArneBab/" + "wisp/downloads/wisp-" + version ".tar.gz")) + (sha256 + (base32 + "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((system base compile) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'substitute-before-config + + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (assoc-ref inputs "bash"))) + ;; configure checks for guile-2.0, but ours is just named "guile" :) + (substitute* "configure" + (("guile-2.0") "guile")) + ;; Puts together some test files with /bin/bash hardcoded + (substitute* "Makefile.in" + (("/bin/bash") + (string-append bash "/bin/bash") )) + #t))) + + ;; auto compilation breaks, but if we set HOME to /tmp, + ;; that works ok + (add-before + 'check 'auto-compile-hacky-workaround + (lambda _ + (setenv "HOME" "/tmp") + #t)) + (replace + 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (module-dir (string-append out "/share/guile/site/2.0")) + (language-dir + (string-append module-dir "/language/wisp")) + (guild (string-append (assoc-ref inputs "guile") + "/bin/guild"))) + ;; Make installation directories. + (mkdir-p module-dir) + (mkdir-p language-dir) + + ;; copy the source + (copy-file "wisp-scheme.scm" + (string-append module-dir "/wisp-scheme.scm")) + (copy-file "language/wisp/spec.scm" + (string-append language-dir "/spec.scm")) + + ;; compile to the destination + (compile-file "wisp-scheme.scm" + #:output-file (string-append + module-dir "/wisp-scheme.go")) + (compile-file "language/wisp/spec.scm" + #:output-file (string-append + language-dir "/spec.go")) + #t)))))) + (home-page "http://draketo.de/english/wisp") + (inputs + `(("guile" ,guile-2.0) + ("python" ,python))) + (synopsis "wisp is a whitespace to lisp syntax for Guile") + (description "wisp is a syntax for Guile which provides a Python-like +whitespace-significant language. It may be easier on the eyes for some +users and in some situations.") + (license gpl3+))) + ;;; guile.scm ends here |