(define-module (bloatrunner) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix git) #:use-module (guix build-system gnu) #:use-module (guix build guile-build-system) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages guile) #:use-module (gnu packages game-development) #:use-module (gnu packages pkg-config) ) (define vcs-file? ;; Return true if the given file is under version control. (or (git-predicate (dirname (dirname (current-source-directory)))) (const #t))) ;not in a Git checkout (define-public bloatrunner (package (name "bloatrunner") (version "0.1.0-git") ;; (source (git-checkout (url (dirname (current-filename))))) (source (local-file "../.." "guile-checkout" #:recursive? #t #:select? vcs-file?)) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0") #:phases (modify-phases %standard-phases ;; (replace 'bootstrap ;; (lambda _ ;; ;; The 'bootstrap' script lacks a shebang, leading to "Exec ;; ;; format error" with glibc 2.35. ;; (invoke "autoreconf" "-vfi"))) (add-after 'install-bin 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) ;; (use-modules (guix build guile-build-system)) ;; Wrap the 'gitile' command to refer to the right modules. (let* ((out (assoc-ref outputs "out")) (chickadee (assoc-ref inputs "guile-chickadee")) (deps (list out chickadee)) (guile (assoc-ref inputs "guile")) (effective (target-guile-effective-version)) (mods (string-drop-right ;drop trailing colon (string-join deps (string-append "/share/guile/site/" effective ":") 'suffix) 1)) (objs (string-drop-right (string-join deps (string-append "/lib/guile/" effective "/site-ccache:") 'suffix) 1))) (wrap-program (string-append out "/bin/bloatrunner") `("GUILE_LOAD_PATH" ":" prefix (,mods)) `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs))))))) )) (native-inputs (list autoconf automake pkg-config)) (inputs (list guile-3.0)) (propagated-inputs (list guile-chickadee)) (synopsis "Loderunner inspired game") (description "Small game written for the 2024 lisp game jam.") (home-page "https://www.snamellit.com/projects/bloatrunner.html") (license license:gpl3))) bloatrunner