| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages taler)
|
| 20 | #:use-module (gnu packages guile)
|
| 21 | #:use-module (gnu packages python)
|
| 22 | #:use-module (gnu packages sphinx)
|
| 23 | #:use-module (gnu packages texinfo)
|
| 24 | #:use-module (gnu packages web)
|
| 25 | #:use-module (gnu packages xml)
|
| 26 | #:use-module (guix gexp)
|
| 27 | #:use-module ((guix licenses) #:prefix license:)
|
| 28 | #:use-module (guix packages)
|
| 29 | #:use-module (guix git-download)
|
| 30 | #:use-module (guix build-system cargo)
|
| 31 | #:use-module (guix build-system gnu))
|
| 32 |
|
| 33 | (define-public robocop
|
| 34 | (package
|
| 35 | (name "robocop")
|
| 36 | (version "1.6.1")
|
| 37 | (source (origin
|
| 38 | (method git-fetch)
|
| 39 | (uri (git-reference
|
| 40 | (url "git://git.taler.net/robocop.git")
|
| 41 | (commit (string-append "v" version))))
|
| 42 | (file-name (git-file-name name version))
|
| 43 | (sha256
|
| 44 | (base32
|
| 45 | "09javwf0izasfa2480wp5x1rq64n9aqacnxrd7d2izd4rchb6hl6"))))
|
| 46 | (build-system cargo-build-system)
|
| 47 | (arguments
|
| 48 | (list
|
| 49 | #:install-source? #f
|
| 50 | #:phases
|
| 51 | #~(modify-phases %standard-phases
|
| 52 | (add-after 'unpack 'patch-commands
|
| 53 | (lambda* (#:key inputs #:allow-other-keys)
|
| 54 | (substitute* "robocop-json-postprocess"
|
| 55 | (("exec jq")
|
| 56 | (string-append "exec " (search-input-file inputs "bin/jq"))))))
|
| 57 | (add-after 'install 'install-doc
|
| 58 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 59 | (install-file (search-input-file (or native-inputs inputs)
|
| 60 | "share/man/robocop.1.zst")
|
| 61 | (string-append #$output "/share/man"))))
|
| 62 | (add-after 'install 'install-extra-scripts
|
| 63 | (lambda _
|
| 64 | (for-each (lambda (x)
|
| 65 | (install-file x (string-append #$output "/bin")))
|
| 66 | (list "robocop-ch-to-json"
|
| 67 | "robocop-eu-to-json"
|
| 68 | "robocop-un-to-json"
|
| 69 | "robocop-ofac-to-json"
|
| 70 | "robocop-uk-to-json"
|
| 71 | "robocop-json-postprocess"))))
|
| 72 | (add-after 'install-extra-scripts 'wrap-python-path
|
| 73 | (lambda* (#:key outputs #:allow-other-keys)
|
| 74 | (for-each (lambda (x)
|
| 75 | (wrap-script (search-input-file
|
| 76 | outputs (string-append "bin/" x))
|
| 77 | `("GUIX_PYTHONPATH" prefix
|
| 78 | (,(getenv "GUIX_PYTHONPATH")))))
|
| 79 | |
| 80 | |
| 81 | (list "robocop-ch-to-json"
|
| 82 | "robocop-eu-to-json"
|
| 83 | "robocop-un-to-json"
|
| 84 | "robocop-ofac-to-json"
|
| 85 | "robocop-uk-to-json")))))))
|
| 86 | (native-inputs (list taler-docs))
|
| 87 | (inputs (cons* jq
|
| 88 | guile-3.0 |
| 89 | python
|
| 90 | python-lxml
|
| 91 | (cargo-inputs 'robocop)))
|
| 92 | (home-page "https://www.taler.net/")
|
| 93 | (synopsis "@acronym{CTF, Counter Terrorist Financing} sanction \
|
| 94 | processing tool")
|
| 95 | (description "Robocop is a @acronym{CTF, Counter Terrorist Financing}
|
| 96 | sanction processing tool. It can be used for compliance processes in software
|
| 97 | such as @url{https://taler.net, GNU Taler}.")
|
| 98 | (license license:gpl3+)))
|
| 99 |
|
| 100 | (define-public taler-docs
|
| 101 | |
| 102 | (let ((commit "7944885e71fbf970d21e0d9f4fe88dcc08146457")
|
| 103 | (revision "1"))
|
| 104 | (package
|
| 105 | (name "taler-docs")
|
| 106 | (version (git-version "0.0.0" revision commit))
|
| 107 | (source (origin
|
| 108 | (method git-fetch)
|
| 109 | (uri (git-reference
|
| 110 | (url "git://git.taler.net/taler-docs.git")
|
| 111 | (commit commit)))
|
| 112 | (file-name (git-file-name name version))
|
| 113 | (sha256
|
| 114 | (base32
|
| 115 | "1bn9594qh8p88llglgvr71qwl27i8c5sjx0b49wsjfz93d9d0bsa"))
|
| 116 | (modules '((guix build utils)))
|
| 117 | (snippet
|
| 118 | #~(begin
|
| 119 | |
| 120 | (delete-all-but "_exts"
|
| 121 | |
| 122 | "ebicsdomain.py"
|
| 123 | "typescriptdomain.py")
|
| 124 | (substitute* "conf.py"
|
| 125 | (("httpdomain.httpdomain")
|
| 126 | "sphinxcontrib.httpdomain"))))))
|
| 127 | (build-system gnu-build-system)
|
| 128 | (arguments
|
| 129 | (list
|
| 130 | #:tests? #f |
| 131 | #:make-flags #~(list "info" "man")
|
| 132 | #:phases
|
| 133 | #~(modify-phases %standard-phases
|
| 134 | (delete 'configure) |
| 135 | (replace 'install
|
| 136 | (lambda _
|
| 137 | |
| 138 | |
| 139 | |
| 140 | (let ((mandir (string-append #$output "/share/man")))
|
| 141 | (mkdir-p mandir)
|
| 142 | (copy-recursively "_build/man" mandir))
|
| 143 | (invoke "make" "-C" "_build/texinfo"
|
| 144 | "install-info" (string-append "infodir=" #$output
|
| 145 | "/share/info")))))))
|
| 146 | (native-inputs
|
| 147 | (list python-minimal
|
| 148 | python-myst-parser
|
| 149 | python-sphinx
|
| 150 | python-sphinx-design
|
| 151 | python-sphinx-multitoc-numbering
|
| 152 | python-sphinx-plantuml
|
| 153 | python-sphinxcontrib-httpdomain
|
| 154 | python-sphinxcontrib-mermaid
|
| 155 | texinfo))
|
| 156 | (home-page "https://www.taler.net/")
|
| 157 | (synopsis "Documentation of the GNU Taler project")
|
| 158 | (description "This package includes the complete documentation of all
|
| 159 | the GNU Taler components, as Texinfo manuals and man pages.")
|
| 160 | |
| 161 | |
| 162 | (license license:agpl3+))))
|