From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH] gnu: Add Mr. Rescue. Date: Sun, 18 Sep 2016 19:33:14 +0800 Message-ID: <87h99dtpc5.fsf@member.fsf.org> References: <20160917132405.17071-1-iyzsong@gmail.com> <879cc18c-49e4-f1fe-e67f-b0bb2383010e@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blaLc-0006Zd-Jj for guix-devel@gnu.org; Sun, 18 Sep 2016 07:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blaLX-0007GV-HW for guix-devel@gnu.org; Sun, 18 Sep 2016 07:33:23 -0400 Received: from smtp14.openmailbox.org ([62.4.1.48]:41483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blaLX-0007G7-Bb for guix-devel@gnu.org; Sun, 18 Sep 2016 07:33:19 -0400 In-Reply-To: <879cc18c-49e4-f1fe-e67f-b0bb2383010e@crazy-compilers.com> (Hartmut Goebel's message of "Sun, 18 Sep 2016 11:07:06 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel@gnu.org Hartmut Goebel writes: > Am 17.09.2016 um 15:24 schrieb =E5=AE=8B=E6=96=87=E6=AD=A6: >> + (let* ((out (assoc-ref %outputs "out")) >> + (bindir (string-append out "/bin")) >> + (prog (string-append bindir "/mrrescue")) >> + (source (assoc-ref %build-inputs "source")) >> + (guile (string-append (assoc-ref %build-inputs "guile= ") >> + "/bin/guile")) >> + (love (string-append (assoc-ref %build-inputs "love") >> + "/bin/love"))) >> + (mkdir-p bindir) >> + (with-output-to-file prog >> + (lambda () >> + (format #t "#!~a --no-auto-compile~%!#~%" guile) >> + (write `(execl ,love "mrrescue" ,source)) >> + (newline))) > > This looks like you are creating a starter-script which is pointing to > the source. This will not work, since the source will not be installed > when installing the package. Yes, but it works. The source is referenced by the script, so it will be downloaded into the store. > > You want to > > - copy the source file into (string-append out "/share/" ,name) > > - create a starter script > > I also suggest using a shell-script as starter (instead of a guile > wrapper), since this is more natural for me. OK, both are fine to me.