mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add guile-dotenv-cli.
* gnu/packages/guile-xyz.scm (guile-dotenv-cli): New variable. Change-Id: Ibb6a0f279db918205de8177196af1d5367db0773 Signed-off-by: Steve George <steve@futurile.net>
This commit is contained in:
parent
734a1d311d
commit
c36698e8bb
1 changed files with 76 additions and 0 deletions
|
@ -910,6 +910,82 @@ variables from them.")
|
|||
(home-page "https://codeberg.org/fishinthecalculator/dotenv")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public guile-dotenv-cli
|
||||
(package
|
||||
(inherit guile-dotenv)
|
||||
(name "guile-dotenv-cli")
|
||||
(arguments
|
||||
(list
|
||||
#:modules `((ice-9 match)
|
||||
(ice-9 ftw)
|
||||
,@%default-gnu-imported-modules)
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(mkdir-p (string-append #$output "/bin"))
|
||||
(install-file "./scripts/dotenv"
|
||||
(string-append #$output "/bin/"))))
|
||||
(add-after 'install 'wrap-binaries
|
||||
(lambda _
|
||||
(let* ((inputs
|
||||
(list
|
||||
#$@(map (lambda (input)
|
||||
(this-package-input input))
|
||||
'("guile-config"
|
||||
"guile-dotenv"))))
|
||||
(compiled-dir
|
||||
(lambda (out version)
|
||||
(string-append out "/lib/guile/"
|
||||
version "/site-ccache")))
|
||||
(uncompiled-dir
|
||||
(lambda (out version)
|
||||
(string-append out "/share/guile/site"
|
||||
(if (string-null? version) "" "/")
|
||||
version)))
|
||||
(dep-path
|
||||
(lambda (env modules path)
|
||||
(list env ":" 'prefix
|
||||
(cons modules
|
||||
(map (lambda (input)
|
||||
(string-append input path))
|
||||
inputs)))))
|
||||
(bin (string-append #$output "/bin/"))
|
||||
(site
|
||||
(uncompiled-dir #$(this-package-input "guile-dotenv") "")))
|
||||
(match (scandir site)
|
||||
(("." ".." version)
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(wrap-program (string-append bin file)
|
||||
(dep-path
|
||||
"GUILE_LOAD_PATH"
|
||||
(uncompiled-dir
|
||||
#$(this-package-input "guile-dotenv") version)
|
||||
(uncompiled-dir "" version))
|
||||
(dep-path
|
||||
"GUILE_LOAD_COMPILED_PATH"
|
||||
(compiled-dir
|
||||
#$(this-package-input "guile-dotenv") version)
|
||||
(compiled-dir "" version))))
|
||||
'("dotenv"))))))))))
|
||||
(inputs
|
||||
(modify-inputs (package-inputs guile-dotenv)
|
||||
(append bash-minimal)))
|
||||
(native-inputs
|
||||
(modify-inputs (package-native-inputs guile-dotenv)
|
||||
;; As opposed to guile-config, here we need to propagate it.
|
||||
(delete "guile-config")))
|
||||
(propagated-inputs
|
||||
(modify-inputs (package-propagated-inputs guile-dotenv)
|
||||
(prepend guile-config
|
||||
guile-dotenv)))
|
||||
(description
|
||||
(string-append (package-description guile-dotenv)
|
||||
"\n\nAdditionally, this package provides a @command{dotenv}
|
||||
command, exposes part of the @code{guile-dotenv} Guile API as command lines
|
||||
invocations."))))
|
||||
|
||||
(define-public guile-dsv
|
||||
(package
|
||||
(name "guile-dsv")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue