From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Toward 0.2 Date: Mon, 18 Feb 2013 11:26:34 +0100 Message-ID: <87y5el6hph.fsf@gnu.org> References: <877gm7f01v.fsf@gnu.org> <87obfigz7g.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7OB0-0001cJ-UD for bug-guix@gnu.org; Mon, 18 Feb 2013 05:42:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7Nvp-0005ll-Hv for bug-guix@gnu.org; Mon, 18 Feb 2013 05:26:54 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=48213 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Nvp-0005hc-9u for bug-guix@gnu.org; Mon, 18 Feb 2013 05:26:45 -0500 In-Reply-To: <87obfigz7g.fsf@karetnikov.org> (Nikita Karetnikov's message of "Sun, 17 Feb 2013 20:58:20 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov skribis: > I guess that I can implement this one: > > ** Add equivalent to Nixpkgs's =E2=80=98wrapProgram=E2=80=99 > > What's the purpose of 'wrapProgram'? Could you elaborate? Here=E2=80=99s an example from the Guile expression in Nixpkgs: wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" What it does is that it renames guile-snarf to .guile-snarf-real, and makes guile-snarf a wrapper around the real one, like this: #!/bin/sh export PATH=3D"/nix/store/...-gawk/bin:$PATH" exec ./.guile-snarf-real "$@" This is useful for scripts that expect particular programs to be in $PATH, for programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or modules in $GUILE_LOAD_PATH, etc. The source for Nixpkgs=E2=80=99s =E2=80=98wrapProgram=E2=80=99 is at: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hoo= ks/make-wrapper.sh In our case, the equivalent would be a procedure in (guix build utils). The generated wrapper would probably still be a Bash script as above. Thanks! Ludo=E2=80=99.