Add guix package definition
This commit is contained in:
parent
f36e404515
commit
14afaaaa18
58
contrib/guix.scm
Normal file
58
contrib/guix.scm
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
;; Guix package for marginaltool. To build or install, run from the toplevel directory:
|
||||||
|
;;
|
||||||
|
;; guix build --file=contrib/guix.scm
|
||||||
|
;; guix package --install-from-file=contrib/guix.scm
|
||||||
|
;;
|
||||||
|
;; To create and enter a development environment:
|
||||||
|
;;
|
||||||
|
;; guix environment --pure --load=contrib/guix.scm
|
||||||
|
|
||||||
|
(define-module (marginaltool)
|
||||||
|
#:use-module (gnu)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages security-token)
|
||||||
|
#:use-module (gnu packages tls)
|
||||||
|
#:use-module (gnu packages version-control))
|
||||||
|
|
||||||
|
(define %source-dir (dirname (dirname (current-filename))))
|
||||||
|
|
||||||
|
(define (git-version directory)
|
||||||
|
(with-directory-excursion directory
|
||||||
|
(read-line (open-pipe* OPEN_READ "git" "describe" "--always" "--tags"))))
|
||||||
|
|
||||||
|
(define-public marginaltool
|
||||||
|
(package
|
||||||
|
(name "marginaltool")
|
||||||
|
(version "master")
|
||||||
|
(source
|
||||||
|
(local-file %source-dir #:recursive? #t #:select? (git-predicate %source-dir)))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:make-flags #~(list (string-append "PREFIX=" #$output))
|
||||||
|
#:tests? #f
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(replace 'configure
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(for-each (lambda (binary)
|
||||||
|
(substitute* "marginaltool"
|
||||||
|
((binary) (search-input-file inputs (string-append "/bin/" binary)))))
|
||||||
|
'("openssl" "pkcs11-tool"))))
|
||||||
|
(delete 'build))))
|
||||||
|
(inputs
|
||||||
|
(list openssl opensc))
|
||||||
|
(propagated-inputs
|
||||||
|
(list `(,python "tk")))
|
||||||
|
(home-page "https://sr.ht/~jetomit/marginaltool")
|
||||||
|
(synopsis "MargTools replacement")
|
||||||
|
(description "Python script to replace MargTools.
|
||||||
|
Can be used to sign documents with GovernmentConnect.")
|
||||||
|
(license license:unlicense)))
|
||||||
|
|
||||||
|
marginaltool
|
Loading…
Reference in a new issue