(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.2.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" "bin/stash") ("modules/stash" "share/guile/site/3.0/stash")) #:phases (modify-phases %standard-phases (add-after 'install 'setup-wrapper (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (wrapper (string-append bin "/stash"))) ;; Make wrapper executable (chmod wrapper #o755) ;; Update wrapper script paths (substitute* wrapper (("/home/glenn/Projects/Code/stash/stash") (string-append out "/share/guile/site/3.0/stash.scm")) (("/home/glenn/Projects/Code/stash") out "/share/guile/site/3.0")) #t)))))) (inputs (list guile-3.0)) (synopsis "Enhanced GNU Stow replacement - symlink management utility") (description "Stash is a powerful command-line utility written in Guile Scheme that serves as an enhanced replacement for GNU Stow. It provides intelligent stashing, restoration capabilities, and GNU Stow-like deployment features for managing dotfiles and organizing any directories through symlink management.") (home-page "https://codeberg.org/glenneth/stash") (license gpl3+))) stash