guix-kakafarm-channel

Kaka Farm's GNU Guix channel.
git clone https://kaka.farm/~git/guix-kakafarm-channel
Log | Files | Refs | README | LICENSE

commit 2dc8e6090cc5d559be4d8901b474d266a62cb577
parent 481fc313e93941dcbe37bc6926d4400f0effa167
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Sun, 10 Mar 2024 02:17:56 +0200

Add g-golf package definition.

Diffstat:
Mkakafarm/packages/guile-xyz.scm | 374++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 236 insertions(+), 138 deletions(-)

diff --git a/kakafarm/packages/guile-xyz.scm b/kakafarm/packages/guile-xyz.scm @@ -22,8 +22,16 @@ #:use-module (gnu packages base) #:use-module (gnu packages bash) - #:use-module (gnu packages guile) - #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gnome) + #:use-module (gnu packages xorg) + #:use-module ((gnu packages guile) + #:prefix gnu:packages:guile:) + #:use-module ((gnu packages guile-xyz) + #:prefix gnu:packages:guile-xyz:) + #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages speech) #:use-module (gnu packages xdisorg) @@ -32,77 +40,171 @@ #:use-module (guix build-system guile) #:use-module (guix gexp) #:use-module (guix git-download) - #:use-module ((guix licenses) #:prefix license:) + #:use-module ((guix licenses) + #:prefix license:) #:use-module (guix packages)) (define-public guile-clipboard-speaker (let ((commit-string "ba5fa866087b93fae966640eed37387ea5a74e32") (base32-string "1q8c1x0ansx9519lry9spl923bzc9yrs675fyjmxkhyrwi52i8p2") - (git-repository-url "https://codeberg.org/kakafarm/guile-clipboard-speaker/")) + (git-repository-url + "https://codeberg.org/kakafarm/guile-clipboard-speaker/")) (package - (name "guile-clipboard-speaker") - (version "1.0.1") - (source - (origin - (uri (git-reference - (url git-repository-url) - (commit commit-string))) - (method git-fetch) - (file-name (git-file-name name version)) - (sha256 (base32 base32-string)))) - (native-inputs - (list guile-3.0)) - (inputs - (list bash - coreutils - espeak-ng - guile-3.0 - guile-config - guile-srfi-145 - guile-srfi-180 - util-linux - xsel)) - (build-system guile-build-system) - (arguments - (list - #:phases - #~(modify-phases - %standard-phases - (add-after 'install 'link-and-wrap-executable - (lambda _ - (let* ((bin (string-append #$output "/bin")) - (script (string-append bin "/clipboard-speaker")) - (site-version (target-guile-effective-version)) - (scm (string-append "/share/guile/site/" - site-version)) - (go (string-append "/lib/guile/" - site-version - "/site-ccache")) - (guile-config #$(this-package-input "guile-config")) - (guile-srfi-145 #$(this-package-input "guile-srfi-145")) - (guile-srfi-180 #$(this-package-input "guile-srfi-180"))) - (mkdir-p bin) - (symlink (string-append #$output scm "/clipboard-speaker.scm") - script) - (wrap-program script #:sh (which "bash") - `("GUILE_LOAD_PATH" prefix - (,(string-append #$output scm) - ,(string-append guile-config scm) - ,(string-append guile-srfi-145 scm) - ,(string-append guile-srfi-180 scm))) - `("GUILE_LOAD_COMPILED_PATH" prefix - (,(string-append #$output go) - ,(string-append guile-config go) - ,(string-append guile-srfi-145 go) - ,(string-append guile-srfi-180 go)))))))))) - (home-page git-repository-url) - (synopsis "Accessibility tool that reads the contents of your clipboard buffer") - (description "This package installs the clipboard-speaker executable. + (name "guile-clipboard-speaker") + (version "1.0.1") + (source + (origin + (uri (git-reference + (url git-repository-url) + (commit commit-string))) + (method git-fetch) + (file-name (git-file-name name version)) + (sha256 + (base32 base32-string)))) + (native-inputs (list guile-3.0)) + (inputs (list bash + coreutils + espeak-ng + guile-3.0 + guile-config + guile-srfi-145 + guile-srfi-180 + util-linux + xsel)) + (build-system guile-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'install 'link-and-wrap-executable + (lambda _ + (let* ((bin (string-append #$output "/bin")) + (script (string-append bin + "/clipboard-speaker")) + (site-version (target-guile-effective-version)) + (scm (string-append "/share/guile/site/" + site-version)) + (go (string-append "/lib/guile/" site-version + "/site-ccache")) + (guile-config #$(this-package-input + "guile-config")) + (guile-srfi-145 #$(this-package-input + "guile-srfi-145")) + (guile-srfi-180 #$(this-package-input + "guile-srfi-180"))) + (mkdir-p bin) + (symlink (string-append #$output scm + "/clipboard-speaker.scm") + script) + (wrap-program script + #:sh (which "bash") + `("GUILE_LOAD_PATH" prefix + (,(string-append #$output scm) ,(string-append + guile-config + scm) + ,(string-append guile-srfi-145 scm) + ,(string-append guile-srfi-180 scm))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append #$output go) ,(string-append + guile-config go) + ,(string-append guile-srfi-145 go) + ,(string-append guile-srfi-180 go)))))))))) + (home-page git-repository-url) + (synopsis + "Accessibility tool that reads the contents of your clipboard buffer") + (description + "This package installs the clipboard-speaker executable. An accessibility tool that reads the contents of the clipboard. I can read the current selection or the clipboard. Select a bunch of text, press a keybinding / shortcut you've set in the windows manager, and clipboard-speaker would read that aloud.") - (license license:agpl3+)))) + (license license:agpl3+)))) + +(define-public guile-g-golf + (package + (name "guile-g-golf") + (version "0.8.0-rc-2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/g-golf.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hbxc812cr3rl4w3q4bf2pm2wds31vp7r78f26kj94qm71shh29l")))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags #~(list "--with-guile-site=no") + #:parallel-build? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-guile-site-directory + (lambda _ + (substitute* "configure.ac" + (("SITEDIR=.*$") + "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"; +") + (("SITECCACHEDIR=\"\\$libdir/g-golf/") + "SITECCACHEDIR=\"$libdir/")))) + (add-before 'configure 'tests-work-arounds + (lambda* (#:key inputs #:allow-other-keys) + ;; In build environment, There is no /dev/tty + (substitute* "test-suite/tests/gobject.scm" + (("/dev/tty") + "/dev/null")))) + (add-before 'configure 'substitute-libs + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (get lib) + (search-input-file inputs + (string-append "lib/" lib ".so"))) + + (let* ((libgi (get "libgirepository-1.0")) + (libglib (get "libglib-2.0")) + (libgobject (get "libgobject-2.0")) + (libg-golf (string-append #$output + "/lib/libg-golf"))) + (substitute* "g-golf/init.scm" + (("libgirepository-1.0") + libgi) + (("libglib-2.0") + libglib) + (("libgobject-2.0") + libgobject) + (("\\(dynamic-link \"libg-golf\"\\)") + (format #f "~s" + `(catch #t + (lambda () + (dynamic-link "libg-golf")) + (lambda _ + (dynamic-link ,libg-golf)))))) + (setenv "GUILE_AUTO_COMPILE" "0") #t))) + (add-before 'check 'start-xorg-server + (lambda* (#:key inputs #:allow-other-keys) + ;; The test suite requires a running X server. + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") #t))))) + (inputs (list gnu:packages:guile:guile-3.0 + gnu:packages:guile-xyz:guile-lib glib-next)) + (native-inputs (list autoconf + automake + texinfo + gettext-minimal + libtool + pkg-config + ;; required for tests + gtk+ + clutter + xorg-server-for-tests)) + (propagated-inputs (list gobject-introspection-next)) + (home-page "https://www.gnu.org/software/g-golf/") + (synopsis "Guile bindings for GObject Introspection") + (description + "G-Golf (Gnome: (Guile Object Library for)) is a library for developing +modern applications in Guile Scheme. It comprises a direct binding to the +GObject Introspection API and higher-level functionality for importing Gnome +libraries and making GObject classes (and methods) available in Guile's +object-oriented programming system, GOOPS.") + (license license:lgpl3+))) (define-public guile-rsv (let ((commit "41b04c85eef31d4d51001c6d66e8fd339fcc614c") @@ -171,32 +273,33 @@ demonstrated in https://www.youtube.com/watch?v=tb_70o6ohMA.") (define-public guile-srfi-133 (package - (name "guile-srfi-133") - (version "0.0.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/scheme-requests-for-implementation/srfi-133") - (commit "db81a114cd3e23375f024baec15482614ec90453"))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0a7srl72291yah0aj6rwddhj041v2spximhknjj7hczlparsrm7f")))) - (build-system guile-build-system) - (arguments - (list - #:phases - #~(modify-phases - %standard-phases - (add-after 'unpack 'move-create-and-delete-files - (lambda _ - (rename-file "vectors" "srfi") - (rename-file "srfi/vectors-test.scm" "srfi/srfi-test.scm") - (rename-file "srfi/vectors-impl.scm" "srfi/srfi-impl.scm") - (with-output-to-file "srfi/srfi-133.scm" - (lambda () - (display "(define-module (srfi srfi-133) + (name "guile-srfi-133") + (version "0.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url + "https://github.com/scheme-requests-for-implementation/srfi-133") + (commit "db81a114cd3e23375f024baec15482614ec90453"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0a7srl72291yah0aj6rwddhj041v2spximhknjj7hczlparsrm7f")))) + (build-system guile-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'move-create-and-delete-files + (lambda _ + (rename-file "vectors" "srfi") + (rename-file "srfi/vectors-test.scm" + "srfi/srfi-test.scm") + (rename-file "srfi/vectors-impl.scm" + "srfi/srfi-impl.scm") + (with-output-to-file "srfi/srfi-133.scm" + (lambda () + (display + "(define-module (srfi srfi-133) #:replace (;; Constructors vector-copy @@ -229,61 +332,56 @@ demonstrated in https://www.youtube.com/watch?v=tb_70o6ohMA.") vector->string string->vector)) (include \"srfi-impl.scm\")"))) - (for-each (lambda (filename) - (delete-file filename)) - '("tests/run.scm" - "srfi/vectors.sld" - "srfi/vectors.scm"))))))) - (native-inputs - (list guile-3.0)) - (home-page "https://github.com/scheme-requests-for-implementation/srfi-133") - (synopsis "Vector Library (R7RS-compatible)") - (description - "A comprehensive library of vector operations.") - (license license:expat))) + (for-each (lambda (filename) + (delete-file filename)) + '("tests/run.scm" "srfi/vectors.sld" + "srfi/vectors.scm"))))))) + (native-inputs (list guile-3.0)) + (home-page + "https://github.com/scheme-requests-for-implementation/srfi-133") + (synopsis "Vector Library (R7RS-compatible)") + (description "A comprehensive library of vector operations.") + (license license:expat))) (define-public guile-srfi-232 (package - (name "guile-srfi-232") - (version "0.0.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/scheme-requests-for-implementation/srfi-232") - (commit "c3f580d220778cd71492aba4fdd0c7040968e705"))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0lp4zcqjjj6hwfh3ix71wak1nffgg4npzsg7cdxfn9hf6iwf9xby")))) - (build-system guile-build-system) - (arguments - (list - #:phases - #~(modify-phases - %standard-phases - (add-after 'unpack 'move-and-delete-things - (lambda _ - (let* ((srfi-directory (string-append #$output "/srfi"))) - (mkdir-p "srfi") - (with-output-to-file "srfi/srfi-232.scm" - (lambda () - (display "(define-library (srfi srfi-232) + (name "guile-srfi-232") + (version "0.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url + "https://github.com/scheme-requests-for-implementation/srfi-232") + (commit "c3f580d220778cd71492aba4fdd0c7040968e705"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lp4zcqjjj6hwfh3ix71wak1nffgg4npzsg7cdxfn9hf6iwf9xby")))) + (build-system guile-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'move-and-delete-things + (lambda _ + (let* ((srfi-directory (string-append #$output "/srfi"))) + (mkdir-p "srfi") + (with-output-to-file "srfi/srfi-232.scm" + (lambda () + (display "(define-library (srfi srfi-232) (export curried define-curried) (import (only (guile) import) (scheme base)) (include \"../srfi-232.scm\"))"))) - (for-each (lambda (filename) - (delete-file filename)) - '("test-body.scm" - "test-chibi.scm" - "test-srfi-64.scm")))))))) - (native-inputs - (list guile-3.0)) - (home-page "https://github.com/scheme-requests-for-implementation/srfi-232") - (synopsis "Flexible curried procedures") - (description - "Scheme lacks a flexible way to create and apply curried + (for-each (lambda (filename) + (delete-file filename)) + '("test-body.scm" "test-chibi.scm" + "test-srfi-64.scm")))))))) + (native-inputs (list guile-3.0)) + (home-page + "https://github.com/scheme-requests-for-implementation/srfi-232") + (synopsis "Flexible curried procedures") + (description + "Scheme lacks a flexible way to create and apply curried procedures. This SRFI describes curried, a variant of lambda that creates true curried procedures which also behave just like ordinary Scheme procedures. They can be applied to their arguments one by one, @@ -291,7 +389,7 @@ all at once, or anywhere in between, without any novel syntax. curried also supports nullary and variadic procedures, and procedures created with it have predictable behavior when applied to surplus arguments.") - (license license:expat))) + (license license:expat))) ;;; This allows you to run guix shell -f example.scm. ;;; Remove this line if you just want to define a package.