Silas Vedder
2 years ago
12 changed files with 122 additions and 135 deletions
@ -1,95 +1,85 @@
|
||||
(use-modules (guix packages) |
||||
((guix licenses) |
||||
#:prefix license:) |
||||
(guix download) |
||||
(guix git-download) |
||||
(guix build-system gnu) |
||||
(gnu packages) |
||||
(gnu packages autotools) |
||||
(gnu packages guile) |
||||
(gnu packages guile-xyz) |
||||
(gnu packages pkg-config) |
||||
(gnu packages texinfo)) |
||||
(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)) |
||||
|
||||
(define-public bible-tools |
||||
(package |
||||
(name "bible-tools") |
||||
(version "1.0") |
||||
(source |
||||
(origin |
||||
(method git-fetch) |
||||
(uri (git-reference |
||||
(url "https://git.silasvedder.xyz/silasfox/bible-tools.git") |
||||
(commit "bc925d8"))) |
||||
(file-name "bible-tools-1.0-checkout") |
||||
(sha256 (base32 "07221jw4gl48cg45znwjkc7871in3pfq488ig4vnbjygqbg4wawh")))) |
||||
(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)) |
||||
,''()))))) |
||||
(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)))) |
||||
,''("bible-app" "word-counter" "bible2latex")) |
||||
#t)))))))) |
||||
(native-inputs |
||||
`(("autoconf" ,autoconf) |
||||
("automake" ,automake) |
||||
("pkg-config" ,pkg-config) |
||||
("texinfo" ,texinfo))) |
||||
(inputs `(("guile" ,guile-3.0))) |
||||
(propagated-inputs `()) |
||||
(synopsis "") |
||||
(description "") |
||||
(home-page "") |
||||
(license license:gpl3+))) |
||||
|
||||
bible-tools |
||||
(package |
||||
(name "bible-tools") |
||||
(version "1.0") |
||||
(source (local-file "./bible-tools-1.0.tar.gz")) |
||||
(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)) |
||||
,''()))))) |
||||
(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)))) |
||||
,''("bible-app" "word-counter" "bible2latex")) |
||||
#t)))))))) |
||||
(native-inputs |
||||
`(("autoconf" ,autoconf) |
||||
("automake" ,automake) |
||||
("pkg-config" ,pkg-config) |
||||
("texinfo" ,texinfo))) |
||||
(inputs `(("guile" ,guile-3.0))) |
||||
(propagated-inputs `()) |
||||
(synopsis "") |
||||
(description "") |
||||
(home-page "") |
||||
(license license:gpl3+)) |
||||
|
Loading…
Reference in new issue