96 lines
3.3 KiB
Scheme
96 lines
3.3 KiB
Scheme
(use-modules
|
|
(guix packages)
|
|
((guix licenses) #:prefix license:)
|
|
(guix download)
|
|
(guix build-system gnu)
|
|
(guix gexp)
|
|
(gnu packages)
|
|
(gnu packages autotools)
|
|
(gnu packages guile)
|
|
(gnu packages guile-xyz)
|
|
(gnu packages pkg-config)
|
|
(gnu packages texinfo)
|
|
(srfi srfi-1))
|
|
|
|
(define (keep-file? file stat)
|
|
(not (any (lambda (my-string)
|
|
(string-contains file my-string))
|
|
(list ".git" ".dir-locals.el" "guix.scm"))))
|
|
|
|
(package
|
|
(name "gib-gab-gob")
|
|
(version "0.1")
|
|
(source (local-file (dirname (current-filename))
|
|
#:recursive? #t
|
|
#:select? keep-file?))
|
|
(build-system gnu-build-system)
|
|
(arguments
|
|
`(#:modules
|
|
((ice-9 match)
|
|
(ice-9 ftw)
|
|
,@%gnu-build-system-modules)
|
|
#:phases
|
|
(modify-phases
|
|
%standard-phases
|
|
(add-after
|
|
'install
|
|
'hall-wrap-binaries
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
(let* ((compiled-dir
|
|
(lambda (out version)
|
|
(string-append
|
|
out
|
|
"/lib/guile/"
|
|
version
|
|
"/site-ccache")))
|
|
(uncompiled-dir
|
|
(lambda (out version)
|
|
(string-append
|
|
out
|
|
"/share/guile/site"
|
|
(if (string-null? version) "" "/")
|
|
version)))
|
|
(dep-path
|
|
(lambda (env modules path)
|
|
(list env
|
|
":"
|
|
'prefix
|
|
(cons modules
|
|
(map (lambda (input)
|
|
(string-append
|
|
(assoc-ref inputs input)
|
|
path))
|
|
,''("guile-goblins"))))))
|
|
(out (assoc-ref outputs "out"))
|
|
(bin (string-append out "/bin/"))
|
|
(site (uncompiled-dir out "")))
|
|
(match (scandir site)
|
|
(("." ".." version)
|
|
(for-each
|
|
(lambda (file)
|
|
(wrap-program
|
|
(string-append bin file)
|
|
(dep-path
|
|
"GUILE_LOAD_PATH"
|
|
(uncompiled-dir out version)
|
|
(uncompiled-dir "" version))
|
|
(dep-path
|
|
"GUILE_LOAD_COMPILED_PATH"
|
|
(compiled-dir out version)
|
|
(compiled-dir "" version))))
|
|
,''("make-joiner" "make-initiator"))
|
|
#t))))))))
|
|
(native-inputs
|
|
`(("autoconf" ,autoconf)
|
|
("automake" ,automake)
|
|
("pkg-config" ,pkg-config)
|
|
("texinfo" ,texinfo)))
|
|
(inputs `(("guile" ,guile-3.0)))
|
|
(propagated-inputs
|
|
`(("guile-goblins" ,guile-goblins)))
|
|
(synopsis
|
|
"Rock Paper Scissors and Tic Tac Toe in Goblins!")
|
|
(description
|
|
"This project demonstrates both Rock Paper Scissors and Tic Tac Toe in Goblins!")
|
|
(home-page "https://solarpunk.moe")
|
|
(license license:gpl3+))
|