diff options
| author | 2025-08-12 18:05:48 -0400 | |
|---|---|---|
| committer | 2025-08-12 18:05:48 -0400 | |
| commit | 27b3c30fa6238fd306fe989060657afa259bd9c4 (patch) | |
| tree | 6d65c50ade76c4034d50b51fc6c85712f51ecc64 /mcgoron/guix/scheme-packages.scm | |
| parent | gauche (diff) | |
patch foment to respect new envar R7RS_LIBRARY_PATH
Diffstat (limited to '')
| -rw-r--r-- | mcgoron/guix/scheme-packages.scm (renamed from mcgoron/guix/foment.scm) | 70 |
1 files changed, 51 insertions, 19 deletions
diff --git a/mcgoron/guix/foment.scm b/mcgoron/guix/scheme-packages.scm index 56db217..bbec95b 100644 --- a/mcgoron/guix/foment.scm +++ b/mcgoron/guix/scheme-packages.scm @@ -14,10 +14,12 @@ | with this program. If not, see <https://www.gnu.org/licenses/>. |# -(define-module (mcgoron guix foment) +(define-module (mcgoron guix scheme-packages) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (guix licenses) #:use-module (guix git-download) + #:use-module (guix download) #:use-module (gnu packages version-control) #:use-module (gnu packages bash) #:use-module (guix build-system gnu) @@ -25,41 +27,71 @@ #:use-module (guix build-system copy) #:use-module (guix gexp)) -(define-public foment-build-system +(define-public r7rs-lib-dir "share/scheme/r7rs") +(define-public r6rs-lib-dir "share/scheme/r6rs") + +(define-public (default-copying-build-system name desc dir) (let ((lower* (build-system-lower copy-build-system))) - (build-system - (name 'foment-scheme) - (description "Build system for copying Scheme libraries to Foment module directory") - (lower - (lambda args - (apply lower* - (if (memq #:install-plan args) - args - (append - args - (list - #:install-plan - `'(("." ,(string-append foment-lib-dir - "/")))))))))))) + (build-system + (name name) + (description desc) + (lower + (lambda args + (apply lower* + (if (memq #:install-plan args) + args + (append + args + (list + #:install-plan + `'(("." ,(string-append dir "/")))))))))))) +(define-public portable-r7rs-build-system + (default-copying-build-system 'r7rs + "Copy Scheme libraries into R7RS directory" + r7rs-lib-dir)) + +(define-public hello-world-r7rs + (package + (name "hello-world-r7rs") + (version "1.0.0") + (synopsis "Prints hello world") + (description "A test library for packages that respect R7RS_LIBRARY_PATH") + (license public-domain) + (home-page "https://example.com") + (build-system portable-r7rs-build-system) + (source + (origin + (method url-fetch) + (uri "https://florida.moe/ftp/hello-world-r7rs/1.0.0.tar.gz") + (sha256 (base32 "1cx9p2mz3cmn02imp137vqmq8aw3mh5s23ybprgkc8pshgmaf8jn")))))) (define-public foment-lib-dir "share/foment") +(define-public foment-build-system + (default-copying-build-system 'foment-scheme + "Copy Scheme libraries into Foment Scheme directory" + foment-lib-dir)) (define-public foment (package (name "foment") - (version "0.4.1-0.6089c3c") + (version "0.4.1-1.6089c3c") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/leftmike/foment") (commit "6089c3c9e762875f619ef382d27943819bbe002b"))) - (sha256 (base32 "1a6q8qfd6ggc6fl9lf1d8m20q8k498jrswc4qcn3bb7rkq4w258a")))) + (sha256 (base32 "1a6q8qfd6ggc6fl9lf1d8m20q8k498jrswc4qcn3bb7rkq4w258a")) + (patches (search-patches "mcgoron/guix/patches/foment-0.4.1-library-path.patch")))) (build-system gnu-build-system) (native-search-paths (list (search-path-specification (variable "FOMENT_LIBPATH") - (files (list foment-lib-dir))))) + (files (list foment-lib-dir))) + (search-path-specification + (variable "R7RS_LIBRARY_PATH") + (files (list r7rs-lib-dir))))) + (arguments (list #:phases |
