summaryrefslogtreecommitdiff
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
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>
-rw-r--r--doc/guix.texi7
-rw-r--r--gnu/packages/ocaml.scm17
-rw-r--r--guix/build-system/dune.scm3
-rw-r--r--guix/build/dune-build-system.scm8
4 files changed, 22 insertions, 13 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 241a1824ec..949d6d4092 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
Copyright @copyright{} 2021 Raghav Gururajan@*
Copyright @copyright{} 2021 Domagoj Stolfa@*
Copyright @copyright{} 2021 Hui Lu@*
+Copyright @copyright{} 2021 pukkamustard@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -7731,6 +7732,12 @@ The @code{#:package} parameter can be passed to specify a package name, which
is useful when a package contains multiple packages and you want to build
only one of them. This is equivalent to passing the @code{-p} argument to
@code{dune}.
+
+The @code{#:profile} parameter can be passed to specify the
+@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile,
+dune build profile}. This is equivalent to passing the @code{--profile}
+argument to @code{dune}. Its default value is @code{"release"}.
+
@end defvr
@defvr {Scheme Variable} go-build-system
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bdd52d2940..fee9e5e0ee 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2876,8 +2876,7 @@ without a complete in-memory representation of the data.")
"1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
(build-system dune-build-system)
(arguments
- `(#:test-target "tests"
- #:build-flags (list "--profile=release")))
+ `(#:test-target "tests"))
(propagated-inputs
`(("ocaml-cmdliner" ,ocaml-cmdliner)))
(home-page "https://www.typerex.org/ocp-indent.html")
@@ -3295,8 +3294,7 @@ build system and allows external tools to analyse your project easily.")
"1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f
- #:build-flags (list "--profile" "release")))
+ `(#:tests? #f))
(native-inputs
`(("ocamlbuild" ,ocamlbuild)))
(home-page "https://github.com/mjambon/cppo")
@@ -3364,8 +3362,7 @@ standard iterator type starting from 4.07.")
(base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f
- #:build-flags (list "--profile" "release")))
+ `(#:tests? #f))
(propagated-inputs
`(("ocaml-seq" ,ocaml-seq)))
(native-inputs
@@ -3842,9 +3839,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.")
"0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
(build-system dune-build-system)
(arguments
- `(#:build-flags (list "--profile" "release")
- #:test-target "camomile-test"
- #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
+ `(#:test-target "camomile-test"
+ #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
#:phases
(modify-phases %standard-phases
(add-before 'build 'fix-usr-share
@@ -3935,8 +3931,7 @@ connect an engine to your inputs and rendering functions to get an editor.")
(base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
(build-system dune-build-system)
(arguments
- `(#:build-flags (list "--profile" "release")
- #:tests? #f
+ `(#:tests? #f
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
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?