(define-module (stash-package) #:use-module (guix packages) #:use-module (guix build-system copy) #:use-module (guix licenses) #:use-module (guix gexp) #:use-module (gnu packages guile)) (define-public stash (package (name "stash") (version "0.1.0") (source (local-file "." "stash-checkout" #:recursive? #t)) (build-system copy-build-system) (arguments '(#:install-plan '(("stash.scm" "share/guile/site/3.0/stash.scm") ("stash.scm" "bin/stash") ("modules/stash" "share/guile/site/3.0/stash")) #:phases (modify-phases %standard-phases (add-after 'install 'make-executable (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (script (string-append bin "/stash"))) ;; Make script executable (chmod script #o755) ;; Add proper shebang (substitute* script ((".*") (string-append "#! /usr/bin/env -S guile" " -L " out "/share/guile/site/3.0" " -C " out "/share/guile/site/3.0" " -e '(begin (use-modules (stash)) (main (command-line)))'" " -s\n!#\n"))) #t)))))) (inputs (list guile-3.0)) (synopsis "Symlink management utility") (description "Stash is a command-line utility for managing symlinks.") (home-page "https://codeberg.org/glenneth/stash") (license gpl3+))) stash