From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id R18WHipLCmHmsgAAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 10:09:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uIASGSpLCmEZPAAAbx9fmQ (envelope-from ) for ; Wed, 04 Aug 2021 08:09:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9AC0EB701 for ; Wed, 4 Aug 2021 10:09:13 +0200 (CEST) Received: from localhost ([::1]:45846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBBxg-0005cn-Mc for larch@yhetil.org; Wed, 04 Aug 2021 04:09:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBBxW-0005Jr-7b for guix-patches@gnu.org; Wed, 04 Aug 2021 04:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBBxW-0007ry-0M for guix-patches@gnu.org; Wed, 04 Aug 2021 04:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBBxV-0000GR-S5 for guix-patches@gnu.org; Wed, 04 Aug 2021 04:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49868] [PATCH 1/2] guix: dune-build-system: Add a profile parameter. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Aug 2021 08:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49868 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49868@debbugs.gnu.org Cc: pukkamustard Received: via spool by 49868-submit@debbugs.gnu.org id=B49868.1628064530992 (code B ref 49868); Wed, 04 Aug 2021 08:09:01 +0000 Received: (at 49868) by debbugs.gnu.org; 4 Aug 2021 08:08:50 +0000 Received: from localhost ([127.0.0.1]:42602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxJ-0000Fw-L5 for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:08:50 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBBxH-0000Fa-HK for 49868@debbugs.gnu.org; Wed, 04 Aug 2021 04:08:48 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 255C1240109 for <49868@debbugs.gnu.org>; Wed, 4 Aug 2021 10:08:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628064521; bh=pjdckNwoFSjbOuNn3/kyrzXny0P5MI0bU55dFhJRqB4=; h=From:To:Cc:Subject:Date:From; b=gcZw8IHqwFJTJUXI67xgcixhb+usGIDt0Bc7A2PoWSk2Ik0sRXJZXiaRZfcI3YOZA qwORaijMNj6gwrV82h2JxstSKLmevhfN+UKnsV4Oei9vHUaT8Xc2+CAwqxQCDjVJk6 H/WE+uqPsH9+51M0/dlPJusqliwF82wgApeE0zVTNzrrGYWrINYJmzbyJ+9OGdYN5w OIRajTvpED5Gi6F7eb9LIxOmjyKr4IZ9ya72gWTGlHflr6yQ9ZHoUjKik6dhUZ36w0 YYQNjDJ9hXhZZXgZj9EeCyRFRoUhWosgxWQwWrbvBPORE6o9A0SjrYD3OI3GaNLeZc CrWwbDEK8Ggvg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gfks43K7sz9rxV; Wed, 4 Aug 2021 10:08:40 +0200 (CEST) From: pukkamustard Date: Wed, 4 Aug 2021 08:08:29 +0000 Message-Id: <20210804080830.3928-1-pukkamustard@posteo.net> In-Reply-To: <20210804080423.3533-1-pukkamustard@posteo.net> References: <20210804080423.3533-1-pukkamustard@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628064553; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kxtLvbT3RgQ1+k+VvqiByfAMwHOOz3SXqHwQY4G9s/E=; b=Y19XQhk6CrCoK7AWx8JZPkv09M/SQ51dMvRt7bQSF69PHAwaXHz6k9vSOmAbSmGK6Q3uml ktXZll7kUKSc2KnRyZ1JTq3Yx/nLB5tsF+0B/Q8wyBYdkPxkNU+W/1LAgw5dVqFy/FcUSV B7CMGJKVmTArNRt8RaPd6Xu4eKz01ZN4TPZSYIHLn1uHTEbKvXRy9p9VGi/uzYT6x4K3mg SeLOrftiofc2BDB7aOSvpowWp5WgHTPb30w+G0Jom3HRitBXX6T2xLIYZw3G0x10X9+h8A MmqFyeyDZpssuuPcDwvDQ6ksJMjomJGONMtduw6zPzP2fy+ZCFXOC2sG3MsyLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628064553; a=rsa-sha256; cv=none; b=hCk5a36jnoBuYVvyqi7Ifu2wPA9a0lOzt0tw9vK/D5JsbBQ77NfsnoT1zdGCRWNx1bIv4D ccvyMH+TbwsGbrtXU/31S5efKDY4y72sc02Lm7e7UtksTgNANMgR4ComT/6yaLtZVeFBFQ gKt1wQB/zEUQTbt9HVz11Z5KWgjWQzYH5HMYLj63vE0kjUnSGg1ahytD0wxYqE1gHVrFjP dfUQF3j9YMfYVNsXsvuPwwkkuM+rUdTB+EKFjW6Hk0IRYR1J3tyJIW9iTj19DNTKmttYb6 Nz8kVADmU5CbWoeYn3poSvJOLDp1nZJS9FluQiZihkkJQ9Ee7S1Ey8NtRGDxKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=gcZw8IHq; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=gcZw8IHq; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 9AC0EB701 X-Spam-Score: -0.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2ac8GrlJfe6I * 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. --- doc/guix.texi | 7 +++++++ gnu/packages/ocaml.scm | 17 ++++++----------- guix/build-system/dune.scm | 3 +++ guix/build/dune-build-system.scm | 8 ++++++-- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9a9c85678c..2ba2edeb72 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#profil, 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 bf9242410d..547b905317 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2854,8 +2854,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") @@ -3273,8 +3272,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") @@ -3342,8 +3340,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 @@ -3820,9 +3817,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 @@ -3913,8 +3909,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 ;;; Copyright © 2017 Ben Woodcroft +;;; Copyright © 2021 pukkamustard ;;; ;;; 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 ;;; Copyright © 2019 Gabriel Hondet +;;; Copyright © 2021 pukkamustard ;;; ;;; 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? -- 2.32.0