1
0
Fork 0
mirror of git://git.psyced.org/git/psyclpc synced 2024-08-15 03:20:16 +00:00
psyclpc/etc/guix.scm

102 lines
3.4 KiB
Scheme
Raw Normal View History

(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