From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fl9p4-0005wv-O4 for guix-patches@gnu.org; Thu, 02 Aug 2018 05:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fl9p0-0003s5-Os for guix-patches@gnu.org; Thu, 02 Aug 2018 05:23:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fl9p0-0003rr-JF for guix-patches@gnu.org; Thu, 02 Aug 2018 05:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fl9p0-0000V1-9J for guix-patches@gnu.org; Thu, 02 Aug 2018 05:23:02 -0400 Subject: [bug#29951] [PATCH] WIP guix: Add wrap-script. Resent-Message-ID: Date: Thu, 2 Aug 2018 09:22:55 +0000 From: Nils Gillmann Message-ID: <20180802092255.hmdu5p3a5y7wbm37@abyayala> References: <20180102204434.2716-1-rekado@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Jelle Licht Cc: Ricardo Wurmus , h.goebel@crazy-compilers.com, 29951@debbugs.gnu.org Jelle Licht transcribed 4.1K bytes: > 2018-01-02 21:44 GMT+01:00 Ricardo Wurmus : > > > * guix/build/utils.scm (wrap-script): New procedure. > > --- > > guix/build/utils.scm | 101 ++++++++++++++++++++++++++++++ > > +++++++++++++++++++++ > > 1 file changed, 101 insertions(+) > > > > diff --git a/guix/build/utils.scm b/guix/build/utils.scm > > index 7391307c8..a2efcb31c 100644 > > --- a/guix/build/utils.scm > > +++ b/guix/build/utils.scm > > @@ -3,6 +3,7 @@ > > ;;; Copyright © 2013 Andreas Enge > > ;;; Copyright © 2013 Nikita Karetnikov > > ;;; Copyright © 2015 Mark H Weaver > > +;;; Copyright © 2018 Ricardo Wurmus > > ;;; > > ;;; This file is part of GNU Guix. > > ;;; > > @@ -84,6 +85,7 @@ > > fold-port-matches > > remove-store-references > > wrap-program > > + wrap-script > > invoke > > > > locale-category->string)) > > @@ -1068,6 +1070,105 @@ with definitions for VARS." > > (chmod prog-tmp #o755) > > > > [...] > > > (rename-file prog-tmp prog)))) > > > > +(define wrap-script > > + (let ((interpreter-regex > > + (make-regexp > > + (string-append "^#! ?(/bin/sh|/gnu/store/[^/]+/bin/(" > > > > Won't this be an issue for people using a customized store location? Can't we make this substitutable at configure time? > [snipped] > >