diff options
author | Pjotr Prins | 2015-12-14 15:40:23 +0300 |
---|---|---|
committer | Pjotr Prins | 2015-12-14 15:40:23 +0300 |
commit | 439078423feb5bbba736b19bd07867dc108976b7 (patch) | |
tree | 01f1a48f1d6319da7ef0788a9089bf1a5d17f22e | |
parent | 665c341853c188828e006b0c3d32ba5543eff886 (diff) | |
download | guix-bioinformatics-439078423feb5bbba736b19bd07867dc108976b7.tar.gz |
Copy trivial build system
-rw-r--r-- | gn/packages/bioinformatics.scm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 6238dfb..f319532 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -38,5 +38,44 @@ #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages zip) + #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1)) +(define-public my-deploy + (package + (name "my-deploy") + (version "0.0.1") + (source #f) + (build-system trivial-build-system) + (arguments + `(#:guile ,%bootstrap-guile + #:modules ((guix build utils)) + #:builder + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (foo (string-append out "/foo"))) + (begin + (use-modules (guix build utils)) + (mkdir out) + (call-with-output-file foo + (lambda (p) + (format p + "#!~a~%echo \"${GUIX_FOO} ${GUIX_BAR}\"~%" + bash))) + (chmod foo #o777) + ;; wrap-program uses `which' to find bash for the wrapper + ;; shebang, but it can't know about the bootstrap bash in + ;; the store, since it's not named "bash". Help it out a + ;; bit by providing a symlink it this package's output. + (symlink bash (string-append out "/bash")) + (setenv "PATH" out) + (wrap-program foo `("GUIX_FOO" prefix ("hello"))) + (wrap-program foo `("GUIX_BAR" prefix ("world"))) + #t)))) + (inputs `(("bash" ,(search-bootstrap-binary "bash" + (%current-system))))) + + (home-page #f) + (synopsis #f) + (description #f) + (license #f))) |