From 61cf9aa81297085e5c40170fd01221c752f8deba Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Wed, 10 Aug 2016 15:44:55 +0000 Subject: [PATCH] looks like psyclpc is now reproducible! thx, ng0 --- etc/guix.scm | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 etc/guix.scm diff --git a/etc/guix.scm b/etc/guix.scm new file mode 100644 index 0000000..07bf8c9 --- /dev/null +++ b/etc/guix.scm @@ -0,0 +1,101 @@ +(use-modules + (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)) + (line + (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 + (package + (name "psyclpc") + (version (string-append "20160821-" "dev")) + (source + (local-file %source-dir + #:recursive? #t)) + ;;#:select? git-file?)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There are no tests/checks. + #:configure-flags + (list + "--enable-use-tls=yes" + "--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") + "/opt/psyced/world") + (string-append "--bindir=" + (assoc-ref %outputs "out") + "/opt/psyced/bin") + ;; 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") + "/opt/psyced/run")) + #:phases + (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"))) + (inputs + `(("zlib" ,zlib) + ("openssl" ,openssl) + ("pcre" ,pcre))) + (native-inputs + `(("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") + (description + "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))) + +psyclpc