diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-04-01 00:02:39 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-04-01 00:02:39 +0200 |
commit | 571fb008a576378883c053be186d2c620290ea39 (patch) | |
tree | 5279a2c2772a9b76299a48d697d568f208a89722 /guix/build | |
parent | 7c86fdda7ceed11377b0e17b47c91598be59be52 (diff) | |
parent | f125c5a5ea03d53749f45d310694b79241d5888d (diff) | |
download | gnu-guix-571fb008a576378883c053be186d2c620290ea39.tar gnu-guix-571fb008a576378883c053be186d2c620290ea39.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'guix/build')
-rw-r--r-- | guix/build/dune-build-system.scm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 00b0c7c406..7e2ec1e3e1 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -31,27 +31,30 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) #:allow-other-keys) + (use-make? #f) (package #f) #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) - (apply invoke program "build" "@install" build-flags)) + (apply invoke program "build" "@install" + (append (if package (list "-p" package) '()) build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? - (jbuild? #f) #:allow-other-keys) + (jbuild? #f) (package #f) #:allow-other-keys) "Test the given package." (when tests? (let ((program (if jbuild? "jbuilder" "dune"))) - (apply invoke program "runtest" test-target test-flags))) + (apply invoke program "runtest" test-target + (append (if package (list "-p" package) '()) test-flags)))) #t) (define* (install #:key outputs (install-target "install") (jbuild? #f) - #:allow-other-keys) + (package #f) #:allow-other-keys) "Install the given package." (let ((out (assoc-ref outputs "out")) (program (if jbuild? "jbuilder" "dune"))) - (invoke program install-target "--prefix" out "--libdir" - (string-append out "/lib/ocaml/site-lib"))) + (apply invoke program install-target "--prefix" out "--libdir" + (string-append out "/lib/ocaml/site-lib") + (if package (list package) '()))) #t) (define %standard-phases |