From patchwork Tue May 19 04:14:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jack Hill X-Patchwork-Id: 22203 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 8511727BBE3; Tue, 19 May 2020 05:15:08 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 ESMTP id 31BC327BBE1 for ; Tue, 19 May 2020 05:15:08 +0100 (BST) Received: from localhost ([::1]:37472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jatel-0001TX-MP for patchwork@mira.cbaines.net; Tue, 19 May 2020 00:15:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jateg-0001TO-EU for guix-patches@gnu.org; Tue, 19 May 2020 00:15:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jateg-0006mA-4v for guix-patches@gnu.org; Tue, 19 May 2020 00:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jateg-0005Ry-0K for guix-patches@gnu.org; Tue, 19 May 2020 00:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41389] [PATCH] gnu: guile-dsv: Wrap script. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 May 2020 04:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41389 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41389@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158986167620880 (code B ref -1); Tue, 19 May 2020 04:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 May 2020 04:14:36 +0000 Received: from localhost ([127.0.0.1]:48883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jateE-0005Qg-Tg for submit@debbugs.gnu.org; Tue, 19 May 2020 00:14:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:36540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jateD-0005QX-Qq for submit@debbugs.gnu.org; Tue, 19 May 2020 00:14:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jateD-0001Ry-LU for guix-patches@gnu.org; Tue, 19 May 2020 00:14:33 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:52142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jateC-0006jj-CH for guix-patches@gnu.org; Tue, 19 May 2020 00:14:33 -0400 Received: from [2001:470:8:9f5:f948:e83a:c72a:f39b] (helo=alperton.home.eronel.org) by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jateB-0000Jd-Dt for guix-patches@gnu.org; Tue, 19 May 2020 00:14:31 -0400 From: Jack Hill Date: Tue, 19 May 2020 00:14:21 -0400 Message-Id: <20200519041421.10704-1-jackhill@jackhill.us> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=104.248.1.95; envelope-from=jackhill@jackhill.us; helo=minsky.hcoop.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/19 00:14:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program" phase. --- gnu/packages/guile-xyz.scm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 674b1f922b..ee2e44653e 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2019 Timothy Sample ;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2020 Evan Straw +;;; Copyright © 2020 Jack Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -467,7 +468,9 @@ you send to a FIFO file.") (inputs `(("guile" ,guile-2.2))) (propagated-inputs `(("guile2.2-lib" ,guile2.2-lib))) (arguments - '(#:phases (modify-phases %standard-phases + `(#:modules ((ice-9 match) (ice-9 ftw) + ,@%gnu-build-system-modules) + #:phases (modify-phases %standard-phases (add-before 'configure 'set-guilesitedir (lambda _ (substitute* "Makefile.in" @@ -482,6 +485,28 @@ $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) (("^guilesitedir =.*$") "guilesitedir = \ $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) + #t)) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (site (string-append out "/share/guile/site")) + (guile-lib (assoc-ref inputs "guile2.2-lib"))) + (match (scandir site) + (("." ".." version) + (let ((modules (string-append site "/" version)) + (compiled-modules (string-append + out "/lib/guile/" version + "/site-ccache"))) + (wrap-program (string-append bin "/dsv") + `("GUILE_LOAD_PATH" prefix + (,modules + ,(string-append guile-lib "/share/guile/site"))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,compiled-modules + ,(string-append guile-lib "/lib/guile/" + version + "/site-ccache")))))))) #t))))) (home-page "https://github.com/artyom-poptsov/guile-dsv") (synopsis "DSV module for Guile")