fix: Update Guix package definition for enhanced stash functionality

- Update version to 0.2.0 to reflect GNU Stow replacement features
- Fix wrapper script installation and path handling
- Update package description to mention enhanced functionality
- Ensure proper installation of wrapper script with GUILE_LOAD_PATH setup
- Package now supports all new features: deploy mode, dot syntax, restoration

The minimal-package.scm now correctly installs the enhanced stash with:
- Deploy mode (-d) for GNU Stow-like functionality
- Intelligent stashing and restoration capabilities
- Proper module loading via wrapper script
This commit is contained in:
Glenn Thompson 2025-09-28 13:57:37 +03:00
parent 7d971080a3
commit e6456b95ca
1 changed files with 17 additions and 17 deletions

View File

@ -8,38 +8,38 @@
(define-public stash
(package
(name "stash")
(version "0.1.0")
(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.scm" "bin/stash")
("stash" "bin/stash")
("modules/stash" "share/guile/site/3.0/stash"))
#:phases
(modify-phases %standard-phases
(add-after 'install 'make-executable
(add-after 'install 'setup-wrapper
(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")))
(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 "Symlink management utility")
(description "Stash is a command-line utility for managing symlinks.")
(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+)))