From bdccaf74897b467081ccd621697d414960cefa9f Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Wed, 6 Mar 2024 10:53:06 -0500 Subject: [PATCH] Remove inline channel now that we are using the single channel --- .guix/modules/termenv-package.scm | 50 ---------------- guix.scm | 97 ++++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 52 deletions(-) delete mode 100644 .guix/modules/termenv-package.scm diff --git a/.guix/modules/termenv-package.scm b/.guix/modules/termenv-package.scm deleted file mode 100644 index 6343922..0000000 --- a/.guix/modules/termenv-package.scm +++ /dev/null @@ -1,50 +0,0 @@ -(define-module (termenv-package) - #:use-module (gnu packages) - #:use-module (gnu packages autotools) - #:use-module (gnu packages guile) - #:use-module (gnu packages guile-xyz) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages texinfo) - #:use-module (guix build-system gnu) - #:use-module (guix download) - #:use-module (guix gexp) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (srfi srfi-1)) - -(define-public guile-termenv - (package - (name "guile-termenv") - (version "0.1") - (source - (local-file - "../.." "guile-termenv-checkout" - #:recursive? #t - #:select? (lambda (file stat) - (not (any (lambda (my-string) - (string-contains file my-string)) - (list ".git" ".dir-locals.el" "guix.scm")))))) - (build-system gnu-build-system) - (arguments - (list - #:make-flags - #~(list "GUILE_AUTO_COMPILE=0") - #:phases - #~(modify-phases %standard-phases - (add-before 'bootstrap 'hall - (lambda _ - (system* "hall" "build" "-x"))) - (replace 'bootstrap - (lambda _ - (system* "autoreconf" "-vif")))))) - (native-inputs (list autoconf - automake - guile-hall - pkg-config - texinfo)) - (inputs (list guile-3.0)) - (synopsis "Guile port of termenv") - (description - "A library to provide easy control of terminals from Guile using terminal control codes.") - (home-page "https://git.solarpunk.moe/vv/guile-termenv") - (license license:gpl3+))) diff --git a/guix.scm b/guix.scm index 4f3b601..b02fd66 100644 --- a/guix.scm +++ b/guix.scm @@ -1,2 +1,95 @@ -(use-modules (solarpunk packages guile)) -guile-termenv +(use-modules + (gnu packages) + (gnu packages autotools) + (gnu packages guile) + (gnu packages guile-xyz) + (gnu packages pkg-config) + (gnu packages texinfo) + (guix build-system gnu) + (guix download) + (guix gexp) + ((guix licenses) #:prefix license:) + (guix packages) + (srfi srfi-1)) + +(package + (name "guile-termenv") + (version "0.1") + (source + (local-file + (dirname (current-filename)) + #:recursive? + #t + #:select? + (lambda (file stat) + (not (any (lambda (my-string) + (string-contains file my-string)) + (list ".git" ".dir-locals.el" "guix.scm")))))) + (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)))) + ,''("generate-eastasian" + "generate-emoji" + "generate-graphemes")) + #t)))))))) + (native-inputs + (list autoconf automake pkg-config texinfo)) + (inputs (list guile-3.0)) + (synopsis "Guile port of termenv") + (description + "A library to provide easy control of terminals from Guile using terminal control codes.") + (home-page + "https://git.solarpunk.moe/vv/guile-termenv") + (license license:gpl3+))