diff --git a/.guix-channel b/.guix-channel new file mode 100644 index 0000000..4ce1288 --- /dev/null +++ b/.guix-channel @@ -0,0 +1,3 @@ +(channel + (version 0) + (directory ".guix/modules")) diff --git a/.guix/modules/termenv-package.scm b/.guix/modules/termenv-package.scm new file mode 100644 index 0000000..6343922 --- /dev/null +++ b/.guix/modules/termenv-package.scm @@ -0,0 +1,50 @@ +(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 b82911b..4e76ddd 100644 --- a/guix.scm +++ b/guix.scm @@ -1,49 +1,3 @@ -(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 - (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+)) - +(load ".guix/modules/termenv-package.scm") +(use-modules (termenv-package)) +guile-termenv diff --git a/hall.scm b/hall.scm index 7ffc145..d91589a 100644 --- a/hall.scm +++ b/hall.scm @@ -8,37 +8,52 @@ (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") + (home-page + "https://git.solarpunk.moe/vv/guile-termenv") (license gpl3+) (dependencies `()) + (skip ()) (features ((guix #t) (use-guix-specs-for-dependencies #f) (native-language-support #f) (licensing #f))) (files (libraries - ((directory "termenv" - ((scheme-file "style") - (scheme-file "unix") - (scheme-file "hyperlink") - (scheme-file "screen") - (scheme-file "color") - (scheme-file "hconfig"))) - (scheme-file "termenv"))) - (tests ((directory "tests" - ((scheme-file "test-screen") - (scheme-file "test-style"))))) - (documentation - ((org-file "README") - (symlink "README" "README.org") - (text-file "HACKING") - (text-file "COPYING") - (directory "doc" - ((texi-file "guile-termenv"))))) - (programs ()) - (infrastructure - ((scheme-file "guix") - (text-file ".gitignore") - (scheme-file "hall") - (directory "tests" - ((scheme-file "utils"))))))) + ((scheme-file "termenv") + (directory + "termenv" + ((scheme-file "screen") + (scheme-file "style") + (scheme-file "hconfig") + (scheme-file "color") + (scheme-file "unix") + (scheme-file "hyperlink"))))) + (tests ((directory + "tests" + ((scheme-file "utils") + (scheme-file "test-style") + (scheme-file "test-screen"))))) + (programs ()) + (documentation + ((org-file "README") + (symlink "README" "README.org") + (text-file "HACKING") + (text-file "COPYING") + (directory "doc" ((texi-file "guile-termenv"))))) + (infrastructure + ((text-file ".guix-channel") + (directory + ".guix" + ((directory + "modules" + ((scheme-file "guile-termenv"))))) + (symlink + "guix.scm" + ".guix/modules/guile-termenv.scm") + (text-file ".gitignore") + (scheme-file "hall") + (directory + "tests" + ((scheme-file "utils") + (scheme-file "test-style") + (scheme-file "test-screen")))))))