From patchwork Tue Aug 24 20:33:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 32245 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AD7DB27BC82; Tue, 24 Aug 2021 21:34:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3742127BC78 for ; Tue, 24 Aug 2021 21:34:14 +0100 (BST) Received: from localhost ([::1]:48782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mId7d-00047j-AL for patchwork@mira.cbaines.net; Tue, 24 Aug 2021 16:34:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mId7S-00046x-S2 for guix-patches@gnu.org; Tue, 24 Aug 2021 16:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mId7S-0003fe-Kn for guix-patches@gnu.org; Tue, 24 Aug 2021 16:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mId7S-0008S8-GF for guix-patches@gnu.org; Tue, 24 Aug 2021 16:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#46885] [PATCH v2 1/2] gnu: artanis: Remove hard-coded guile effective version. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Aug 2021 20:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: Arun Isaac , 46885@debbugs.gnu.org Received: via spool by 46885-submit@debbugs.gnu.org id=B46885.162983720132425 (code B ref 46885); Tue, 24 Aug 2021 20:34:02 +0000 Received: (at 46885) by debbugs.gnu.org; 24 Aug 2021 20:33:21 +0000 Received: from localhost ([127.0.0.1]:45302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mId6i-0008Qc-DK for submit@debbugs.gnu.org; Tue, 24 Aug 2021 16:33:20 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:46306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mId6f-0008QK-CZ for 46885@debbugs.gnu.org; Tue, 24 Aug 2021 16:33:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BkjW8yiz4tec2zj+pf6Fn7OFMPN8Fgv3lGfRACEDufU=; b=W5xLJkdf9dHbSapKQyH6/lgCJ7 gTeAVgd7/rQlCDmeoH7b3HLApb3Sc4vKx0/rl3V0KOk9AYKOBh5qZDPjpH1KIguKhmXQQAkMkxcHM xoKBycR8UJs0DGYp593jjJtTJY14Qe6i7ZWHBKBHPpArBfn8BiVsSlXKl68qmqCQq3G6vuJwA0ciC 58ZDDxA8pflax+rYJGYh/Gv6b9qj/CUev0rABIxl2QqZ0/vdux52fuL2RDGmBXPwDZaGpZv43mGu0 fvKDzitOVanF85y+lwDjuCQw4vrb2glIM48ckna822H+O2XeEa2WUr9VeOSFuaCH1VczJVoGH/xIP q1Gq1lCg==; Received: from [192.168.2.1] (port=5698 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mId6c-000JIt-Eq; Wed, 25 Aug 2021 02:03:10 +0530 From: Arun Isaac Date: Wed, 25 Aug 2021 02:03:07 +0530 Message-Id: <20210824203308.8402-2-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <87k0q5xyau.fsf@gnu.org> References: <87k0q5xyau.fsf@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (artanis)[arguments]: Import target-guile-effective-version from (guix build guile-build-system). Use target-guile-effective-version to determine the guile effective version. --- gnu/packages/guile-xyz.scm | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index db31ada7b9..5f457d8ae4 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2017 Nikita ;;; Copyright © 2017, 2018, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2021 Maxim Cournoyer -;;; Copyright © 2018, 2019, 2020 Arun Isaac +;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2019 swedebugia @@ -182,11 +182,20 @@ ("pkgconfig" ,pkg-config) ("util-linux" ,util-linux))) ;for the `script' command (arguments - '(#:make-flags + `(#:modules (((guix build guile-build-system) + #:select (target-guile-effective-version)) + ,@%gnu-build-system-modules) + #:imported-modules ((guix build guile-build-system) + ,@%gnu-build-system-modules) + #:make-flags ;; TODO: The documentation must be built with the `docs' target. (let* ((out (assoc-ref %outputs "out")) - (scm (string-append out "/share/guile/site/2.2")) - (go (string-append out "/lib/guile/2.2/site-ccache"))) + ;; We pass guile explicitly here since this executes before the + ;; set-paths phase and therefore guile is not yet in PATH. + (effective-version (target-guile-effective-version + (assoc-ref %build-inputs "guile"))) + (scm (string-append out "/share/guile/site/" effective-version)) + (go (string-append out "/lib/guile/" effective-version "/site-ccache"))) ;; Don't use (%site-dir) for site paths. (list (string-append "MOD_PATH=" scm) (string-append "MOD_COMPILED_PATH=" go))) @@ -199,7 +208,9 @@ (("\\(%site-dir\\)") (string-append "\"" (assoc-ref outputs "out") - "/share/guile/site/2.2\""))))) + "/share/guile/site/" + (target-guile-effective-version) + "\""))))) (add-after 'unpack 'patch-reference-to-libnss (lambda* (#:key inputs #:allow-other-keys) (substitute* "artanis/security/nss.scm" @@ -221,9 +232,11 @@ (add-after 'install 'wrap-art (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) + (effective-version (target-guile-effective-version)) (bin (string-append out "/bin")) - (scm (string-append out "/share/guile/site/2.2")) - (go (string-append out "/lib/guile/2.2/site-ccache"))) + (scm (string-append out "/share/guile/site/" effective-version)) + (go (string-append out "/lib/guile/" effective-version + "/site-ccache"))) (wrap-program (string-append bin "/art") `("GUILE_LOAD_PATH" ":" prefix (,scm ,(getenv "GUILE_LOAD_PATH")))