64 lines
2.8 KiB
Scheme
64 lines
2.8 KiB
Scheme
(define-module (soyprano)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix git-download)
|
|
#:use-module (guix build-system guile)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix utils)
|
|
#:use-module (gnu packages guile)
|
|
#:use-module (gnu packages bash)
|
|
#:use-module (gnu packages guile-xyz)
|
|
#:use-module (gnu packages tls)
|
|
#:use-module ((guix licenses) #:prefix license:))
|
|
|
|
(define vcs-file?
|
|
(or (git-predicate
|
|
(dirname (dirname (current-source-directory))))
|
|
(const #t)))
|
|
|
|
(define-public soyprano
|
|
(package
|
|
(name "soyprano")
|
|
(version "0.0.0-git") ;; unversionedware
|
|
(source
|
|
(local-file "../.." "soyprano-checkout"
|
|
#:recursive? #t
|
|
#:select? vcs-file?))
|
|
(build-system guile-build-system)
|
|
(native-inputs (list guile-3.0 bash-minimal))
|
|
(inputs (list guile-lib guile-gnutls))
|
|
(arguments
|
|
(list
|
|
#:not-compiled-file-regexp "(guix|guix/.*)[.]scm$"
|
|
#:phases #~(modify-phases %standard-phases
|
|
(add-after 'build 'add-static-assets
|
|
(lambda _
|
|
(copy-recursively "static/" (string-append #$output "/share/soyprano/static"))))
|
|
(add-after 'add-static-assets 'link-and-wrap-executable
|
|
(lambda _
|
|
(let* ((bin (string-append #$output "/bin"))
|
|
;; bin directory for PATH.
|
|
(site-version (target-guile-effective-version))
|
|
(scm
|
|
(string-append #$output "/share/guile/site/" site-version))
|
|
(go
|
|
(string-append #$output "/lib/guile/" site-version "/site-ccache"))
|
|
(command-name "soyprano")
|
|
(source-script
|
|
(string-append scm "/" command-name ".scm"))
|
|
(target-command
|
|
(string-append bin "/" command-name)))
|
|
(mkdir-p bin)
|
|
(symlink source-script target-command)
|
|
(wrap-program target-command
|
|
#:sh (which "bash")
|
|
`("GUILE_LOAD_PATH" ":" prefix
|
|
(,scm ,(getenv "GUILE_LOAD_PATH")))
|
|
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
|
|
(,go ,(getenv "GUILE_LOAD_COMPILED_PATH")))
|
|
`("SOYPRANO_ASSETS" = (,(string-append #$output "/share/soyprano/static"))))))))))
|
|
(home-page "https://forge.fsky.io/clombrong/soyprano/")
|
|
(synopsis "Tenor frontend")
|
|
(description "Soyprano is a privacy-respecting frontend to Tenor")
|
|
(license license:agpl3+)))
|
|
|
|
soyprano
|