From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kBq1GDxYPmXinQAAauVa8A:P1 (envelope-from ) for ; Sun, 29 Oct 2023 14:03:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kBq1GDxYPmXinQAAauVa8A (envelope-from ) for ; Sun, 29 Oct 2023 14:03:56 +0100 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 C222F50382 for ; Sun, 29 Oct 2023 14:03:55 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b="k/vKjG0w"; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=sSm+y7Og; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698584636; a=rsa-sha256; cv=none; b=NAtCscb6syDNncw+JZGksdNfIaHUV3wj24a0eUnwQxdi3VBx39rF9WzXo+H9M/p4DhroKQ FpCO8aQvBI4hxxwsF6QZwZbD1ScKJM+WwpXHCjfNm6XMLcNoW070DUWLn03G617Yz4U1RH lY3B3dE+01K+K6/fDjYs7xlj+BPX9sbszzciBN6AcTFfXSlhEU9KUOmWrTsF6NdyswfYBg Bt2vENH5SjGwsNKCVl2IGjwK26fAu2WWr5ed+/SfhQ3BFEnYR/aDAs1o/u0FuckVoIXw6r xxCd1/fNAoa5OChSFQkjK+GV/0RM/r+7NTrxprrydlbK7ROJGOuPc4c8jR6+lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698584636; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Rulm2gxTdCtm87cWOeSllboQwIn3WZYn/2tiHJYE/Q4=; b=sZW2C4fd7L+ioahCMhpX5ZUDbJXAtaGhGd1DMcqfYrdHseipAIZjOo1rdFpxX6ojuByINs k8X6YFSor7RV0b1kzxPmL2wZn+GgpQtegA0NAR7Od1veZVhrY+AGMCMh6r0bRJaiRUe3Vr sT404pAu9/sfRUxl76iIH4gMsgQNrRi0tIIlJgFsotcjDMJjIPgJRFPj1dDntb5UPFEVKj +K3LVXCnODfxm4fcrYvSn8m5nDj8liu7ZckaFRpGB3umvlXFx8KpX97Bmk7heeckjbXAZd Yp9iSYWweLLArN5zO0coItAlzFYiTDbBJp2iTyfi2OUayzT74yWvMAAarPjGuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b="k/vKjG0w"; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=sSm+y7Og; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qx5O8-0004Fz-7p; Sun, 29 Oct 2023 08:59:32 -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 1qx5O6-0004Fm-H7 for guix-patches@gnu.org; Sun, 29 Oct 2023 08:59:30 -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 1qx5O6-00065J-2F for guix-patches@gnu.org; Sun, 29 Oct 2023 08:59:30 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qx5Oc-0001ud-Jr for guix-patches@gnu.org; Sun, 29 Oct 2023 09:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66815] [PATCH] build-system/guile: Add target-guile-scm+go procedure. Resent-From: Tomas Volf Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Oct 2023 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66815 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66815@debbugs.gnu.org Cc: Tomas Volf X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16985843807285 (code B ref -1); Sun, 29 Oct 2023 13:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2023 12:59:40 +0000 Received: from localhost ([127.0.0.1]:40708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx5OG-0001tQ-5a for submit@debbugs.gnu.org; Sun, 29 Oct 2023 08:59:40 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx5OB-0001t9-5m for submit@debbugs.gnu.org; Sun, 29 Oct 2023 08:59:38 -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 1qx5NY-0004CH-1p for guix-patches@gnu.org; Sun, 29 Oct 2023 08:58:56 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qx5NU-00062i-TJ for guix-patches@gnu.org; Sun, 29 Oct 2023 08:58:55 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id C709F27465B; Sun, 29 Oct 2023 12:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698584328; bh=I7dFqfqFN9Nx+vNUDVHkkbNh51f0s2OAYya8WVCvDtA=; h=From:To:Cc:Subject:Date; b=k/vKjG0wJQlXLx4YCUOtflPkIaWcUeHG3NhE8jZ9Fdn+o0eAFQ6JlzshZJaz87/pm bY8qMnkOUVTL7lpYKp+dWf+D8rnn/z62f8rgiNskzRSvLAUistoWrIp+LA3ze878um ifXqA7QYHJp4thuWVMmgSksfW0yBYpiR1KdeAOXCPK2WGVWFSVVybMtnq4Qmsfh++1 KIaevU2NroapQ6MqYaFYWugSjna+ylpWpVxoLghsf8KfxtakWy1h+m4Qzmlw7g5MSG JrXEQ0f1LmiuOikGWEdI9QOVttZcHdoTN1x6gOfEM8nRANzqyXmhdRnNmNvihJHGMI E0S7vw2KNkq6y19tuOaU31FWtXNXGNZACBoNrH5nzdAlrc6fPmCXSszCjAxgVqvVWH 0RJVyB3Nxxt8VO8URBl0ZqEQf/2zOiFTKioRSe9owFOha+A5G3XWx5PIaG7IFb7vfb mHBLwfDTZrHISkx/ivHg6pF0Ra3+5vpPbCD78vgoiGxQ2p36391l9T88MudyR2bCER ngVAlUBMYcmIaLZqK9EwC1TSceNJhOsl6RE6UR8c6EvUdzJ611D0VkTqxZomIz2/6u 5Z7O50MFdAXVO2rBeikDp5opeAonpIlUOBPff3yFSwLdC6swbupyEGn0AJ32OylyQ8 kwc9ce4b/r8x6W+ieURWSHT4= Received: from localhost (unknown [146.70.134.132]) by wolfsden.cz (Postfix) with ESMTPSA id 212F62752B8; Sun, 29 Oct 2023 12:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698584327; bh=I7dFqfqFN9Nx+vNUDVHkkbNh51f0s2OAYya8WVCvDtA=; h=From:To:Cc:Subject:Date; b=sSm+y7OgWP/BqZd680B7NNJd2DwmDjCsLOSLYPDnr+Pj3vFZ+aQ+L8P4WXoPgrOud LQPUB7Rn/IQLxMjx5AJk+c6JodmrVcIS9y9mVhuxm9pdfbs4AmyMZb8llzRYAnzqF1 PLgsBwfJx8YAcc6kaQNZkdrTEQATdF4yO7HtWrJEp+Cgx8lZzZsC2FdhDAgM6cPwTS dv6VarnpBCg2mYXn+OBElYrTMSLca8XCHm1bnPhPc+Qj7d6HekBiIqDnk8GKIVp+xK 1HmEpPUrVYci9sGlqJI9+G1aI6JCAWcrpcBNg/6Ml1rPDuqGx92z4Vu5ha1DopuaXF 73ChjxZHJUnIUz9RKZBpDzh1KspB6BVN2XbzwUJZ6ZeLCjhrT2ZV0oZ1cBshfD9M/L zihBM4P4+A2DxJlPmvxEeHOYttBLAm9TpWg/C0Ao1XTkrTHAdgs2yJszP/qm6iYsOi Q/4fwXM46vsl9JWxf9NAdDIxnGUCALNHvD881jFZC+XT2zgV1NdNa+Ken5z+e7phQp di5nggaWS7+ZquhxWKSh9XAHXM7WGqU4FParbzB0SkpUNedLK/JnoT7v6gX+kBsBH3 jW8+n01EBI45o9ATbQiB1WH6gwhQYOdRyRZP4dXyZpeqP4ov/5FPTWYz//udx3mfrt 6ZMBv/xna66RUjUiaSjp5VPo= Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 2cea3e8c; Sun, 29 Oct 2023 12:58:44 +0000 (UTC) From: Tomas Volf Date: Sun, 29 Oct 2023 13:56:13 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: 4.40 X-Migadu-Queue-Id: C222F50382 X-Migadu-Spam-Score: 4.40 X-TUID: XhouV1NAbN0d The paths to .scm and .go files can be constructed given a guile version and a base directory. However it is few lines of code that needs to be copy&pasted. This new procedure returns both of them reducing the maintenance cost. * guix/build/guile-build-system.scm (target-guile-scm+go): New procedure. Change-Id: I58615f2cfe0ec1e58d3fbb47b738ed5dce1bb252 --- This procedure is handy both for executing tests on installed files in guile-build-system and to set environment variables in wrappers. guix/build/guile-build-system.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/guix/build/guile-build-system.scm b/guix/build/guile-build-system.scm index 32a431d347..e7e7f2d0be 100644 --- a/guix/build/guile-build-system.scm +++ b/guix/build/guile-build-system.scm @@ -28,6 +28,7 @@ (define-module (guix build guile-build-system) #:use-module (ice-9 format) #:use-module (guix build utils) #:export (target-guile-effective-version + target-guile-scm+go %standard-phases guile-build)) @@ -44,7 +45,17 @@ (define* (target-guile-effective-version #:optional guile) (string? line) line))) -(define (file-sans-extension file) ;TODO: factorize +(define* (target-guile-scm+go output #:optional guile) + "Return paths under `output' for scm and go files for effective version of +GUILE or whichever `guile' is in $PATH. Raises an error if they cannot be +determined." + (let* ((version (or (target-guile-effective-version guile) + (error "Cannot determine the effective target guile version."))) + (scm (string-append output "/share/guile/site/" version)) + (go (string-append output "/lib/guile/" version "/site-ccache"))) + (values scm go))) + +(define (file-sans-extension file) ;TODO: factorize "Return the substring of FILE without its extension, if any." (let ((dot (string-rindex file #\.))) (if dot base-commit: ac01fef9ff3efb48e60e80930743888b0e79be66 -- 2.41.0