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)
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 241a1824ec7..949d6d40926 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
94Copyright @copyright{} 2021 Raghav Gururajan@* 94Copyright @copyright{} 2021 Raghav Gururajan@*
95Copyright @copyright{} 2021 Domagoj Stolfa@* 95Copyright @copyright{} 2021 Domagoj Stolfa@*
96Copyright @copyright{} 2021 Hui Lu@* 96Copyright @copyright{} 2021 Hui Lu@*
97Copyright @copyright{} 2021 pukkamustard@*
97 98
98Permission is granted to copy, distribute and/or modify this document 99Permission is granted to copy, distribute and/or modify this document
99under the terms of the GNU Free Documentation License, Version 1.3 or 100under 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
7731is useful when a package contains multiple packages and you want to build 7732is useful when a package contains multiple packages and you want to build
7732only one of them. This is equivalent to passing the @code{-p} argument to 7733only one of them. This is equivalent to passing the @code{-p} argument to
7733@code{dune}. 7734@code{dune}.
7735
7736The @code{#:profile} parameter can be passed to specify the
7737@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile,
7738dune build profile}. This is equivalent to passing the @code{--profile}
7739argument to @code{dune}. Its default value is @code{"release"}.
7740
7734@end defvr 7741@end defvr
7735 7742
7736@defvr {Scheme Variable} go-build-system 7743@defvr {Scheme Variable} go-build-system
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bdd52d2940a..fee9e5e0ee7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2876,8 +2876,7 @@ without a complete in-memory representation of the data.")
2876 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3")))) 2876 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
2877 (build-system dune-build-system) 2877 (build-system dune-build-system)
2878 (arguments 2878 (arguments
2879 `(#:test-target "tests" 2879 `(#:test-target "tests"))
2880 #:build-flags (list "--profile=release")))
2881 (propagated-inputs 2880 (propagated-inputs
2882 `(("ocaml-cmdliner" ,ocaml-cmdliner))) 2881 `(("ocaml-cmdliner" ,ocaml-cmdliner)))
2883 (home-page "https://www.typerex.org/ocp-indent.html") 2882 (home-page "https://www.typerex.org/ocp-indent.html")
@@ -3295,8 +3294,7 @@ build system and allows external tools to analyse your project easily.")
3295 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs")))) 3294 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
3296 (build-system dune-build-system) 3295 (build-system dune-build-system)
3297 (arguments 3296 (arguments
3298 `(#:tests? #f 3297 `(#:tests? #f))
3299 #:build-flags (list "--profile" "release")))
3300 (native-inputs 3298 (native-inputs
3301 `(("ocamlbuild" ,ocamlbuild))) 3299 `(("ocamlbuild" ,ocamlbuild)))
3302 (home-page "https://github.com/mjambon/cppo") 3300 (home-page "https://github.com/mjambon/cppo")
@@ -3364,8 +3362,7 @@ standard iterator type starting from 4.07.")
3364 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss")))) 3362 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
3365 (build-system dune-build-system) 3363 (build-system dune-build-system)
3366 (arguments 3364 (arguments
3367 `(#:tests? #f 3365 `(#:tests? #f))
3368 #:build-flags (list "--profile" "release")))
3369 (propagated-inputs 3366 (propagated-inputs
3370 `(("ocaml-seq" ,ocaml-seq))) 3367 `(("ocaml-seq" ,ocaml-seq)))
3371 (native-inputs 3368 (native-inputs
@@ -3842,9 +3839,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.")
3842 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h")))) 3839 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
3843 (build-system dune-build-system) 3840 (build-system dune-build-system)
3844 (arguments 3841 (arguments
3845 `(#:build-flags (list "--profile" "release") 3842 `(#:test-target "camomile-test"
3846 #:test-target "camomile-test" 3843 #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
3847 #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
3848 #:phases 3844 #:phases
3849 (modify-phases %standard-phases 3845 (modify-phases %standard-phases
3850 (add-before 'build 'fix-usr-share 3846 (add-before 'build 'fix-usr-share
@@ -3935,8 +3931,7 @@ connect an engine to your inputs and rendering functions to get an editor.")
3935 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy")))) 3931 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
3936 (build-system dune-build-system) 3932 (build-system dune-build-system)
3937 (arguments 3933 (arguments
3938 `(#:build-flags (list "--profile" "release") 3934 `(#:tests? #f
3939 #:tests? #f
3940 #:ocaml ,ocaml-4.07 3935 #:ocaml ,ocaml-4.07
3941 #:findlib ,ocaml4.07-findlib 3936 #:findlib ,ocaml4.07-findlib
3942 #:dune ,ocaml4.07-dune)) 3937 #:dune ,ocaml4.07-dune))
diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 6a2f3d16dec..1a64cf9b756 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu> 2;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
3;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> 3;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
4;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -88,6 +89,7 @@
88 (out-of-source? #t) 89 (out-of-source? #t)
89 (jbuild? #f) 90 (jbuild? #f)
90 (package #f) 91 (package #f)
92 (profile "release")
91 (tests? #t) 93 (tests? #t)
92 (test-flags ''()) 94 (test-flags ''())
93 (test-target "test") 95 (test-target "test")
@@ -127,6 +129,7 @@ provides a 'setup.ml' file as its build system."
127 #:out-of-source? ,out-of-source? 129 #:out-of-source? ,out-of-source?
128 #:jbuild? ,jbuild? 130 #:jbuild? ,jbuild?
129 #:package ,package 131 #:package ,package
132 #:profile ,profile
130 #:tests? ,tests? 133 #:tests? ,tests?
131 #:test-target ,test-target 134 #:test-target ,test-target
132 #:install-target ,install-target 135 #:install-target ,install-target
diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm
index 7e2ec1e3e1f..6a0c2593acf 100644
--- a/guix/build/dune-build-system.scm
+++ b/guix/build/dune-build-system.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> 2;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
3;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com> 3;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com>
4;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -31,11 +32,14 @@
31;; Code: 32;; Code:
32 33
33(define* (build #:key (build-flags '()) (jbuild? #f) 34(define* (build #:key (build-flags '()) (jbuild? #f)
34 (use-make? #f) (package #f) #:allow-other-keys) 35 (use-make? #f) (package #f)
36 (profile "release") #:allow-other-keys)
35 "Build the given package." 37 "Build the given package."
36 (let ((program (if jbuild? "jbuilder" "dune"))) 38 (let ((program (if jbuild? "jbuilder" "dune")))
37 (apply invoke program "build" "@install" 39 (apply invoke program "build" "@install"
38 (append (if package (list "-p" package) '()) build-flags))) 40 (append (if package (list "-p" package) '())
41 `("--profile" ,profile)
42 build-flags)))
39 #t) 43 #t)
40 44
41(define* (check #:key (test-flags '()) (test-target "test") tests? 45(define* (check #:key (test-flags '()) (test-target "test") tests?