Commit | Line | Data |
---|---|---|
804744b3 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> | |
3 | ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is> | |
4 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> | |
5 | ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com> | |
6 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> | |
7 | ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> | |
8 | ;;; | |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages haskell-apps) | |
25 | #:use-module (guix download) | |
26 | #:use-module (guix packages) | |
27 | #:use-module ((guix licenses) #:prefix license:) | |
28 | #:use-module (guix build-system haskell) | |
29 | #:use-module (gnu packages base) | |
30 | #:use-module (gnu packages curl) | |
31 | #:use-module (gnu packages haskell) | |
32 | #:use-module (gnu packages haskell-check) | |
33 | #:use-module (gnu packages haskell-crypto) | |
34 | #:use-module (gnu packages haskell-web) | |
35 | #:use-module (gnu packages ncurses) | |
36 | #:use-module (gnu packages perl) | |
37 | #:use-module (gnu packages pkg-config) | |
38 | #:use-module (gnu packages rsync) | |
39 | #:use-module (gnu packages version-control)) | |
40 | ||
41 | ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17 | |
42 | ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000 | |
43 | ;; and results of search engines will show that if the protocol is http, https | |
44 | ;; is never mentioned. | |
45 | (define-public darcs | |
46 | (package | |
47 | (name "darcs") | |
48 | (version "2.14.2") | |
49 | (source | |
50 | (origin | |
51 | (method url-fetch) | |
52 | (uri (string-append "https://hackage.haskell.org/package/darcs/" | |
53 | "darcs-" version ".tar.gz")) | |
54 | (sha256 | |
55 | (base32 | |
56 | "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5")) | |
57 | (modules '((guix build utils))) | |
58 | ;; Remove time-dependent code for reproducibility. | |
59 | (snippet | |
60 | '(begin | |
61 | (substitute* "darcs/darcs.hs" | |
62 | (("__DATE__") "\"1970-01-01\"") | |
63 | (("__TIME__") "\"00:00:00\"")) | |
64 | #t)))) | |
65 | (build-system haskell-build-system) | |
66 | (arguments | |
67 | `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded" | |
68 | "-fnetwork-uri" "-fhttp" "--flag=executable" | |
69 | "--flag=library") | |
70 | #:phases | |
71 | (modify-phases %standard-phases | |
72 | (add-after 'patch-source-shebangs 'patch-sh | |
73 | (lambda _ | |
74 | (substitute* "tests/issue538.sh" | |
75 | (("/bin/sh") (which "sh"))) | |
76 | #t))))) | |
77 | (inputs | |
78 | `(("ghc-cmdargs" ,ghc-cmdargs) | |
79 | ("ghc-split" ,ghc-split) | |
80 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) | |
81 | ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) | |
82 | ("ghc-test-framework" ,ghc-test-framework) | |
83 | ("ghc-quickcheck" ,ghc-quickcheck) | |
84 | ("ghc-findbin" ,ghc-findbin) | |
85 | ("ghc-hunit" ,ghc-hunit) | |
86 | ("ghc-async" ,ghc-async) | |
87 | ("ghc-attoparsec" ,ghc-attoparsec) | |
88 | ("ghc-base16-bytestring" ,ghc-base16-bytestring) | |
89 | ("ghc-bytestring-builder" ,ghc-bytestring-builder) | |
90 | ("ghc-cryptohash" ,ghc-cryptohash) | |
91 | ("ghc-data-ordlist" ,ghc-data-ordlist) | |
92 | ("ghc-fgl" ,ghc-fgl) | |
93 | ("ghc-system-filepath" ,ghc-system-filepath) | |
94 | ("ghc-graphviz" ,ghc-graphviz) | |
95 | ("ghc-hashable" ,ghc-hashable) | |
96 | ("ghc-html" ,ghc-html) | |
97 | ("ghc-mmap" ,ghc-mmap) | |
98 | ("ghc-old-time" ,ghc-old-time) | |
99 | ("ghc-parsec" ,ghc-parsec) | |
100 | ("ghc-random" ,ghc-random) | |
101 | ("ghc-regex-applicative" ,ghc-regex-applicative) | |
102 | ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa) | |
103 | ("ghc-sandi" ,ghc-sandi) | |
104 | ("ghc-shelly" ,ghc-shelly) | |
105 | ("ghc-tar" ,ghc-tar) | |
106 | ("ghc-transformers-compat" ,ghc-transformers-compat) | |
107 | ("ghc-unix-compat" ,ghc-unix-compat) | |
108 | ("ghc-utf8-string" ,ghc-utf8-string) | |
109 | ("ghc-vector" ,ghc-vector) | |
110 | ("ghc-zip-archive" ,ghc-zip-archive) | |
111 | ("ghc-zlib" ,ghc-zlib) | |
112 | ("ghc-http" ,ghc-http) | |
113 | ("curl" ,curl) | |
114 | ("ghc" ,ghc) | |
115 | ("ncurses" ,ncurses) | |
116 | ("perl" ,perl) | |
117 | ("libiconv" ,libiconv) | |
118 | ("ghc-network" ,ghc-network) | |
119 | ("ghc-network-uri" ,ghc-network-uri))) | |
120 | (native-inputs | |
121 | `(("pkg-config" ,pkg-config))) | |
122 | (home-page "http://darcs.net") | |
123 | (synopsis "Distributed Revision Control System") | |
124 | (description | |
125 | "Darcs is a revision control system. It is: | |
126 | ||
127 | @enumerate | |
128 | @item Distributed: Every user has access to the full command set, removing boundaries | |
129 | between server and client or committer and non-committers. | |
130 | @item Interactive: Darcs is easy to learn and efficient to use because it asks you | |
131 | questions in response to simple commands, giving you choices in your work flow. | |
132 | You can choose to record one change in a file, while ignoring another. As you update | |
133 | from upstream, you can review each patch name, even the full diff for interesting | |
134 | patches. | |
135 | @item Smart: Originally developed by physicist David Roundy, darcs is based on a | |
136 | unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}. | |
137 | @end enumerate") | |
138 | (license license:gpl2))) | |
139 | ||
140 | (define-public git-annex | |
141 | (package | |
142 | (name "git-annex") | |
143 | (version "6.20180926") | |
144 | (source | |
145 | (origin | |
146 | (method url-fetch) | |
147 | (uri (string-append "https://hackage.haskell.org/package/" | |
148 | "git-annex/git-annex-" version ".tar.gz")) | |
149 | (sha256 | |
150 | (base32 | |
151 | "1251rj8h63y30sfqk0zh670yhz14p256y59n3590pg015pf3575d")))) | |
152 | (build-system haskell-build-system) | |
153 | (arguments | |
154 | `(#:configure-flags | |
155 | '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV") | |
156 | #:phases | |
157 | (modify-phases %standard-phases | |
158 | (add-before 'configure 'patch-shell | |
159 | (lambda _ | |
160 | (substitute* "Utility/Shell.hs" | |
161 | (("/bin/sh") (which "sh"))) | |
162 | #t)) | |
163 | (add-before 'configure 'factor-setup | |
164 | (lambda _ | |
165 | ;; Factor out necessary build logic from the provided | |
166 | ;; `Setup.hs' script. The script as-is does not work because | |
167 | ;; it cannot find its dependencies, and there is no obvious way | |
168 | ;; to tell it where to look. Note that we do not preserve the | |
169 | ;; code that installs man pages here. | |
170 | (call-with-output-file "PreConf.hs" | |
171 | (lambda (out) | |
172 | (format out "import qualified Build.Configure as Configure~%") | |
173 | (format out "main = Configure.run Configure.tests~%"))) | |
174 | (call-with-output-file "Setup.hs" | |
175 | (lambda (out) | |
176 | (format out "import Distribution.Simple~%") | |
177 | (format out "main = defaultMain~%"))) | |
178 | #t)) | |
179 | (add-before 'configure 'pre-configure | |
180 | (lambda _ | |
181 | (invoke "runhaskell" "PreConf.hs") | |
182 | #t)) | |
183 | (replace 'check | |
184 | (lambda _ | |
185 | ;; We need to set the path so that Git recognizes | |
186 | ;; `git annex' as a custom command. | |
187 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
188 | (getcwd) "/dist/build/git-annex")) | |
189 | (with-directory-excursion "dist/build/git-annex" | |
190 | (symlink "git-annex" "git-annex-shell")) | |
191 | (invoke "git-annex" "test") | |
192 | #t)) | |
193 | (add-after 'install 'install-symlinks | |
194 | (lambda* (#:key outputs #:allow-other-keys) | |
195 | (let* ((out (assoc-ref outputs "out")) | |
196 | (bin (string-append out "/bin"))) | |
197 | (symlink (string-append bin "/git-annex") | |
198 | (string-append bin "/git-annex-shell")) | |
199 | (symlink (string-append bin "/git-annex") | |
200 | (string-append bin "/git-remote-tor-annex")) | |
201 | #t)))))) | |
202 | (inputs | |
203 | `(("curl" ,curl) | |
204 | ("ghc-aeson" ,ghc-aeson) | |
205 | ("ghc-async" ,ghc-async) | |
206 | ("ghc-bloomfilter" ,ghc-bloomfilter) | |
207 | ("ghc-byteable" ,ghc-byteable) | |
208 | ("ghc-case-insensitive" ,ghc-case-insensitive) | |
209 | ("ghc-crypto-api" ,ghc-crypto-api) | |
210 | ("ghc-cryptonite" ,ghc-cryptonite) | |
211 | ("ghc-data-default" ,ghc-data-default) | |
212 | ("ghc-disk-free-space" ,ghc-disk-free-space) | |
213 | ("ghc-dlist" ,ghc-dlist) | |
214 | ("ghc-edit-distance" ,ghc-edit-distance) | |
215 | ("ghc-esqueleto" ,ghc-esqueleto) | |
216 | ("ghc-exceptions" ,ghc-exceptions) | |
217 | ("ghc-feed" ,ghc-feed) | |
218 | ("ghc-free" ,ghc-free) | |
219 | ("ghc-hslogger" ,ghc-hslogger) | |
220 | ("ghc-http-client" ,ghc-http-client) | |
221 | ("ghc-http-conduit" ,ghc-http-conduit) | |
222 | ("ghc-http-types" ,ghc-http-types) | |
223 | ("ghc-ifelse" ,ghc-ifelse) | |
224 | ("ghc-memory" ,ghc-memory) | |
225 | ("ghc-monad-control" ,ghc-monad-control) | |
226 | ("ghc-monad-logger" ,ghc-monad-logger) | |
227 | ("ghc-network" ,ghc-network) | |
228 | ("ghc-old-locale" ,ghc-old-locale) | |
229 | ("ghc-optparse-applicative" ,ghc-optparse-applicative) | |
230 | ("ghc-persistent" ,ghc-persistent) | |
231 | ("ghc-persistent-sqlite" ,ghc-persistent-sqlite) | |
232 | ("ghc-persistent-template" ,ghc-persistent-template) | |
233 | ("ghc-quickcheck" ,ghc-quickcheck) | |
234 | ("ghc-random" ,ghc-random) | |
235 | ("ghc-regex-tdfa" ,ghc-regex-tdfa) | |
236 | ("ghc-resourcet" ,ghc-resourcet) | |
237 | ("ghc-safesemaphore" ,ghc-safesemaphore) | |
238 | ("ghc-sandi" ,ghc-sandi) | |
239 | ("ghc-securemem" ,ghc-securemem) | |
240 | ("ghc-socks" ,ghc-socks) | |
241 | ("ghc-split" ,ghc-split) | |
242 | ("ghc-stm" ,ghc-stm) | |
243 | ("ghc-stm-chans" ,ghc-stm-chans) | |
244 | ("ghc-tagsoup" ,ghc-tagsoup) | |
245 | ("ghc-text" ,ghc-text) | |
246 | ("ghc-unix-compat" ,ghc-unix-compat) | |
247 | ("ghc-unordered-containers" ,ghc-unordered-containers) | |
248 | ("ghc-utf8-string" ,ghc-utf8-string) | |
249 | ("ghc-uuid" ,ghc-uuid) | |
250 | ("git" ,git) | |
251 | ("rsync" ,rsync))) | |
252 | (native-inputs | |
253 | `(("ghc-tasty" ,ghc-tasty) | |
254 | ("ghc-tasty-hunit" ,ghc-tasty-hunit) | |
255 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) | |
256 | ("ghc-tasty-rerun" ,ghc-tasty-rerun))) | |
257 | (home-page "https://git-annex.branchable.com/") | |
258 | (synopsis "Manage files with Git, without checking in their contents") | |
259 | (description "This package allows managing files with Git, without | |
260 | checking the file contents into Git. It can store files in many places, | |
261 | such as local hard drives and cloud storage services. It can also be | |
262 | used to keep a folder in sync between computers.") | |
263 | ;; The web app is released under the AGPLv3+. | |
264 | (license (list license:gpl3+ | |
265 | license:agpl3+)))) |