bundling app
This commit is contained in:
parent
e82381e39f
commit
dd6b56bcb7
6 changed files with 46 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -12,3 +12,5 @@
|
||||||
/*.log
|
/*.log
|
||||||
/.envrc
|
/.envrc
|
||||||
/gnu/
|
/gnu/
|
||||||
|
/bloatrunner
|
||||||
|
/*.tar.gz
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix git)
|
#:use-module (guix git)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build guile-build-system)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
|
@ -31,7 +32,40 @@
|
||||||
#:select? vcs-file?))
|
#:select? vcs-file?))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:make-flags '("GUILE_AUTO_COMPILE=0")))
|
'(#: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
|
(native-inputs
|
||||||
(list autoconf automake pkg-config))
|
(list autoconf automake pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
|
|
|
@ -10,7 +10,10 @@ nobase_go_DATA = $(GOBJECTS)
|
||||||
guile_install_go_files = install-nobase_goDATA
|
guile_install_go_files = install-nobase_goDATA
|
||||||
$(guile_install_go_files): install-nobase_modDATA
|
$(guile_install_go_files): install-nobase_modDATA
|
||||||
|
|
||||||
CLEANFILES = $(GOBJECTS)
|
bin_SCRIPTS = bloatrunner
|
||||||
|
CLEANFILES = $(bin_SCRIPTS) \
|
||||||
|
$(GOBJECTS)
|
||||||
|
|
||||||
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
|
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
|
||||||
SUFFIXES = .scm .go
|
SUFFIXES = .scm .go
|
||||||
.scm.go:
|
.scm.go:
|
||||||
|
@ -39,3 +42,5 @@ EXTRA_DIST = \
|
||||||
$(SOURCES) \
|
$(SOURCES) \
|
||||||
$(asset_files) \
|
$(asset_files) \
|
||||||
README.org
|
README.org
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ To run the game from the source checkout, use the `pre-inst-env`
|
||||||
wrapper script:
|
wrapper script:
|
||||||
|
|
||||||
```
|
```
|
||||||
./pre-inst-env run-game
|
./pre-inst-env bloatrunner
|
||||||
```
|
```
|
||||||
|
|
||||||
** REPL-driven development
|
** REPL-driven development
|
||||||
|
@ -126,7 +126,7 @@ errors so I can read the error and immediately see if it is fixed on
|
||||||
saving.
|
saving.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ watchexec -e .scm ./pre-inst-env run-game
|
$ watchexec -e .scm ./pre-inst-env bloatrunner
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
|
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
|
||||||
AC_CONFIG_FILES([scripts/run-game], [chmod +x scripts/run-game])
|
AC_CONFIG_FILES([bloatrunner], [chmod +x bloatrunner])
|
||||||
|
|
||||||
GUILE_PKG([3.0])
|
GUILE_PKG([3.0])
|
||||||
GUILE_PROGS
|
GUILE_PROGS
|
||||||
|
|
Loading…
Reference in a new issue