looks like psyclpc is now reproducible! thx, ng0

This commit is contained in:
psyc://loupsycedyglgamf.onion/~lynX 2016-08-10 15:44:55 +00:00
parent daa2f57b71
commit 61cf9aa812
1 changed files with 101 additions and 0 deletions

etc/guix.scm Normal file
View File

@ -0,0 +1,101 @@
(ice-9 popen)
(ice-9 match)
(ice-9 rdelim)
(guix packages)
(guix build-system gnu)
(guix gexp)
((guix build utils) #:select (with-directory-excursion))
(gnu packages)
(gnu packages autotools)
(gnu packages bison)
(gnu packages compression)
(gnu packages gettext)
(gnu packages man)
(gnu packages pcre)
(gnu packages pkg-config)
(gnu packages tls)
(gnu packages version-control)
((guix licenses) #:prefix license:))
(define %source-dir (dirname (current-filename)))
(define git-file?
(let* ((pipe (with-directory-excursion %source-dir
(open-pipe* OPEN_READ "git" "ls-files")))
(files (let loop ((lines '()))
(match (read-line pipe)
((? eof-object?)
(reverse lines))
(loop (cons line lines))))))
(status (close-pipe pipe)))
(lambda (file stat)
(match (stat:type stat)
('directory #t)
((or 'regular 'symlink)
(any (cut string-suffix? <> file) files))
(_ #f)))))
(define psyclpc
(name "psyclpc")
(version (string-append "20160821-" "dev"))
(local-file %source-dir
#:recursive? #t))
;;#:select? git-file?))
(build-system gnu-build-system)
`(#:tests? #f ; There are no tests/checks.
"--enable-use-mccp" ; Mud Client Compression Protocol, leave this enabled.
(string-append "--prefix="
(assoc-ref %outputs "out"))
;; src/Makefile: Set MUD_LIB to the directory which contains
;; the mud data. defaults to MUD_LIB = @libdir@
(string-append "--libdir="
(assoc-ref %outputs "out")
(string-append "--bindir="
(assoc-ref %outputs "out")
;; src/Makefile: Set ERQ_DIR to directory which contains the
;; stuff which ERQ can execute (hopefully) savely. Was formerly
;; defined in config.h. defaults to ERQ_DIR= @libexecdir@
(string-append "--libexecdir="
(assoc-ref %outputs "out")
(modify-phases %standard-phases
(add-before 'configure 'chdir-to-src
;; We need to pass this as env variables
;; and manually change the directory.
(lambda _
(chdir "src"))))
;;(setenv "CONFIG_SHELL" (which "sh"))
;;(setenv "SHELL" (which "sh")))))
#:make-flags (list "install-all")))
`(("zlib" ,zlib)
("openssl" ,openssl)
("pcre" ,pcre)))
`(("pkg-config" ,pkg-config)
("bison" ,bison)
("gnu-gettext" ,gnu-gettext)
("help2man" ,help2man)
("autoconf" ,autoconf)
("automake" ,automake)))
(home-page "http://lpc.psyc.eu/")
(synopsis "Multi-user network server programming language")
"LPC is a bytecode language, invented to specifically implement
multi user virtual environments on the internet. This technology is used for
MUDs and also the psyced implementation of the Protocol for SYnchronous Conferencing
(PSYC). psycLPC is a fork of LDMud with some new features and many bug fixes.")
(license license:gpl2)))