* Re: syntax check before commit and patch: net-perl-psyc
2016-06-13 14:07 syntax check before commit and patch: net-perl-psyc ng0
@ 2016-06-14 10:10 ` Ludovic Courtès
2016-06-14 12:39 ` ng0
2016-06-14 14:56 ` [PATCH] " ng0
1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-06-14 10:10 UTC (permalink / raw)
To: guix-devel
Hello!
ng0 <ng0@we.make.ritual.n0.is> 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’t “./Build install” do that? (This is what ‘perl-build-system’
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 Perl 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,sendtest},
> ;; cgi/psycpager,contrib/{makenoise,keefchat
> ;; contrib/MovableTypeBlog/plugins/psyc.pl
> #t))))))
This reminds me that we should eventually update ‘perl-build-system’ to
have a ‘wrap’ phase similar to that of ‘python-build-system’.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Re: syntax check before commit and patch: net-perl-psyc
2016-06-13 14:07 syntax check before commit and patch: net-perl-psyc ng0
2016-06-14 10:10 ` Ludovic Courtès
@ 2016-06-14 14:56 ` ng0
2016-06-15 13:11 ` Ludovic Courtès
1 sibling, 1 reply; 6+ messages in thread
From: ng0 @ 2016-06-14 14:56 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 4879 bytes --]
From 771d300cd6f195720e782464ce7a7328edcf566f Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 14 Jun 2016 14:52:52 +0000
Subject: [PATCH] gnu: Add perl-net-psyc.
* gnu/packages/perl.scm (perl-net-psyc): New Variable.
---
gnu/packages/perl.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e7e7967..c16a913 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl))
@@ -3865,6 +3867,73 @@ cycle. Functions called in the package itself will still be bound by their
name, but they won't show up as methods on your class or instances.")
(license (package-license perl))))
+;; highly optional dependencies: rxaudio (mp3 binary from 1996)
+;; opt. perl: MP3::List (psycmp3), Curses (psycion), pwd.pl
+;; (psyccmd), SGI::FAM module (psycfilemonitor); for full
+;; functionality package all except MP3::List.
+(define-public perl-net-psyc
+ (let ((commit "4176f5236e73e99391c0877152d5596ab0a9b154"))
+ (package
+ (name "perl-net-psyc")
+ (version (string-append "1.0" "-"
+ (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.psyced.org/git/perlpsyc")
+ (commit commit)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "19msvr1kriqa6n8cnk8z96xd5i0v5cy2y52jsj08vaj79b4m7sph"))))
+ (build-system perl-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (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)))
+ (add-after 'install 'wrap-programs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make sure all executables in "bin" find the Perl 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,sendtest},
+ ;; cgi/psycpager,contrib/{makenoise,keefchat
+ ;; contrib/MovableTypeBlog/plugins/psyc.pl
+ #t))))))
+ (description
+ "Perl implementation of PSYC protocol plus psycion, remotor, psycmp3 etc.")
+ (synopsis
+ "Perl implementation of PSYC protocol plus psycion, remotor, psycmp3 etc.")
+ (home-page "http://perlpsyc.pages.de")
+ ;;dual licensed: gpl2+ Artistic
+ (license (list gpl2+ (package-license perl))))))
+
(define-public perl-number-compare
(package
(name "perl-number-compare")
--
2.8.4
[-- Attachment #1.2: 0001-gnu-Add-perl-net-psyc.patch --]
[-- Type: text/x-diff, Size: 4884 bytes --]
From 771d300cd6f195720e782464ce7a7328edcf566f Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 14 Jun 2016 14:52:52 +0000
Subject: [PATCH] gnu: Add perl-net-psyc.
* gnu/packages/perl.scm (perl-net-psyc): New Variable.
---
gnu/packages/perl.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e7e7967..c16a913 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl))
@@ -3865,6 +3867,73 @@ cycle. Functions called in the package itself will still be bound by their
name, but they won't show up as methods on your class or instances.")
(license (package-license perl))))
+;; highly optional dependencies: rxaudio (mp3 binary from 1996)
+;; opt. perl: MP3::List (psycmp3), Curses (psycion), pwd.pl
+;; (psyccmd), SGI::FAM module (psycfilemonitor); for full
+;; functionality package all except MP3::List.
+(define-public perl-net-psyc
+ (let ((commit "4176f5236e73e99391c0877152d5596ab0a9b154"))
+ (package
+ (name "perl-net-psyc")
+ (version (string-append "1.0" "-"
+ (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.psyced.org/git/perlpsyc")
+ (commit commit)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "19msvr1kriqa6n8cnk8z96xd5i0v5cy2y52jsj08vaj79b4m7sph"))))
+ (build-system perl-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (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)))
+ (add-after 'install 'wrap-programs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make sure all executables in "bin" find the Perl 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,sendtest},
+ ;; cgi/psycpager,contrib/{makenoise,keefchat
+ ;; contrib/MovableTypeBlog/plugins/psyc.pl
+ #t))))))
+ (description
+ "Perl implementation of PSYC protocol plus psycion, remotor, psycmp3 etc.")
+ (synopsis
+ "Perl implementation of PSYC protocol plus psycion, remotor, psycmp3 etc.")
+ (home-page "http://perlpsyc.pages.de")
+ ;;dual licensed: gpl2+ Artistic
+ (license (list gpl2+ (package-license perl))))))
+
(define-public perl-number-compare
(package
(name "perl-number-compare")
--
2.8.4
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread