summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2021-08-09 07:19:03 +0000
committerJulien Lepiller <julien@lepiller.eu>2021-08-20 23:51:11 +0200
commit33a1ec29fa0ad72c61cef13c8af08c847eb399c1 (patch)
tree4797ea1b143dc49e50b23be970d1df32b5c6a8bb /guix
parent777ce1485749cc3dbe178fcc1e0654a7e74900c5 (diff)
downloadguix-patches-33a1ec29fa0ad72c61cef13c8af08c847eb399c1.tar
guix-patches-33a1ec29fa0ad72c61cef13c8af08c847eb399c1.tar.gz
guix: dune-build-system: Add a profile parameter.
* guix/build-system/dune.scm: Add a profile parameter. * guix/build/dune-build-system.scm (build): Use it. * doc/guix.texi: Document it. * gnu/packages/ocaml.scm: Remove profile being set from build flags. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/dune.scm3
-rw-r--r--guix/build/dune-build-system.scm8
2 files changed, 9 insertions, 2 deletions
diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 6a2f3d16de..1a64cf9b75 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -88,6 +89,7 @@
(out-of-source? #t)
(jbuild? #f)
(package #f)
+ (profile "release")
(tests? #t)
(test-flags ''())
(test-target "test")
@@ -127,6 +129,7 @@ provides a 'setup.ml' file as its build system."
#:out-of-source? ,out-of-source?
#:jbuild? ,jbuild?
#:package ,package
+ #:profile ,profile
#:tests? ,tests?
#:test-target ,test-target
#:install-target ,install-target
diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm
index 7e2ec1e3e1..6a0c2593ac 100644
--- a/guix/build/dune-build-system.scm
+++ b/guix/build/dune-build-system.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com>
+;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,11 +32,14 @@
;; Code:
(define* (build #:key (build-flags '()) (jbuild? #f)
- (use-make? #f) (package #f) #:allow-other-keys)
+ (use-make? #f) (package #f)
+ (profile "release") #:allow-other-keys)
"Build the given package."
(let ((program (if jbuild? "jbuilder" "dune")))
(apply invoke program "build" "@install"
- (append (if package (list "-p" package) '()) build-flags)))
+ (append (if package (list "-p" package) '())
+ `("--profile" ,profile)
+ build-flags)))
#t)
(define* (check #:key (test-flags '()) (test-target "test") tests?