From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OPmENbl5BWVkcAEA9RJhRA:P1 (envelope-from ) for ; Sat, 16 Sep 2023 11:47:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OPmENbl5BWVkcAEA9RJhRA (envelope-from ) for ; Sat, 16 Sep 2023 11:47:37 +0200 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 F3DEE5DDC8 for ; Sat, 16 Sep 2023 11:47:36 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=LnuxhW0A; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694857657; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=xOB03QNBxd+apLWHJ5WTLYzUy+bxdhEnwI7dm4HzfC4=; b=LiS5z7UIlU9YI0YmbKcIpSxNuQg1L+TTdRh9CYE2OpMMGiGge0RNNetp5CEDu5SGJNjKnI A+/hM9jULQ76AE+i/MG0XRIp9lyzNvfb+JgeO8Cep9x0u4Pqg2ZySeUp8O0Edocd29jyvs 3gjuUynILKTM9LhmM7Y29uU2N6mbOv+IZVlyxCWQK5281lvbqCf++bm5JFOn4t58acPgsE Op+T9obWyv7o+roQX9OH5jt/Sx/KO+L/tOWoNFNbXDuVzMJ9cRpaKmtBovNt3rtGGZCqZ4 RX7ZEyPlSrDlc4zSjRyjquZrUiTuC6uoLBiR/0IFah2/ONCb4fiyujxpzloYfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=LnuxhW0A; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694857657; a=rsa-sha256; cv=none; b=WtowxJZDzZsxOj9UMko3Dt+02TJPqqQIFO7JprZt668GEB7P8S7L0OjVLPccZoq5Wr7qE1 FHjznsfKwUgQRDQwymhCBpl8Gw0scr153Ij2YimV4vv+NjZmqWeSLCzgBKS3Egv+DVpKgS A/sKY8vvxcr+5bRzHUR0O1kIN0cTUtOqPLuMQGMxk2YxdmGTIXn2vS8xTNEqjWT9NDQucW WDCWtct0fvqyHLWoCvvTjtA4vOXca6IUJ+bFO2gIcnn/pu2iS73XSYDcezTDkWOKnk7OOE /s/U2BdwZQJ2IFfiE+SJNzGUA8LECRTpkw53/gU1Yt81K5EX06uDEiUbGlgLpw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhRtK-000303-Hb; Sat, 16 Sep 2023 05:47:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhRtA-0002zb-4I for bug-guix@gnu.org; Sat, 16 Sep 2023 05:46:57 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhRt9-0001Pe-SO for bug-guix@gnu.org; Sat, 16 Sep 2023 05:46:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhRtG-0002rD-Dp for bug-guix@gnu.org; Sat, 16 Sep 2023 05:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65665: [PATCH] Really get all the implicit inputs. References: <87h6ofufy5.fsf@tilde.club> In-Reply-To: <87h6ofufy5.fsf@tilde.club> Resent-From: Ulf Herrman Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 16 Sep 2023 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65665 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 65665@debbugs.gnu.org Received: via spool by 65665-submit@debbugs.gnu.org id=B65665.169485756510904 (code B ref 65665); Sat, 16 Sep 2023 09:47:02 +0000 Received: (at 65665) by debbugs.gnu.org; 16 Sep 2023 09:46:05 +0000 Received: from localhost ([127.0.0.1]:45400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhRsI-0002pk-Hu for submit@debbugs.gnu.org; Sat, 16 Sep 2023 05:46:05 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:35900 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhRsD-0002pG-P8 for 65665@debbugs.gnu.org; Sat, 16 Sep 2023 05:46:01 -0400 Received: by tilde.club (Postfix, from userid 5378) id 8A9F52230B9B9; Sat, 16 Sep 2023 09:45:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 8A9F52230B9B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1694857548; bh=6YyDUP3P3GM1Ivf42ALyG3EBQT1ZBCEcRHu7f77kYYU=; h=From:To:Subject:Date:From; b=LnuxhW0Apqvm9u3qLlehOuppl50mujkBusuB5kRQBz0oLv+wRXbX/gt5yMNLG4NCZ mdhkkKgGfFfhj/N3NsLe3RotpPJehATZiAwTgdZ/WQ7DrQC6A5uzL6Q1jsXv4x4fz0 fWx0vgQguEUAmw5EU9INH2yH78jCDtZwFDCRWPSs= From: Ulf Herrman Date: Sat, 16 Sep 2023 04:45:23 -0500 Message-ID: <87msxmqwng.fsf@tilde.club> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -2.41 X-Spam-Score: -2.41 X-Migadu-Queue-Id: F3DEE5DDC8 X-TUID: i0fxAVSQEHS5 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain This patch series causes package-mapping to recurse into package and bag arguments when #:deep? #t is given. It also recurses into gexps and gexp inputs in search of packages to devour. It also ensures that build systems leave all of their implicit package arguments in the bag arguments, ready to be found by package-mapping. It also fixes a couple build system errors I came across while modifying 40+ build systems and testing a deep package transformation. - ulfvonbelow --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-packages-rewrite-arguments-with-package-mapping.patch Content-Transfer-Encoding: quoted-printable From=2073b2dfe98591073104fd069622ede2acab0c7655 Mon Sep 17 00:00:00 2001 Message-Id: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@tilde.club> From: Ulf Herrman Date: Fri, 15 Sep 2023 07:38:24 -0500 Subject: [PATCH 1/5] guix: packages: rewrite arguments with `package-mappin= g'. * guix/gexp.scm (make-gexp, gexp-references, gexp-self-modules, gexp-self-extensions, gexp-proc, %gexp-location): export. * guix/packages.scm (build-system-with-package-mapping): replace `rewrite' argument with `rewrite-input' and `rewrite-argument' arguments. Use `rewrite-argument' to rewrite bag arguments. (package-mapping): rewrite package arguments when `deep?' is true. =2D-- guix/gexp.scm | 7 ++++++ guix/packages.scm | 56 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index 0fe4f1c98a..6acd3116d4 100644 =2D-- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -39,6 +39,13 @@ (define-module (guix gexp) #:use-module (ice-9 match) #:export (gexp gexp? + make-gexp + gexp-references + gexp-self-modules + gexp-self-extensions + gexp-proc + %gexp-location + sexp->gexp with-imported-modules with-extensions diff --git a/guix/packages.scm b/guix/packages.scm index ba98bb0fb4..1334def142 100644 =2D-- a/guix/packages.scm +++ b/guix/packages.scm @@ -1431,7 +1431,7 @@ (define* (package-closure packages #:key (system (%cu= rrent-system))) (vhash-consq package #t visited) (fold set-insert closure dependencies)))))))) =20 =2D(define (build-system-with-package-mapping bs rewrite) +(define (build-system-with-package-mapping bs rewrite-input rewrite-argume= nt) "Return a variant of BS, a build system, that rewrites a bag's inputs by passing them through REWRITE, a procedure that takes an input tuplet and returns a \"rewritten\" input tuplet." @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rewrit= e) (let ((lowered (apply lower args))) (bag (inherit lowered) =2D (build-inputs (map rewrite (bag-build-inputs lowered))) =2D (host-inputs (map rewrite (bag-host-inputs lowered))) =2D (target-inputs (map rewrite (bag-target-inputs lowered)))))) + (build-inputs (map rewrite-input (bag-build-inputs lowered))) + (host-inputs (map rewrite-input (bag-host-inputs lowered))) + (target-inputs (map rewrite-input (bag-target-inputs lowered))) + (arguments (map rewrite-argument (bag-arguments lowered)))))) =20 (build-system (inherit bs) @@ -1456,13 +1457,32 @@ (define* (package-mapping proc #:optional (cut? (co= nst #f)) depended on and returns the resulting package. The procedure stops recurs= ion when CUT? returns true for a given package. When DEEP? is true, PROC is applied to implicit inputs as well." =2D (define (rewrite input) + (define (rewrite-input input) (match input ((label (? package? package) outputs ...) (cons* label (replace package) outputs)) (_ input))) =20 + (define (rewrite-argument arg) + (match arg + ((? package? p) + (replace p)) + ((? gexp-input? gi) + (gexp-input (rewrite-argument (gexp-input-thing gi)) + (gexp-input-output gi) + #:native? (gexp-input-native? gi))) + ((? gexp? gxp) + (make-gexp (map rewrite-argument (gexp-references gxp)) + (gexp-self-modules gxp) + (gexp-self-extensions gxp) + (gexp-proc gxp) + (%gexp-location gxp))) + ((lst ...) + (map rewrite-argument lst)) + (_ + arg))) + (define mapping-property ;; Property indicating whether the package has already been processed. (gensym " package-mapping-done")) @@ -1484,7 +1504,8 @@ (define* (package-mapping proc #:optional (cut? (cons= t #f)) (inherit p) (location (package-location p)) (replacement (package-replacement p)) =2D (propagated-inputs (map rewrite (package-propagated= -inputs p))) + (propagated-inputs (map rewrite-input + (package-propagated-inputs p)= )) (properties `((,mapping-property . #t) ,@(package-properties p))))))) =20 @@ -1500,11 +1521,26 @@ (define* (package-mapping proc #:optional (cut? (co= nst #f)) (location (package-location p)) (build-system (if deep? (build-system-with-package-mapping =2D (package-build-system p) rewrite) + (package-build-system p) + rewrite-input + rewrite-argument) (package-build-system p))) =2D (inputs (map rewrite (package-inputs p))) =2D (native-inputs (map rewrite (package-native-inputs p))) =2D (propagated-inputs (map rewrite (package-propagated-inp= uts p))) + (inputs (map rewrite-input (package-inputs p))) + (native-inputs (map rewrite-input (package-native-inputs = p))) + (propagated-inputs + (map rewrite-input (package-propagated-inputs p))) + (arguments + (match p + (($ _ _ _ _ args-proc) + ;; If we let ARGS-PROC be passed its original pack= age, + ;; we somehow end up in an infinite (or maybe just + ;; exponential? Never seen it end...) loop. Should + ;; probably figure out what's causing that at some + ;; point. + (let ((args (args-proc this-package))) + (if deep? + (map rewrite-argument args) + args))))) (replacement (and=3D> (package-replacement p) replace)) (properties `((,mapping-property . #t) ,@(package-properties p))))))))) base-commit: bfb480e76f7968f8e39e37e64681b0fd062edb1e prerequisite-patch-id: b512735cd31c9f7564894ed3a5c1c3b921eeaed3 prerequisite-patch-id: d782bad3845786f3ef367822aeb146a1e5e994d7 prerequisite-patch-id: c277154bb5fbcb1e6a2af576d6f7eebde308b010 prerequisite-patch-id: 088174854de84cd796d4fe7f39386b1539a3df51 prerequisite-patch-id: 083848588d3bae9d392fb1270b64990f13209dbe prerequisite-patch-id: 36801b82c0a0365ab18a3a6ad3814e8fbe1b0630 prerequisite-patch-id: de0adff180c2ea6e9d1c34f8f0b1d62ec7863ccf prerequisite-patch-id: 7054626c27a5208550912b11e92bb16dab15fb34 prerequisite-patch-id: 5736a5673877a8185a80d0c9767f288bddc239d3 prerequisite-patch-id: 4e23b3ba151bebb40d56816915f9d0503fe1566b prerequisite-patch-id: 4edcd21bef307dbe07a9605314aaa446f45a943f prerequisite-patch-id: 0a98f8e01ac1df033a86b5f42d01dd9baece0807 prerequisite-patch-id: e55e0c751b9772a31656decb1aec8bcc193685b0 prerequisite-patch-id: 837b6cf8db48bdb22c7573ce0fb63a1a6255640b prerequisite-patch-id: 0c07d4138fc33f6d976b7c7ff2d25b93145dc417 prerequisite-patch-id: 1875c8e646ce329f8a72da90367c3725c953b5c2 prerequisite-patch-id: 8c429132b33f94d9f910413f56e9b3ca18d0db43 prerequisite-patch-id: 121cf7bd1b560e8db138132990840a20c20c6636 prerequisite-patch-id: e9662377bc432936ffbfffaa10dff3a285eacd26 prerequisite-patch-id: cfd757e3df23f22fbd88441ecabfe21f37b4d140 prerequisite-patch-id: a563c6b6f53532a7a6fb7fe8ebbb11d237947b7f prerequisite-patch-id: da271d8023063a789328959f5dc6389675d5d46a prerequisite-patch-id: 271b2952dc050715c90848953e3586b35e21d184 prerequisite-patch-id: 92caaf95030c644dec30fc139a63e25b1dc8d48c prerequisite-patch-id: e03d9290c61f083c96b084403e6dc69394ee2faa prerequisite-patch-id: 3ca7c6fd53e9cd1c07bfb2e16763ecaf6d0cc4eb prerequisite-patch-id: 018b82c741ee4e1370df059b22cc86aa4735644b prerequisite-patch-id: a26834894fcd1380dfd5a979088114d50d0df392 prerequisite-patch-id: 8916b1ce832d695ecb86e4f36b3fe1a5529552dc prerequisite-patch-id: 2230d379e61787c3327f89ef02c8de3ab879090d prerequisite-patch-id: fb4536c142e85bb0a6610203ae25a74f7342351d prerequisite-patch-id: dc0a3e2e36977cf203ad0c74650844758446c115 prerequisite-patch-id: f9e2903e96a7e6e08f9a9ce10e8f35650a2bc9d0 prerequisite-patch-id: 52609b8f7999fe1bfd2ad90aba421042b1e39a50 prerequisite-patch-id: 4b6138782ae74502be87966344f7bb5d88e8734c prerequisite-patch-id: 411c9c605a4e89efe01841517486a3d6015be917 prerequisite-patch-id: e07e206a39a0b173786207d335740f08d0baecb2 prerequisite-patch-id: 424af6d825a003e67545f8f23fc292407a029a4e prerequisite-patch-id: cd9480f3fbb837834ef9294aec9d25e797927456 prerequisite-patch-id: 2f401351ac266c92a77cbcf54549ce5bee78e93e prerequisite-patch-id: aff161c12c59578d3d1e4569ad3bea0ab7fa231d prerequisite-patch-id: 156e04e25c5f214fd5e9ba3a4548b960bf8d5142 prerequisite-patch-id: 61869ccfd561784d16df3d62dae522790b182ea0 prerequisite-patch-id: a19bb63b9c373c4f153545de121024c2f0008e03 prerequisite-patch-id: 92eb3cfcdb4791daed167477aa19d34400455f2b prerequisite-patch-id: 7e00825d11982a64a671116fc30ebe34ff562974 prerequisite-patch-id: a920acf76ea0ed8484888c28f5803def46b496e8 prerequisite-patch-id: a2f4feda897c80d54fefac2979b34dc8755d2562 prerequisite-patch-id: 66bd73e2012a407a0ae8c07ead463bb87ac7ceb1 prerequisite-patch-id: c7703e99c566323d908bfdd31896401c61d9c6e9 prerequisite-patch-id: b05dec5daf49254938536568b1f0e259f85a5f27 prerequisite-patch-id: 2ec62060c8d777a316cb35a5956fca2d6340c238 prerequisite-patch-id: 5e47032571af5476c2a4d9bbbe9c98ac62736acf prerequisite-patch-id: f3f2d80dc4d970ec7e27221b1713303a752602db prerequisite-patch-id: cf272874f837a1089867a3c578ba773b9722e4bc prerequisite-patch-id: 26b133febfaa8e56cacf9695fec9e47ac7752437 prerequisite-patch-id: 2370164c61289dc27dacd1a3fce404b42a5cd306 prerequisite-patch-id: 8e151f495e68d05d7ae3a58b75965ed6ad402cb3 prerequisite-patch-id: 1e1d8a1a5c3d2e7c012c3800b2f162bbfb11830e prerequisite-patch-id: 20b2ba87fb4a1d22b2e5d189868953deb1b8432d prerequisite-patch-id: 4b7a45d0216169dddf32b0556847edcf1fe83c77 prerequisite-patch-id: a7caa886acb871c8fae58942ea33c4830c1bf50a prerequisite-patch-id: 4cb809d1af72bfb4160541432f84e7f7a2ec377c prerequisite-patch-id: b8bba3077b9e27a14b7a4500145a546e2551920b prerequisite-patch-id: 42371e75be346f69a66f1af370f10e19118d3666 prerequisite-patch-id: fbcbda683c60fc49fb0acb35e8fcba3632e33c1d prerequisite-patch-id: 5a7497e62af0532f2262e825ecfffdc87b46a4cd prerequisite-patch-id: 39515c3e9d305eca348d158422e1db32d02a2f6f prerequisite-patch-id: cb139244b5614b18feeb19793713a1836e637e23 prerequisite-patch-id: 095b7088b6d2e2738d07a2c5409f9116640f1e8c prerequisite-patch-id: 36e9e48ae432da7f9e0438ff3bd2476fb4ee17ef prerequisite-patch-id: a0be866c6a75021f6d9ae024a5ebeb94f14ef039 prerequisite-patch-id: 0d424f7822bad63211e0f5f2e8432053fcc2280d prerequisite-patch-id: a59b7626f41bf5570f2119e4b148c7da4370c604 prerequisite-patch-id: 3d4f86e81bda469eb2cac04b6781847f32ba2d4b prerequisite-patch-id: d364cccdb604ed9d3d9b98d821ef1bcba2f93dd4 prerequisite-patch-id: ad4bbb2ffa1a81c85e6f7a3da474648c57abeb08 prerequisite-patch-id: b2ccfb33f49dcee45d0eae151d63c20619eba269 prerequisite-patch-id: 370503f330a01247f61b6f8da90cc1874addca9d prerequisite-patch-id: bf97596682da5aa565d63e58806e64c57501bfbf prerequisite-patch-id: ff1ce6c53974f6458a24f5d68d656514a49b496a prerequisite-patch-id: abec97caff0781ddf8bac457259e336956d31f56 prerequisite-patch-id: 10b5231fdd5214c7ce994d13e9bc4accd9c3e98b prerequisite-patch-id: 6c3ff15435a372b3c176d0ec839507093e7f75d5 prerequisite-patch-id: d874c3ae8cc9643fe65c0def0ab9f62a30ef265e prerequisite-patch-id: 301b58dab98c976159b086b6d9b215f6cfc32560 prerequisite-patch-id: d946ee345019733d07c28073643c11d6a0265887 prerequisite-patch-id: eb86ebc23516ee5a1c69fad149fbf5a82fbf44e2 prerequisite-patch-id: f3aae14f0dc6bd6c07b5405db4efb8677eb109db prerequisite-patch-id: a596041f0af7a7fb2ff8fc39e61c75d1add0b21a prerequisite-patch-id: 6dc272118cfeb1aea0819a796beace8fa8305be7 prerequisite-patch-id: 8dea513488503b59c1971a20b6e5af36fab30f16 prerequisite-patch-id: 489930e028059725a437833f8144cba5b5f88275 prerequisite-patch-id: 101a681e226bba3d782559f9966ed75f6cfac4d0 prerequisite-patch-id: 02d84b8de56dcf379619cb73975e08541258a744 prerequisite-patch-id: 22eb2f65315c0eec851686f01a43772184be67c2 prerequisite-patch-id: f4013eaef497b4e39d5680ae87c388f5e90d962c prerequisite-patch-id: e774f3f01024e9b0522c62d7f0e2e745d1eec9d6 prerequisite-patch-id: 6fea198a4035448351e7ab3c859f5ba7a9974e3e prerequisite-patch-id: 9f9ee707bc7da130f29d23398775b7648345fddd prerequisite-patch-id: fef59953278e9b5c86db36ff047117203aac756c prerequisite-patch-id: 076981cbfd6fdf83498b0abbfab4aa41b17bf32f prerequisite-patch-id: 63746b98da1e924ec78b707e0cab29e1913793e6 prerequisite-patch-id: 4c8b859607b829c54ea2bc94d8fd1807054e347f prerequisite-patch-id: ca54f1fae5954706f3f4b46427b39f3096193e20 prerequisite-patch-id: 8d1176310f67c10d84f7d409152c45584637a5e1 prerequisite-patch-id: d973cfefc6c2621052370ef917c5a30b4b4c6153 prerequisite-patch-id: a16615ac67d4cfb2d7f991d41d7b88e536b8d1e6 prerequisite-patch-id: c99f1ac1c8f31966ab5eace82966b38d7683c7b6 prerequisite-patch-id: ea8cbbe7d266c8e01f92cf47c67a2b77ba2e2f2a prerequisite-patch-id: 87f853bef8078737d6ee37152f9540dc318577b8 prerequisite-patch-id: 624ebedc4b5efd852396af22dfee278e81e18607 prerequisite-patch-id: b0386c11c46382a027d6feb7f8cee077fd1ce7f0 prerequisite-patch-id: f30932e3c494a7e2e758c71a15600f7d02e5fe3c prerequisite-patch-id: c6e5542e49b9e990abfd941b82e6c8f47cce82eb prerequisite-patch-id: 8ed51ac5bb592e2b9a3726d009b390eaf3d02a22 prerequisite-patch-id: 3eb38c477f4039d6dad8ea7657461d5b69582cea prerequisite-patch-id: 604ec349a2100c97da1a9e86443e5fe670fc9aff prerequisite-patch-id: 0ec9b5ad92a820364e736176265cbf38a6aa9865 prerequisite-patch-id: 9f9f6f4f5e6f3f38d57c8fc51dd6d1d1b13614aa prerequisite-patch-id: 3084be13b8e6449d0739a66199d78fd83b273dc9 prerequisite-patch-id: 38129e693708c4068b779fe561befa0789da4e68 prerequisite-patch-id: e599d0af678fca48957ba931713ba46acf57cd26 prerequisite-patch-id: 82676aa787f2d5896dbcc966014c85933ee203bd prerequisite-patch-id: 4e1a39929ca7eb97be4a265ab2961ebb00ac2494 prerequisite-patch-id: 928b20a27997c43597c625e6e431e9963b8a6cdc prerequisite-patch-id: eea41f1a51b1062b9f7fe17ba9b0827bce4f7f8d prerequisite-patch-id: 94d48d21b6e420f0d9bf99d9488136b667d047b4 prerequisite-patch-id: c06f0d333b33836de8800323e814d6dcf214fd78 prerequisite-patch-id: 44515b47a0e5f194b1e782bbbdf4597418c46f77 prerequisite-patch-id: 94eeb31189a81ccbf18dda42a72db715bec3a279 prerequisite-patch-id: d02e7863404940800b63dca3f328547df5cac24f prerequisite-patch-id: c47b08cb4e7ab0a024a2be4b250c4b60ab0bab65 prerequisite-patch-id: fb2396bde2637b96c4412df6ef6a09e9c38e3365 prerequisite-patch-id: 7068eef2aa4f77ef304869b3661c25238f7497e5 prerequisite-patch-id: a2f06d63b11dce495cddad29f5f507a380ff23c2 prerequisite-patch-id: b21a55b8bf2bd23485e0d7d6433ec1f29acd6226 prerequisite-patch-id: 7fd6c9378b4c96bbc7e109f759fd4e7ff6bacba2 prerequisite-patch-id: b109590bb6082361a59547bf252f576a574b75e8 prerequisite-patch-id: f5aa2b7352ffec54c23277d9d4715bbd95c1eb79 prerequisite-patch-id: 2a9907079587beb938680221ededa8f5e0e7d4b2 prerequisite-patch-id: 90f4e54d0b451db6166dbd1d2067e07696e092bf prerequisite-patch-id: 999ec11aaddd785d065911dcb1fc7385ccf053d6 prerequisite-patch-id: cc250a0b2267760feea1427573482db1bb8328e6 prerequisite-patch-id: b593f9fd55bbd9e855baba4b1037d844d5773916 prerequisite-patch-id: 74e3c356cee5e56d4dc3f5bc4f5705cd2ce75a1d prerequisite-patch-id: 7443872a7242e134d8f95398c53f47d4ae21a23b prerequisite-patch-id: da89093d1a5bb1dd8bb6436f4daf70eb4025eae9 prerequisite-patch-id: 3be9735669c6510ef29e75588bbf907d57733834 prerequisite-patch-id: 976e476ba476fe3cd730ac29c825fad81c6331d1 prerequisite-patch-id: 889a29b57cea9cb18f4f4a9c22b04d151b216e1d prerequisite-patch-id: 6b6690e68606f4359e22656a7c6aeae5c58ea017 prerequisite-patch-id: c46954eddc80453f6d7c045fa22ec99a694d9693 prerequisite-patch-id: bdccc141b570181273512c2089d95e4ebcdae453 prerequisite-patch-id: ee3338d64821748f9a7d8ed9cf5e9181c2027252 prerequisite-patch-id: 7f7da1ba32e01163b013d5c4ac96aa468f6e908e prerequisite-patch-id: 83a09cce225aaaa626b3f5d2f3a092055f61a909 prerequisite-patch-id: 7f31991b2e91782e9dd1c1a6fda5f055fdff3234 prerequisite-patch-id: 831310b4d4842a08ad12fdf5c07ce55b57db049d prerequisite-patch-id: 9588d67009d034f36ceef115b158556b8cacb680 prerequisite-patch-id: e0807504b7c5f14f0af8bdbbdd800754888dd8f8 prerequisite-patch-id: 6e3d6e24505bd188d776720913c18c4b874c896c prerequisite-patch-id: e20a2cd4b5a85889b97a5733863175fb56420d01 =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-build-system-asdf-use-substitute-keyword-arguments-w.patch Content-Transfer-Encoding: quoted-printable From=20dcd9b6505fa46d139d40141cf29d7eef15c46481 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@tilde.club> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@tilde.club> From: Ulf Herrman Date: Fri, 15 Sep 2023 07:48:48 -0500 Subject: [PATCH 2/5] build-system: asdf: use substitute-keyword-arguments w= ith default. A two-argument substitute-keyword-arguments clause won't be evaluated when there isn't already a keyword in the argument list. Using a three-argument clause allows the phases-transformer to be run in all cases. * guix/build-system/asdf.scm (package-with-build-system): use %standard-pha= ses as default value of `phases', use gexps. =2D-- guix/build-system/asdf.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index 2b17cee37b..cd041eed4f 100644 =2D-- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -218,7 +218,8 @@ (define* (package-with-build-system from-build-system t= o-build-system (build-system to-build-system) (arguments (substitute-keyword-arguments base-arguments =2D ((#:phases phases) (list phases-transformer phases)))) + ((#:phases phases #~%standard-phases) + #~(#$phases-transformer #$phases)))) (inputs (new-inputs package-inputs)) (propagated-inputs (new-propagated-inputs)) (native-inputs (append (if target-is-source? =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-build-system-include-all-argument-packages-in-bag-ar.patch Content-Transfer-Encoding: quoted-printable From=204b42f9501284ad66d4de04f5b94bdaf412008d5d Mon Sep 17 00:00:00 2001 Message-Id: <4b42f9501284ad66d4de04f5b94bdaf412008d5d.1694806866.git.strine= ss@tilde.club> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@tilde.club> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@tilde.club> From: Ulf Herrman Date: Fri, 15 Sep 2023 08:31:58 -0500 Subject: [PATCH 3/5] build-system: include all argument packages in bag args explicitly. Deep package transformations currently miss several implicit input packages because they are introduced via the bag->derivation builder procedure. This is the case with, for example, qtbase in qt-build-system. This can be avoi= ded by ensuring that those arguments are always explicitly specified in the bag arguments list. Notably, this is also the case for the guile used by the generated build script, so every single build system that uses gexp->derivation needs to be modified. * guix/build-system/agda.scm (lower): include guile in bag arguments. * guix/build-system/android-ndk.scm (lower): include guile in bag arguments. * guix/build-system/ant.scm (lower): include guile in bag arguments. * guix/build-system/asdf.scm (lower, lower/source): include guile in bag arguments. * guix/build-system/cargo.scm (lower): include guile in bag arguments. * guix/build-system/chicken.scm (lower): include guile in bag arguments. * guix/build-system/clojure.scm (lower): include guile in bag arguments. * guix/build-system/cmake.scm (lower): include guile in bag arguments. * guix/build-system/copy.scm (lower): include guile in bag arguments. * guix/build-system/dub.scm (lower): include guile in bag arguments. * guix/build-system/dune.scm (lower): include guile in bag arguments. * guix/build-system/elm.scm (lower): include guile in bag arguments. * guix/build-system/emacs.scm (lower): include guile in bag arguments. * guix/build-system/font.scm (lower): include guile in bag arguments. * guix/build-system/glib-or-gtk.scm (lower): include guile in bag arguments. * guix/build-system/gnu.scm (lower): include guile in bag arguments. * guix/build-system/go.scm (lower): include guile in bag arguments. * guix/build-system/guile.scm (lower): include guile in bag arguments. * guix/build-system/haskell.scm (lower): include guile in bag arguments. * guix/build-system/julia.scm (lower): include guile in bag arguments. * guix/build-system/linux-module.scm (lower): include guile in bag argument= s. * guix/build-system/maven.scm (lower): include guile in bag arguments. * guix/build-system/meson.scm (lower): include guile in bag arguments. * guix/build-system/minify.scm (lower): include guile in bag arguments. * guix/build-system/node.scm (lower): include guile in bag arguments. * guix/build-system/ocaml.scm (lower): include guile in bag arguments. * guix/build-system/perl.scm (lower): include guile in bag arguments. * guix/build-system/pyproject.scm (lower): include guile in bag arguments. * guix/build-system/python.scm (lower): include guile in bag arguments. * guix/build-system/qt.scm (lower): include guile and qtbase in bag arguments. * guix/build-system/r.scm (lower): include guile in bag arguments. * guix/build-system/rakudo.scm (lower): include guile in bag arguments. * guix/build-system/rebar.scm (lower): include guile in bag arguments. * guix/build-system/renpy.scm (lower): include guile in bag arguments. * guix/build-system/ruby.scm (lower): include guile in bag arguments. * guix/build-system/scons.scm (lower): include guile in bag arguments. * guix/build-system/texlive.scm (lower): include guile in bag arguments. * guix/build-system/tree-sitter.scm (lower): include guile in bag arguments. * guix/build-system/trivial.scm (lower): include guile in bag arguments. =2D-- guix/build-system/agda.scm | 6 +++++- guix/build-system/android-ndk.scm | 6 +++++- guix/build-system/ant.scm | 6 +++++- guix/build-system/asdf.scm | 12 ++++++++++-- guix/build-system/cargo.scm | 6 +++++- guix/build-system/chicken.scm | 6 +++++- guix/build-system/clojure.scm | 7 +++++-- guix/build-system/cmake.scm | 6 +++++- guix/build-system/copy.scm | 6 +++++- guix/build-system/dub.scm | 6 +++++- guix/build-system/dune.scm | 5 ++++- guix/build-system/elm.scm | 6 +++++- guix/build-system/emacs.scm | 6 +++++- guix/build-system/font.scm | 6 +++++- guix/build-system/glib-or-gtk.scm | 6 +++++- guix/build-system/gnu.scm | 6 +++++- guix/build-system/go.scm | 6 +++++- guix/build-system/guile.scm | 5 ++++- guix/build-system/haskell.scm | 4 +++- guix/build-system/julia.scm | 6 +++++- guix/build-system/linux-module.scm | 6 +++++- guix/build-system/maven.scm | 6 +++++- guix/build-system/meson.scm | 6 +++++- guix/build-system/minify.scm | 6 +++++- guix/build-system/node.scm | 6 +++++- guix/build-system/ocaml.scm | 6 +++++- guix/build-system/perl.scm | 6 +++++- guix/build-system/pyproject.scm | 6 +++++- guix/build-system/python.scm | 6 +++++- guix/build-system/qt.scm | 7 ++++++- guix/build-system/r.scm | 6 +++++- guix/build-system/rakudo.scm | 6 +++++- guix/build-system/rebar.scm | 6 +++++- guix/build-system/renpy.scm | 6 +++++- guix/build-system/ruby.scm | 6 +++++- guix/build-system/scons.scm | 6 +++++- guix/build-system/texlive.scm | 6 +++++- guix/build-system/tree-sitter.scm | 6 +++++- guix/build-system/trivial.scm | 3 ++- guix/build-system/waf.scm | 6 +++++- 40 files changed, 199 insertions(+), 42 deletions(-) diff --git a/guix/build-system/agda.scm b/guix/build-system/agda.scm index 64983dff60..511f1f11b5 100644 =2D-- a/guix/build-system/agda.scm +++ b/guix/build-system/agda.scm @@ -47,6 +47,7 @@ (define %default-modules (define* (lower name #:key source inputs native-inputs outputs system target (agda (default-agda)) + (guile (default-guile)) gnu-and-haskell? #:allow-other-keys #:rest arguments) @@ -73,7 +74,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build agda-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (agda-build name inputs #:key diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-= ndk.scm index 047f884b19..064aacceaa 100644 =2D-- a/guix/build-system/android-ndk.scm +++ b/guix/build-system/android-ndk.scm @@ -82,6 +82,7 @@ (define* (android-ndk-build name inputs =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -106,7 +107,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build android-ndk-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define android-ndk-build-system (build-system diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm index cfb033f6a5..d4998b26e1 100644 =2D-- a/guix/build-system/ant.scm +++ b/guix/build-system/ant.scm @@ -69,6 +69,7 @@ (define* (lower name (jdk (default-jdk)) (ant (default-ant)) (zip (default-zip)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -92,7 +93,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build ant-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ant-build name inputs #:key diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index cd041eed4f..1adbe7d996 100644 =2D-- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -73,6 +73,7 @@ (define (default-lisp implementation) =20 (define* (lower/source name #:key source inputs outputs native-inputs system ta= rget + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME" @@ -91,7 +92,10 @@ (define* (lower/source name (build-inputs native-inputs) (outputs outputs) (build asdf-build/source) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (asdf-build/source name inputs #:key source outputs @@ -245,6 +249,7 @@ (define (lower lisp-type) (lambda* (name #:key source inputs outputs native-inputs system target (lisp (default-lisp (string->symbol lisp-type))) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME" @@ -264,7 +269,10 @@ (define (lower lisp-type) ,@native-inputs)) (outputs outputs) (build (asdf-build lisp-type)) =2D (arguments (strip-keyword-arguments private-keywords argument= s)))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define (asdf-build lisp-type) (lambda* (name inputs diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 912400a191..84efea019e 100644 =2D-- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -238,6 +238,7 @@ (define* (lower name (rust (default-rust)) (cargo-inputs '()) (cargo-development-inputs '()) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -264,7 +265,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build cargo-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define cargo-build-system (build-system diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..ac1c5804ac 100644 =2D-- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -53,6 +53,7 @@ (define (default-chicken) (define* (lower name #:key source inputs native-inputs outputs system target (chicken (default-chicken)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -77,7 +78,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build chicken-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (chicken-build name inputs #:key diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm index fb897356bc..921edab912 100644 =2D-- a/guix/build-system/clojure.scm +++ b/guix/build-system/clojure.scm @@ -75,6 +75,7 @@ (define* (lower name (clojure (force %default-clojure)) (jdk (force %default-jdk)) (zip (force %default-zip)) + (guile (default-guile)) outputs system #:allow-other-keys #:rest arguments) @@ -98,8 +99,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build clojure-build) =2D (arguments (strip-keyword-arguments private-keywords =2D arguments)))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define* (clojure-build name inputs #:key diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index aa187c9844..8db841992c 100644 =2D-- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -57,6 +57,7 @@ (define (default-cmake target) (define* (lower name #:key source inputs native-inputs outputs system target (cmake (default-cmake target)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -93,7 +94,10 @@ (define* (lower name '())) (outputs outputs) (build (if target cmake-cross-build cmake-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (cmake-build name inputs #:key guile source diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm index d58931b33c..2507d77bcc 100644 =2D-- a/guix/build-system/copy.scm +++ b/guix/build-system/copy.scm @@ -57,6 +57,7 @@ (define (default-glibc) (define* (lower name #:key source inputs native-inputs outputs system target (glibc (default-glibc)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -75,7 +76,10 @@ (define* (lower name (build-inputs native-inputs) (outputs outputs) (build copy-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (copy-build name inputs #:key diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm index b4011cdb83..1b9f21b052 100644 =2D-- a/guix/build-system/dub.scm +++ b/guix/build-system/dub.scm @@ -106,6 +106,7 @@ (define* (lower name (dub (default-dub)) (pkg-config (default-pkg-config)) (ld-gold-wrapper (default-ld-gold-wrapper)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -131,7 +132,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build dub-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define dub-build-system (build-system diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index c45f308349..bad523b9eb 100644 =2D-- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -57,6 +57,7 @@ (define* (lower name (dune (default-dune)) (ocaml (ocaml:default-ocaml)) (findlib (ocaml:default-findlib)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -92,7 +93,9 @@ (define* (lower name (build dune-build) (arguments (append `(#:dune-release-flags ,dune-release-flags) =2D (strip-keyword-arguments private-keywords argumen= ts))))))) + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords argum= ents) + ((#:guile _ #t) guile)))))))) =20 (define* (dune-build name inputs #:key diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm index f5321f811b..1c2b4a003e 100644 =2D-- a/guix/build-system/elm.scm +++ b/guix/build-system/elm.scm @@ -119,6 +119,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (implicit-elm-package-inputs? #t) (elm (default-elm)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -165,7 +166,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build elm-build) =2D (arguments (strip-keyword-arguments private-keywords arguments))))= )) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define* (elm-build name inputs #:key diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm index ebf97a5344..4ab2883769 100644 =2D-- a/guix/build-system/emacs.scm +++ b/guix/build-system/emacs.scm @@ -57,6 +57,7 @@ (define (default-emacs) (define* (lower name #:key source inputs native-inputs outputs system target (emacs (default-emacs)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -78,7 +79,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build emacs-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (emacs-build name inputs #:key source diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm index c57c304f52..018b5c69dd 100644 =2D-- a/guix/build-system/font.scm +++ b/guix/build-system/font.scm @@ -44,6 +44,7 @@ (define %font-build-system-modules =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -69,7 +70,10 @@ (define* (lower name ("xz" xz)))))) (outputs outputs) (build font-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (font-build name inputs #:key source diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-= gtk.scm index 726d19efad..f8d5a0fa24 100644 =2D-- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -87,6 +87,7 @@ (define* (lower name (implicit-inputs? #t) (implicit-cross-inputs? #t) (strip-binaries? #t) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -120,7 +121,10 @@ (define* (lower name '())) (outputs outputs) (build (if target glib-or-gtk-cross-build glib-or-gtk-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (glib-or-gtk-build name inputs #:key guile source diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index c1aa187c42..7945efa1c3 100644 =2D-- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -278,6 +278,7 @@ (define* (lower name #:key source inputs native-inputs outputs target (implicit-inputs? #t) (implicit-cross-inputs? #t) (strip-binaries? #t) system + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -319,7 +320,10 @@ (define* (lower name outputs (delete "debug" outputs))) (build (if target gnu-cross-build gnu-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define %license-file-regexp ;; Regexp matching license files. diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 0a9761aac7..e27633b624 100644 =2D-- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -120,6 +120,7 @@ (define (make-go-std) (define* (lower name #:key source inputs native-inputs outputs system target (go (default-go)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -164,7 +165,10 @@ (define* (lower name =20 (outputs outputs) (build (if target go-cross-build go-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (go-build name inputs #:key diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm index 1bd292e267..49d8cc77a7 100644 =2D-- a/guix/build-system/guile.scm +++ b/guix/build-system/guile.scm @@ -68,7 +68,10 @@ (define* (lower name '()))) (outputs outputs) (build (if target guile-cross-build guile-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) (default-guile)))))) =20 (define %compile-flags ;; Flags passed to 'guild compile' by default. We choose a common diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm index f8568e33db..b860550998 100644 =2D-- a/guix/build-system/haskell.scm +++ b/guix/build-system/haskell.scm @@ -77,6 +77,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (haskell (default-haskell)) cabal-revision + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -122,7 +123,8 @@ (define* (lower name (match (package-transitive-propagated-inputs p= kg) (((propagated-names . _) ...) (cons name propagated-names)))))) =2D extra-directories)))))))) + extra-directories))) + ((#:guile _ #t) guile)))))) =20 (define* (haskell-build name inputs #:key source diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index b5521e38e4..b4fc7f6576 100644 =2D-- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -53,6 +53,7 @@ (define (default-julia) (define* (lower name #:key source inputs native-inputs outputs system target (julia (default-julia)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -74,7 +75,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build julia-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (julia-build name inputs #:key source diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-m= odule.scm index e46195b53c..d286ea9cee 100644 =2D-- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -112,6 +112,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (linux (default-linux)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -148,7 +149,10 @@ (define* (lower name '())) (outputs outputs) (build (if target linux-module-build-cross linux-module-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (linux-module-build name inputs #:key diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm index 4bbeaed6a4..b7734a1a07 100644 =2D-- a/guix/build-system/maven.scm +++ b/guix/build-system/maven.scm @@ -116,6 +116,7 @@ (define* (lower name (maven-plugins (default-maven-plugins)) (local-packages '()) (exclude %default-exclude) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -139,7 +140,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build maven-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (maven-build name inputs #:key diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 7c617bffb0..13e2e87b58 100644 =2D-- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -125,6 +125,7 @@ (define* (lower name (meson (default-meson)) (ninja (default-ninja)) (glib-or-gtk? #f) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -156,7 +157,10 @@ (define* (lower name '())) (outputs outputs) (build (if target meson-cross-build meson-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (meson-build name inputs #:key diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm index 787235deeb..384748908c 100644 =2D-- a/guix/build-system/minify.scm +++ b/guix/build-system/minify.scm @@ -50,6 +50,7 @@ (define (default-uglify-js) (define* (lower name #:key source inputs native-inputs outputs system (uglify-js (default-uglify-js)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -68,7 +69,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build minify-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (minify-build name inputs #:key diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 3f73390809..0b1c1f1ddd 100644 =2D-- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -48,6 +48,7 @@ (define (default-node) (define* (lower name #:key source inputs native-inputs outputs system target (node (default-node)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -74,7 +75,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build node-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (node-build name inputs #:key diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 582d00b4cd..91dda0c391 100644 =2D-- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -229,6 +229,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (ocaml (default-ocaml)) (findlib (default-findlib)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -251,7 +252,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build ocaml-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ocaml-build name inputs #:key diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index 7c6deb34bf..99e952a531 100644 =2D-- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -58,6 +58,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (perl (default-perl)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -99,7 +100,10 @@ (define* (lower name (build (if target perl-cross-build perl-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (perl-build name inputs #:key source diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.= scm index 2a2c3af3f3..41b4d2c23f 100644 =2D-- a/guix/build-system/pyproject.scm +++ b/guix/build-system/pyproject.scm @@ -60,6 +60,7 @@ (define sanity-check.py (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -82,7 +83,10 @@ (define* (lower name ,@native-inputs)) (outputs (append outputs '(wheel))) (build pyproject-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (pyproject-build name inputs #:key source diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index cca009fb28..f8657662af 100644 =2D-- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -142,6 +142,7 @@ (define (strip-python2-variant p) (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -164,7 +165,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build python-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (python-build name inputs #:key source diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 978aed0fc1..97f870a698 100644 =2D-- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -80,6 +80,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (cmake (default-cmake)) (qtbase (default-qtbase)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -116,7 +117,11 @@ (define* (lower name '())) (outputs outputs) (build (if target qt-cross-build qt-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:qtbase _ #t) qtbase) + ((#:guile _ #t) guile))))) =20 =20 (define* (qt-build name inputs diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm index 657346bea3..ed70d7b758 100644 =2D-- a/guix/build-system/r.scm +++ b/guix/build-system/r.scm @@ -79,6 +79,7 @@ (define (default-r) (define* (lower name #:key source inputs native-inputs outputs system target (r (default-r)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -100,7 +101,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build r-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (r-build name inputs #:key diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm index 3b30fdfd0e..654b0c362b 100644 =2D-- a/guix/build-system/rakudo.scm +++ b/guix/build-system/rakudo.scm @@ -68,6 +68,7 @@ (define* (lower name (zef (default-zef)) (with-prove6? #t) (with-zef? #t) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -95,7 +96,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build rakudo-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (rakudo-build name inputs #:key diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm index de1294ec3f..e89f82b768 100644 =2D-- a/guix/build-system/rebar.scm +++ b/guix/build-system/rebar.scm @@ -74,6 +74,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (rebar (default-rebar3)) (erlang (default-erlang)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -95,7 +96,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build rebar-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (rebar-build name inputs #:key diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm index 3039e3c63b..75d546fedc 100644 =2D-- a/guix/build-system/renpy.scm +++ b/guix/build-system/renpy.scm @@ -49,6 +49,7 @@ (define %renpy-build-system-modules (define* (lower name #:key source inputs native-inputs outputs system target (renpy (default-renpy)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -70,7 +71,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build renpy-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (renpy-build name inputs #:key diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index a3793a9381..be8df2a93c 100644 =2D-- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -50,6 +50,7 @@ (define (default-ruby) (define* (lower name #:key source inputs native-inputs outputs system target (ruby (default-ruby)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -71,7 +72,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build ruby-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ruby-build name inputs #:key source diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 046ddef740..95c75c817f 100644 =2D-- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -50,6 +50,7 @@ (define (default-scons) (define* (lower name #:key source inputs native-inputs outputs system target (scons (default-scons)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -71,7 +72,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build scons-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (scons-build name inputs #:key diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index 88372faa58..941fa37b5f 100644 =2D-- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -98,6 +98,7 @@ (define* (lower name system target (texlive-latex-bin? #true) (texlive-bin (default-texlive-bin)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -122,7 +123,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build texlive-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (texlive-build name inputs #:key diff --git a/guix/build-system/tree-sitter.scm b/guix/build-system/tree-sit= ter.scm index 21c4eb35b2..1ea0c58817 100644 =2D-- a/guix/build-system/tree-sitter.scm +++ b/guix/build-system/tree-sitter.scm @@ -38,6 +38,7 @@ (define %tree-sitter-build-system-modules =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -87,7 +88,10 @@ (define* (lower name (("out") (cons "js" outputs)) (_ outputs))) (build (if target tree-sitter-cross-build tree-sitter-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (tree-sitter-build name inputs #:key diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm index e08884baf1..37798cbf7a 100644 =2D-- a/guix/build-system/trivial.scm +++ b/guix/build-system/trivial.scm @@ -26,7 +26,8 @@ (define-module (guix build-system trivial) =20 (define* (lower name #:key source inputs native-inputs outputs system target =2D guile builder (modules '()) allowed-references) + (guile (default-guile)) builder (modules '()) + allowed-references) "Return a bag for NAME." (bag (name name) diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm index 91b3d0d100..abb87156c7 100644 =2D-- a/guix/build-system/waf.scm +++ b/guix/build-system/waf.scm @@ -47,6 +47,7 @@ (define %waf-build-system-modules (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -68,7 +69,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build waf-build) ; only change compared to 'lower' in python.scm =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (waf-build name inputs #:key source =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-build-system-cargo-dune-ocaml-scons-use-drv-guile-fo.patch Content-Transfer-Encoding: quoted-printable From=209ec825fd06f32757f45f31880e7b238bba769884 Mon Sep 17 00:00:00 2001 Message-Id: <9ec825fd06f32757f45f31880e7b238bba769884.1694806866.git.strine= ss@tilde.club> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@tilde.club> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@tilde.club> From: Ulf Herrman Date: Fri, 15 Sep 2023 08:45:39 -0500 Subject: [PATCH 4/5] build-system: {cargo,dune,ocaml,scons}: use drv guile-for-build. These all pass a guile *package* to gexp->derivation in their bag->derivati= on builders, but it wants a derivation. * guix/build-system/cargo.scm (cargo-build): use package->derivation to get guile for build. * guix/build-system/dune.scm (dune-build): same. * guix/build-system/ocaml.scm (ocaml-build): same. * guix/build-system/scons.scm (scons-build): same. =2D-- guix/build-system/cargo.scm | 12 +++++++----- guix/build-system/dune.scm | 14 ++++++++------ guix/build-system/ocaml.scm | 13 ++++++++----- guix/build-system/scons.scm | 13 ++++++++----- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 84efea019e..30d6d2ead9 100644 =2D-- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -120,11 +120,13 @@ (define* (cargo-build name inputs (map search-path-specification->= sexp search-paths)))))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define (package-cargo-inputs p) (apply diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index bad523b9eb..1bf93361aa 100644 =2D-- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -21,6 +21,7 @@ =20 (define-module (guix build-system dune) #:use-module (guix store) + #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (guix search-paths) @@ -154,12 +155,13 @@ (define* (dune-build name inputs #:strip-binaries? #$strip-binaries? #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) =2D =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define dune-build-system (build-system diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 91dda0c391..20327295f9 100644 =2D-- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -21,6 +21,7 @@ (define-module (guix build-system ocaml) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix monads) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) @@ -309,11 +310,13 @@ (define* (ocaml-build name inputs #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define ocaml-build-system (build-system diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 95c75c817f..e504db90c2 100644 =2D-- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -22,6 +22,7 @@ (define-module (guix build-system scons) #:use-module (guix packages) #:use-module (guix monads) #:use-module (guix gexp) + #:use-module (guix store) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) @@ -121,11 +122,13 @@ (define* (scons-build name inputs (map search-path-specification->sexp search-paths))))))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define scons-build-system (build-system =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-build-system-dub-add-ld-gold-wrapper-to-private-keyw.patch Content-Transfer-Encoding: quoted-printable From=2032a455ab2852c6ff015a2126953075c67a3371b9 Mon Sep 17 00:00:00 2001 Message-Id: <32a455ab2852c6ff015a2126953075c67a3371b9.1694806866.git.strine= ss@tilde.club> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@tilde.club> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@tilde.club> From: Ulf Herrman Date: Fri, 15 Sep 2023 08:53:10 -0500 Subject: [PATCH 5/5] build-system: dub: add #:ld-gold-wrapper to private-keywords. This isn't an accepted keyword to dub-build, so it will currently cause an error if it is specified, which rather defeats the purpose of having it as = an argument. Putting it in private-keywords will cause it to be stripped from the final bag arguments. * guix/build-system/dub.scm (lower): add #:ld-gold-wrapper to private-keywords. =2D-- guix/build-system/dub.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm index 1b9f21b052..b325357589 100644 =2D-- a/guix/build-system/dub.scm +++ b/guix/build-system/dub.scm @@ -112,7 +112,8 @@ (define* (lower name "Return a bag for NAME." =20 (define private-keywords =2D '(#:target #:ldc #:dub #:pkg-config #:inputs #:native-inputs #:outpu= ts)) + '(#:target #:ldc #:dub #:pkg-config #:ld-gold-wrapper + #:inputs #:native-inputs #:outputs)) =20 (and (not target) ;; TODO: support cross-compilation (bag =2D-=20 2.40.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUFeTYUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mimLgv/d4J6jnXH+6Ujbx1z0WbaCkv3/r6b zF0t6mkNiSQ08tjHJZcg1HKq/hXnObe8CTOt+i+AS94/2DmQRBAz5M4GcerbNglY sMaFyhgxzCW2e8TBsPGD+9TAwJrIvwmSBLUDDGmhEi7u40oIXjqcZUUAXjqBVpw9 I0WAP7b8k8C1Wf/Gr2BIR7Y88ahqwt3nKtLKir5OCD/1o7vY3bI3DHN5MIEtRyli yMEPbhy274ToGPhU84EeirJI9+Ug7zynNy3lyKiw7XcCiVNPBurEiX4rUBbQXHy0 XnHp21lYQrvyzs0nbESN6JAQPHmLpM4V/TwM7g/eEZi+dgz42WQC6rNMZgOk6rsY ba5jSfImiQnqOL4dIHHl6WMhHG9X1iJZmEXvq36U9UwoBmxwkhwHZSoqAA7sCdVi k2S14IE9ptaTQ2MdA8v2nPP1cbgT80YZKHPLRwOILpPEeWxIOCXHGK/FEBw9ifJ1 pfkM7j0Q3tAFL4cnwwRHnTr6X+cBOWg0y/GJ =Aisx -----END PGP SIGNATURE----- --==-=-=--