Skeleton CLI using guile-config
This commit is contained in:
commit
8426126b30
5 changed files with 262 additions and 0 deletions
79
guix.scm
Normal file
79
guix.scm
Normal file
|
@ -0,0 +1,79 @@
|
|||
(use-modules
|
||||
(gnu packages)
|
||||
(gnu packages bash)
|
||||
(gnu packages golang-crypto)
|
||||
(gnu packages guile)
|
||||
(gnu packages guile-xyz)
|
||||
(gnu packages ssh)
|
||||
(gnu packages version-control)
|
||||
(guix build-system guile)
|
||||
(guix download)
|
||||
(guix gexp)
|
||||
((guix licenses) #:prefix license:)
|
||||
(guix packages)
|
||||
(srfi srfi-1))
|
||||
|
||||
(package
|
||||
(name "guile-ordo")
|
||||
(version "0.1.0")
|
||||
(source
|
||||
(local-file
|
||||
(dirname (current-filename))
|
||||
#:recursive? #t
|
||||
#:select? (lambda (file stat)
|
||||
(not (any (lambda (my-string)
|
||||
(string-contains file my-string))
|
||||
(list ".git" ".dir-locals.el" "guix.scm"))))))
|
||||
(build-system guile-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:phases #~(modify-phases %standard-phases
|
||||
(add-after 'build 'link-and-wrap-executable
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((bin (string-append #$output "/bin")) ; bin directory for PATH.
|
||||
(site-version (target-guile-effective-version))
|
||||
(scm (lambda (p) (string-append p "/share/guile/site/" site-version)))
|
||||
(go (lambda (p) (string-append p "/lib/guile/" site-version "/site-ccache")))
|
||||
(runtime-deps (cons #$output (map (lambda (p) (assoc-ref inputs p)) (list "guile-config"
|
||||
"guile-dsv"
|
||||
"guile-filesystem"
|
||||
"guile-ini"
|
||||
"guile-irregex"
|
||||
"guile-libyaml"
|
||||
"guile-json"
|
||||
"guile-lib"
|
||||
"guile-semver"
|
||||
"guile-srfi-145"
|
||||
"guile-srfi-158"
|
||||
"guile-srfi-197"
|
||||
"guile-srfi-235"
|
||||
"guile-ssh")))))
|
||||
(mkdir-p bin)
|
||||
(let ((source-script (string-append #$output
|
||||
"/share/guile/site/" site-version "/"
|
||||
"ordo.scm"))
|
||||
(target-command (string-append bin "/ordo")))
|
||||
(symlink source-script target-command)
|
||||
(wrap-program target-command
|
||||
#:sh (which "bash")
|
||||
`("GUILE_LOAD_PATH" prefix ,(map scm runtime-deps))
|
||||
`("GUILE_LOAD_COMPILED_PATH" prefix ,(map go runtime-deps))))))))))
|
||||
(inputs (list guile-3.0 bash-minimal git git-lfs age))
|
||||
(propagated-inputs (list guile-config
|
||||
guile-dsv
|
||||
guile-filesystem
|
||||
guile-ini
|
||||
guile-irregex
|
||||
guile-libyaml
|
||||
guile-json-4
|
||||
guile-lib
|
||||
guile-semver
|
||||
guile-srfi-145
|
||||
guile-srfi-158
|
||||
guile-srfi-197
|
||||
guile-srfi-235
|
||||
guile-ssh))
|
||||
(synopsis "Ordo configuration management")
|
||||
(description "")
|
||||
(home-page "")
|
||||
(license license:gpl3+))
|
Loading…
Add table
Add a link
Reference in a new issue