1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages psyc)
20 #:use-module (guix download)
21 #:use-module (guix git-download)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix build-system perl)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages admin)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages bison)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages gettext)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages man)
34 #:use-module (gnu packages ncurses)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pcre)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages tls)
39 #:use-module (gnu packages web))
41 (define-public perl-net-psyc
43 (name "perl-net-psyc")
48 (uri (string-append "http://perlpsyc.psyc.eu/"
49 "perlpsyc-" version ".zip"))
50 (file-name (string-append name "-" version ".zip"))
53 "1lw6807qrbmvzbrjn1rna1dhir2k70xpcjvyjn45y35hav333a42"))
54 ;; psycmp3 currently depends on MP3::List and rxaudio (shareware),
55 ;; we can add it back when this is no longer the case.
56 (snippet '(delete-file "contrib/psycmp3"))))
57 (build-system perl-build-system)
59 `(("perl-curses" ,perl-curses)
60 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
63 (modify-phases %standard-phases
64 (delete 'configure) ; No configure script
65 ;; There is a Makefile, but it does not install everything
66 ;; (leaves out psycion) and says
67 ;; "# Just to give you a rough idea". XXX: Fix it upstream.
70 (zero? (system* "make" "manuals"))))
72 (lambda* (#:key outputs #:allow-other-keys)
73 (let* ((out (assoc-ref outputs "out"))
74 (doc (string-append out "/share/doc/perl-net-psyc"))
75 (man1 (string-append out "/share/man/man1"))
76 (man3 (string-append out "/share/man/man3"))
77 (bin (string-append out "/bin"))
78 (libpsyc (string-append out "/lib/psyc/ion"))
79 (libperl (string-append out "/lib/perl5/site_perl/"
80 ,(package-version perl))))
82 (copy-recursively "lib/perl5" libperl)
83 (copy-recursively "lib/psycion" libpsyc)
84 (copy-recursively "bin" bin)
85 (install-file "cgi/psycpager" (string-append doc "/cgi"))
86 (copy-recursively "contrib" (string-append doc "/contrib"))
87 (copy-recursively "hooks" (string-append doc "/hooks"))
88 (copy-recursively "sdj" (string-append doc "/sdj"))
89 (install-file "README.txt" doc)
90 (install-file "TODO.txt" doc)
91 (copy-recursively "share/man/man1" man1)
92 (copy-recursively "share/man/man3" man3)
94 (add-after 'install 'wrap-programs
95 (lambda* (#:key outputs #:allow-other-keys)
96 ;; Make sure all executables in "bin" find the Perl modules
97 ;; provided by this package at runtime.
98 (let* ((out (assoc-ref outputs "out"))
99 (bin (string-append out "/bin/"))
100 (path (getenv "PERL5LIB")))
101 (for-each (lambda (file)
103 `("PERL5LIB" ":" prefix (,path))))
104 (find-files bin "\\.*$"))
107 "@code{Net::PSYC} with support for TCP, UDP, Event.pm, @code{IO::Select} and
108 Gtk2 event loops. This package includes 12 applications and additional scripts:
109 psycion (a @uref{http://about.psyc.eu,PSYC} chat client), remotor (a control console
110 for @uref{https://torproject.org,tor} router) and many more.")
111 (synopsis "Perl implementation of PSYC protocol")
112 (home-page "http://perlpsyc.psyc.eu/")
113 (license (list license:gpl2
114 (package-license perl)
115 ;; contrib/irssi-psyc.pl:
116 license:public-domain
117 ;; bin/psycplay states AGPL with no version:
120 (define-public libpsyc
126 (uri (string-append "http://www.psyced.org/files/"
127 name "-" version ".tar.xz"))
130 "14q89fxap05ajkfn20rnhc6b1h4i3i2adyr7y6hs5zqwb2lcmc1p"))))
131 (build-system gnu-build-system)
139 (string-append "PREFIX=" (assoc-ref %outputs "out")))
141 (modify-phases %standard-phases
142 ;; The rust bindings are the only ones in use, the lpc bindings
143 ;; are in psyclpc. The other bindings are not used by anything,
144 ;; the chances are high that the bindings do not even work,
145 ;; therefore we do not include them.
146 ;; TODO: Get a cargo build system in Guix.
147 (delete 'configure)))) ; no configure script
148 (home-page "http://about.psyc.eu/libpsyc")
150 "@code{libpsyc} is a PSYC library in C which implements
151 core aspects of PSYC, useful for all kinds of clients and servers
153 (synopsis "PSYC library in C")
154 (license license:agpl3+)))
156 ;; This commit removes the historic bundled pcre, not released as a tarball so far.
157 (define-public psyclpc
158 (let* ((commit "8bd51f2a4847860ba8b82dc79348ab37d516011e")
162 (version (string-append "20160821-" revision "." (string-take commit 7)))
166 (url "git://git.psyced.org/git/psyclpc")
168 (file-name (string-append name "-" version "-checkout"))
171 "10w4kx9ygcv1lcmd7j4knvjiy8dac1y3hjfv3lhp67jpv6w3iagz"))))
172 (build-system gnu-build-system)
174 `(#:tests? #f ; There are no tests/checks.
176 ;; If you have questions about this part, look at
177 ;; "src/settings/psyced" and the ebuild.
179 "--enable-use-tls=yes"
180 "--enable-use-mccp" ; Mud Client Compression Protocol, leave this enabled.
181 (string-append "--prefix="
182 (assoc-ref %outputs "out"))
183 ;; src/Makefile: Set MUD_LIB to the directory which contains
184 ;; the mud data. defaults to MUD_LIB = @libdir@
185 (string-append "--libdir="
186 (assoc-ref %outputs "out")
188 (string-append "--bindir="
189 (assoc-ref %outputs "out")
191 ;; src/Makefile: Set ERQ_DIR to directory which contains the
192 ;; stuff which ERQ can execute (hopefully) savely. Was formerly
193 ;; defined in config.h. defaults to ERQ_DIR= @libexecdir@
194 (string-append "--libexecdir="
195 (assoc-ref %outputs "out")
198 (modify-phases %standard-phases
199 (add-before 'configure 'chdir-to-src
200 ;; We need to pass this as env variables
201 ;; and manually change the directory.
204 (setenv "CONFIG_SHELL" (which "sh"))
205 (setenv "SHELL" (which "sh"))
207 #:make-flags (list "install-all")))
213 `(("pkg-config" ,pkg-config)
215 ("gettext" ,gettext-minimal)
216 ("help2man" ,help2man)
217 ("autoconf" ,autoconf)
218 ("automake" ,automake)))
219 (home-page "http://lpc.psyc.eu/")
220 (synopsis "psycLPC is a multi-user network server programming language")
222 "LPC is a bytecode language, invented to specifically implement
223 multi user virtual environments on the internet. This technology is used for
224 MUDs and also the psyced implementation of the Protocol for SYnchronous
225 Conferencing (PSYC). psycLPC is a fork of LDMud with some new features and
227 (license license:gpl2))))