From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elwtu-0006nz-Sc for guix-patches@gnu.org; Wed, 14 Feb 2018 08:15:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elwtq-0001BP-TV for guix-patches@gnu.org; Wed, 14 Feb 2018 08:15:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:34338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elwtq-0001BH-Pm for guix-patches@gnu.org; Wed, 14 Feb 2018 08:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1elwtq-0004b8-KJ for guix-patches@gnu.org; Wed, 14 Feb 2018 08:15:02 -0500 Subject: [bug#30433] [PATCH] gnu: Add epipe. Resent-Message-ID: From: Oleg Pykhalov References: <20180212074851.3515-1-go.wigust@gmail.com> <20180212193848.GA32133@jasmine.lan> Date: Wed, 14 Feb 2018 16:14:15 +0300 In-Reply-To: <20180212193848.GA32133@jasmine.lan> (Leo Famulari's message of "Mon, 12 Feb 2018 14:38:48 -0500") Message-ID: <874lmjiuhk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Leo Famulari Cc: 30433@debbugs.gnu.org --=-=-= Content-Type: text/plain Leo Famulari writes: > On Mon, Feb 12, 2018 at 10:48:51AM +0300, Oleg Pykhalov wrote: >> * gnu/packages/emacs.scm (epipe): New public variable. > > Thanks! Thank you for review. >> +(define-public epipe >> + (let ((commit "c966d549d5416fb92ecf4bd4a0a5a8fc9239e3af") >> + (revision "1")) >> + (package >> + (name "epipe") >> + (version (string-append "0.0.1" "-" revision "." >> + (string-take commit 7))) > > This commit corresponds to the upstream tag "0.1.0", so you can omit the > commit and revision variables, and just set the version to "0.1.0"... Maybe it's better to get a source via url-fetch from GitHub archive tarball? >> + (source (origin >> + (method git-fetch) >> + (uri (git-reference >> + (url "https://github.com/cute-jumper/epipe") >> + (commit commit))) > > ... and here use (commit version). OK. >> + (arguments >> + '(#:modules ((guix build utils)) >> + #:builder >> + (begin >> + (use-modules (guix build utils)) >> + ;; Copy source >> + (copy-recursively (assoc-ref %build-inputs "source") ".") >> + ;; Patch shebangs >> + (substitute* "epipe" >> + (("/usr/bin/env bash") >> + (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))) >> + (substitute* "epipe.pl" >> + (("/usr/bin/perl") >> + (string-append (assoc-ref %build-inputs "perl") "/bin/perl"))) >> + ;; Installation >> + (for-each (lambda (file) >> + (install-file file (string-append %output "/bin"))) >> + '("epipe" "epipe.pl")) >> + #t))) > > I think you could use the patch-shebang procedure from (guix build > utils), as in the package for woof. As I see only for Perl, because folling does nothing: --8<---------------cut here---------------start------------->8--- (patch-shebang "epipe" (list (string-append (assoc-ref %build-inputs "bash") "/bin"))) --8<---------------cut here---------------end--------------->8--- Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlqENicACgkQckbhHGm3 lWnlPw//Tf9Qqgp5YSpq7kWgJhAQUfLp5A2T6VN+9FKXNU/Efn1ieX1QthV8SZTU lgr8hpZQhn62a7XtC687Xc24G0VbEBet2WsFwuYooJ8bavZk+gTevLAtMeLoSKhd lWRj9fdFvze97PMpMZtoeQMylWAonpJHo15d8940spr52fp9CAApbUzujhWAVTD9 hBLyvjYLfK7OK2RACVQ9fG3SlnQvf4KzuqWr2tN/ONNsuxJdfX2WDCOOQoTjSH3w nuc2pEm5HuCoqprq7DYSd5roIuSN77rEVPWuST8ZN4pXygLSekulUp5uk4uo2JmR Ikt97zS0q6MQBWJ5S8NSVW5Aql+w5UrS8/K0S2tfqz0ifmiea2m09ir0to60Bue7 FtNxvPwHwjgN7CKmvRU1B175ugo0oRLBdBBozshgVrISGxiD5QK2RIw5yHWG+1OD 4XPMsjbwDQcKpz6H/hUyEUaQM5hxeh3M2sA+fmg8t9h6mxnNqop0n8nOv1PVqcHy ozzF9roPF/GxMhOjSz4BNYLo1QNmy5O6zLQXu2mAE5Yocp6UhM9QZsRtmwdkI2a0 THkl3Cmpf2C47U818TyruUSJfXGDuqgSNZ4ZNp0n2TUFWpdwYS6C687LHSTtn1pA G450suVu+oL2Q3+30fatv11he8q1IPA/iJpUDu/bvWSQaEVLXFA= =nSNa -----END PGP SIGNATURE----- --=-=-=--