From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: syntax check before commit and patch: net-perl-psyc Date: Tue, 14 Jun 2016 12:10:05 +0200 Message-ID: <877fdshyiq.fsf@gnu.org> References: <20160613140750.GA11984@khazad-dum> 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]:36211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bClIR-0004QD-Us for guix-devel@gnu.org; Tue, 14 Jun 2016 06:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bClIO-00010d-MD for guix-devel@gnu.org; Tue, 14 Jun 2016 06:10:11 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bClIO-0000zM-JE for guix-devel@gnu.org; Tue, 14 Jun 2016 06:10:08 -0400 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:60180 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bClIM-0000vY-OH for guix-devel@gnu.org; Tue, 14 Jun 2016 06:10:07 -0400 In-Reply-To: <20160613140750.GA11984@khazad-dum> (ng0@we.make.ritual.n0.is's message of "Mon, 13 Jun 2016 14:07:50 +0000") 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: guix-devel@gnu.org Hello! ng0 skribis: > the following is an insert minus the header etc of > net-perl-psyc. Before I commit and send in a patch, I'd > like to check if there's anything I can improve. Overall it looks good! > (replace > 'install > (lambda* (#:key outputs #:allow-other-keys) > (let* ((out (assoc-ref outputs "out")) > (doc (string-append out "/share/doc/perl-net-psyc")) > (libpsyc (string-append out "/lib/psyc/ion")) > (libperl (string-append out "/lib/perl5/site_perl/" > ,(package-version perl))) > (bin (string-append out "/bin"))) > (copy-recursively "lib/perl5" libperl) > (copy-recursively "lib/psycion" libpsyc) > (copy-recursively "bin" bin) > (install-file "cgi/psycpager" (string-append doc "/cgi")) > (copy-recursively "contrib" (string-append doc "/contrib"= )) > (copy-recursively "hooks" (string-append doc "/hooks")) > (copy-recursively "sdj" (string-append doc "/sdj")) > (install-file "README.txt" doc) > (install-file "TODO.txt" doc) > #t))) Doesn=E2=80=99t =E2=80=9C./Build install=E2=80=9D do that? (This is what = =E2=80=98perl-build-system=E2=80=99 does, see (guix build perl-build-system).) > (add-after 'install 'wrap-programs > (lambda* (#:key outputs #:allow-other-keys) > ;; Make sure all executables in "bin" find the Pe= rl modules > ;; provided by this package at runtime. > (let* ((out (assoc-ref outputs "out")) > (bin (string-append out "/bin/")) > (path (string-append out "/lib/perl5/site_= perl"))) > (for-each (lambda (file) > (wrap-program file > `("PERL5LIB" ":" prefix (,path)))) > (find-files bin "\\.*$")) > ;; XXX: hooks/dpa2psyc,examples/{recvtest,sendt= est}, > ;; cgi/psycpager,contrib/{makenoise,keefchat > ;; contrib/MovableTypeBlog/plugins/psyc.pl > #t)))))) This reminds me that we should eventually update =E2=80=98perl-build-system= =E2=80=99 to have a =E2=80=98wrap=E2=80=99 phase similar to that of =E2=80=98python-buil= d-system=E2=80=99. Thanks, Ludo=E2=80=99.