Commit | Line | Data |
---|---|---|
dcee3fc5 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
cf3fe3b0 | 3 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> |
93d13702 | 4 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
fc1e4516 | 5 | ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> |
62063d85 | 6 | ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org> |
6c0e2dbb | 7 | ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> |
4929ee9b | 8 | ;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org> |
4aeb7f34 | 9 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
3855506f | 10 | ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com> |
6306ce72 | 11 | ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
8343d373 | 12 | ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> |
47956fa0 | 13 | ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is> |
0aaab7f8 | 14 | ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
136968fb | 15 | ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com> |
0ea45ef4 | 16 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
ed2b7cb2 | 17 | ;;; Copyright © 2017 André <eu@euandre.org> |
ea4be20a | 18 | ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> |
205441eb | 19 | ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> |
ca3c1439 | 20 | ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com> |
0ed7498a | 21 | ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> |
57c5aa7c | 22 | ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net> |
a078a6ec | 23 | ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com> |
72816ebe | 24 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
66d05055 | 25 | ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net> |
a3e6cf98 | 26 | ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net> |
623d4b46 | 27 | ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> |
10576acb | 28 | ;;; Copyright © 2020 Roel Janssen <roel@gnu.org> |
dcee3fc5 NK |
29 | ;;; |
30 | ;;; This file is part of GNU Guix. | |
31 | ;;; | |
32 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
33 | ;;; under the terms of the GNU General Public License as published by | |
34 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
35 | ;;; your option) any later version. | |
36 | ;;; | |
37 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
38 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
39 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
40 | ;;; GNU General Public License for more details. | |
41 | ;;; | |
42 | ;;; You should have received a copy of the GNU General Public License | |
43 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
44 | ||
1b1c335f | 45 | (define-module (gnu packages version-control) |
369387b6 | 46 | #:use-module ((guix licenses) #:prefix license:) |
d1cba090 | 47 | #:use-module (guix utils) |
dcee3fc5 NK |
48 | #:use-module (guix packages) |
49 | #:use-module (guix download) | |
c7810bd1 | 50 | #:use-module (guix git-download) |
086e498b | 51 | #:use-module (guix build-system cmake) |
1b1c335f | 52 | #:use-module (guix build-system gnu) |
a3e6cf98 | 53 | #:use-module (guix build-system go) |
dcee3fc5 | 54 | #:use-module (guix build-system python) |
c7810bd1 | 55 | #:use-module (guix build-system trivial) |
2b24faa2 | 56 | #:use-module (gnu packages apr) |
df7393b9 | 57 | #:use-module (gnu packages autotools) |
99828fa7 | 58 | #:use-module (gnu packages documentation) |
c7810bd1 | 59 | #:use-module (gnu packages base) |
24112773 | 60 | #:use-module (gnu packages bash) |
0e534e74 | 61 | #:use-module (gnu packages bison) |
ca3c1439 | 62 | #:use-module (gnu packages boost) |
ea4be20a | 63 | #:use-module (gnu packages check) |
0e534e74 | 64 | #:use-module (gnu packages cook) |
d9ff410f | 65 | #:use-module (gnu packages curl) |
59ef2030 | 66 | #:use-module (gnu packages docbook) |
740c24df | 67 | #:use-module (gnu packages ed) |
0e534e74 JD |
68 | #:use-module (gnu packages file) |
69 | #:use-module (gnu packages flex) | |
fc1e4516 | 70 | #:use-module (gnu packages gettext) |
ca3c1439 | 71 | #:use-module (gnu packages gl) |
0e534e74 | 72 | #:use-module (gnu packages groff) |
03fb5ff6 | 73 | #:use-module (gnu packages guile) |
ca3c1439 | 74 | #:use-module (gnu packages image) |
0e534e74 | 75 | #:use-module (gnu packages linux) |
add8d509 | 76 | #:use-module (gnu packages mail) |
ca3c1439 | 77 | #:use-module (gnu packages maths) |
1972fed4 | 78 | #:use-module (gnu packages nano) |
2459141e | 79 | #:use-module (gnu packages ncurses) |
378b01dc | 80 | #:use-module (gnu packages ssh) |
46138f3e | 81 | #:use-module (gnu packages web) |
e8d2168c | 82 | #:use-module (gnu packages openstack) |
ca3c1439 | 83 | #:use-module (gnu packages pcre) |
cf3fe3b0 | 84 | #:use-module (gnu packages perl) |
5ccde207 | 85 | #:use-module (gnu packages perl-check) |
fc1e4516 | 86 | #:use-module (gnu packages pkg-config) |
cf3fe3b0 | 87 | #:use-module (gnu packages python) |
1b2f753d | 88 | #:use-module (gnu packages python-web) |
44d10b1f | 89 | #:use-module (gnu packages python-xyz) |
d0e11e8b | 90 | #:use-module (gnu packages readline) |
a078a6ec | 91 | #:use-module (gnu packages rsync) |
cd0322a3 | 92 | #:use-module (gnu packages sqlite) |
9de46ffb | 93 | #:use-module (gnu packages admin) |
d9ff410f | 94 | #:use-module (gnu packages xml) |
a4572a17 | 95 | #:use-module (gnu packages emacs) |
8b2fe785 | 96 | #:use-module (gnu packages compression) |
ca3c1439 | 97 | #:use-module (gnu packages sdl) |
ecfb6993 | 98 | #:use-module (gnu packages swig) |
623d4b46 | 99 | #:use-module (gnu packages sync) |
25f76ef0 | 100 | #:use-module (gnu packages tcl) |
71653653 | 101 | #:use-module (gnu packages textutils) |
33dc54b0 | 102 | #:use-module (gnu packages time) |
cc2b77df | 103 | #:use-module (gnu packages tls) |
58c18069 EB |
104 | #:use-module (gnu packages) |
105 | #:use-module (ice-9 match) | |
106 | #:use-module (srfi srfi-1)) | |
dcee3fc5 NK |
107 | |
108 | (define-public bazaar | |
109 | (package | |
110 | (name "bazaar") | |
d1cba090 | 111 | (version "2.7.0") |
dcee3fc5 NK |
112 | (source |
113 | (origin | |
114 | (method url-fetch) | |
d1cba090 EF |
115 | (uri (string-append "https://launchpad.net/bzr/" |
116 | (version-major+minor version) "/" version | |
dcee3fc5 | 117 | "/+download/bzr-" version ".tar.gz")) |
982caeab | 118 | (patches (search-patches "bazaar-CVE-2017-14176.patch")) |
dcee3fc5 NK |
119 | (sha256 |
120 | (base32 | |
d1cba090 | 121 | "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d")))) |
dcee3fc5 NK |
122 | (build-system python-build-system) |
123 | (inputs | |
124 | ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh' | |
125 | ;; require Zsh. | |
b94a6ca0 | 126 | `(("gettext" ,gettext-minimal))) |
dcee3fc5 | 127 | (arguments |
1611eccd | 128 | `(#:tests? #f ; no test target |
3b9af0f3 | 129 | #:python ,python-2 ; Python 3 apparently not yet supported, see |
1611eccd | 130 | ; https://answers.launchpad.net/bzr/+question/229048 |
730c740e EF |
131 | #:phases |
132 | (modify-phases %standard-phases | |
133 | (add-after 'unpack 'fix-mandir | |
134 | (lambda _ | |
135 | (substitute* "setup.py" | |
136 | (("man/man1") "share/man/man1")) | |
137 | #t))))) | |
dcee3fc5 | 138 | (home-page "https://gnu.org/software/bazaar") |
79c311b8 | 139 | (synopsis "Version control system supporting both distributed and centralized workflows") |
dcee3fc5 | 140 | (description |
79c311b8 | 141 | "GNU Bazaar is a version control system that allows you to record |
35b9e423 | 142 | changes to project files over time. It supports both a distributed workflow |
79c311b8 | 143 | as well as the classic centralized workflow.") |
369387b6 | 144 | (license license:gpl2+))) |
1b1c335f | 145 | |
6beb6cc6 MO |
146 | (define git-cross-configure-flags |
147 | '("ac_cv_fread_reads_directories=yes" | |
148 | "ac_cv_snprintf_returns_bogus=no")) | |
149 | ||
d9ff410f AE |
150 | (define-public git |
151 | (package | |
152 | (name "git") | |
19a3e7f8 LF |
153 | ;; XXX When updating Git, check if the special 'git-source' input to cgit |
154 | ;; needs to be updated as well. | |
0aaab7f8 | 155 | (version "2.25.0") |
d9ff410f AE |
156 | (source (origin |
157 | (method url-fetch) | |
4d96439d | 158 | (uri (string-append "mirror://kernel.org/software/scm/git/git-" |
ff212a5c | 159 | version ".tar.xz")) |
d9ff410f AE |
160 | (sha256 |
161 | (base32 | |
0aaab7f8 | 162 | "1l58v42aazj0x9276gk8r9mwyl9pgp9w99aakz4xfhzv7wd2jq60")))) |
d9ff410f | 163 | (build-system gnu-build-system) |
2a5e15c6 LC |
164 | (native-inputs |
165 | `(("native-perl" ,perl) | |
b94a6ca0 | 166 | ("gettext" ,gettext-minimal) |
d1cada04 LF |
167 | ("git-manpages" |
168 | ,(origin | |
169 | (method url-fetch) | |
170 | (uri (string-append | |
171 | "mirror://kernel.org/software/scm/git/git-manpages-" | |
172 | version ".tar.xz")) | |
173 | (sha256 | |
174 | (base32 | |
0aaab7f8 | 175 | "1gf8b1k6i4dlwskwq7dd2vz9bzc3m1qnknj9daq2vp39vmxpg5nk")))) |
13164135 PN |
176 | ;; For subtree documentation. |
177 | ("asciidoc" ,asciidoc) | |
178 | ("docbook-xsl" ,docbook-xsl) | |
179 | ("xmlto" ,xmlto))) | |
d9ff410f AE |
180 | (inputs |
181 | `(("curl" ,curl) | |
182 | ("expat" ,expat) | |
d9ff410f AE |
183 | ("openssl" ,openssl) |
184 | ("perl" ,perl) | |
d1f30e99 | 185 | ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL |
ed5f49ff LC |
186 | ("zlib" ,zlib) |
187 | ||
24112773 MB |
188 | ;; Note: we keep this in inputs rather than native-inputs to work around |
189 | ;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>. | |
190 | ("bash-for-tests" ,bash) | |
191 | ||
abb6a0e0 PN |
192 | ;; For PCRE support in git grep (USE_LIBPCRE2). |
193 | ("pcre" ,pcre2) | |
194 | ||
195 | ;; For 'gitweb.cgi'. | |
3bec8a01 RW |
196 | ("perl-cgi" ,perl-cgi) |
197 | ||
ed5f49ff | 198 | ;; For 'git-svn'. |
ecfb6993 | 199 | ("subversion" ,subversion) |
b411517a | 200 | ("perl-term-readkey" ,perl-term-readkey) |
ecfb6993 | 201 | |
abb6a0e0 | 202 | ;; For 'git-send-email'. |
58c18069 EB |
203 | ("perl-authen-sasl" ,perl-authen-sasl) |
204 | ("perl-net-smtp-ssl" ,perl-net-smtp-ssl) | |
205 | ("perl-io-socket-ssl" ,perl-io-socket-ssl) | |
206 | ||
ecfb6993 LC |
207 | ;; For 'git gui', 'gitk', and 'git citool'. |
208 | ("tcl" ,tcl) | |
209 | ("tk" ,tk))) | |
210 | (outputs '("out" ; the core | |
58c18069 | 211 | "send-email" ; for git-send-email |
ecfb6993 | 212 | "svn" ; git-svn |
145b0693 | 213 | "credential-netrc" ; git-credential-netrc |
13164135 | 214 | "subtree" ; git-subtree |
ecfb6993 | 215 | "gui")) ; gitk, git gui |
d9ff410f | 216 | (arguments |
1a59b6d0 LC |
217 | `(#:make-flags `("V=1" ;more verbose compilation |
218 | ||
24112773 MB |
219 | ,(string-append "SHELL_PATH=" |
220 | (assoc-ref %build-inputs "bash") | |
221 | "/bin/sh") | |
222 | ||
223 | ;; Tests require a bash with completion support. | |
224 | ,(string-append "TEST_SHELL_PATH=" | |
225 | (assoc-ref %build-inputs "bash-for-tests") | |
226 | "/bin/bash") | |
227 | ||
abb6a0e0 PN |
228 | "USE_LIBPCRE2=yes" |
229 | ||
1a59b6d0 LC |
230 | ;; By default 'make install' creates hard links for |
231 | ;; things in 'libexec/git-core', which leads to huge | |
9006f8bc | 232 | ;; nars; see <https://bugs.gnu.org/21949>. |
1a59b6d0 | 233 | "NO_INSTALL_HARDLINKS=indeed") |
24112773 MB |
234 | |
235 | ;; Make sure the full bash does not end up in the final closure. | |
236 | #:disallowed-references (,bash) | |
237 | ||
d9ff410f | 238 | #:test-target "test" |
ecfb6993 | 239 | |
c03ba83c LC |
240 | ;; Tests fail randomly when parallel: <https://bugs.gnu.org/29512>. |
241 | #:parallel-tests? #f | |
242 | ||
ecfb6993 LC |
243 | ;; The explicit --with-tcltk forces the build system to hardcode the |
244 | ;; absolute file name to 'wish'. | |
245 | #:configure-flags (list (string-append "--with-tcltk=" | |
246 | (assoc-ref %build-inputs "tk") | |
6beb6cc6 MO |
247 | "/bin/wish8.6") ; XXX |
248 | ,@(if (%current-target-system) | |
249 | git-cross-configure-flags | |
250 | '())) | |
ecfb6993 | 251 | |
58c18069 | 252 | #:modules ((srfi srfi-1) |
24112773 | 253 | (srfi srfi-26) |
58c18069 | 254 | ,@%gnu-build-system-modules) |
d9ff410f | 255 | #:phases |
98378db6 | 256 | (modify-phases %standard-phases |
24112773 MB |
257 | (add-after 'unpack 'modify-PATH |
258 | (lambda* (#:key inputs #:allow-other-keys) | |
259 | (let ((path (string-split (getenv "PATH") #\:)) | |
260 | (bash-full (assoc-ref inputs "bash-for-tests"))) | |
261 | ;; Drop the test bash from PATH so that (which "sh") and | |
262 | ;; similar does the right thing. | |
263 | (setenv "PATH" (string-join | |
264 | (remove (cut string-prefix? bash-full <>) path) | |
265 | ":")) | |
266 | #t))) | |
6beb6cc6 MO |
267 | ;; Add cross curl-config script to PATH when cross-compiling. |
268 | ,@(if (%current-target-system) | |
269 | '((add-before 'configure 'add-cross-curl-config | |
270 | (lambda* (#:key inputs #:allow-other-keys) | |
271 | (setenv "PATH" | |
272 | (string-append (assoc-ref inputs "curl") "/bin:" | |
273 | (getenv "PATH"))) | |
274 | #t))) | |
275 | '()) | |
0fff1495 | 276 | (add-after 'configure 'patch-makefiles |
98378db6 LC |
277 | (lambda _ |
278 | (substitute* "Makefile" | |
98378db6 | 279 | (("/usr/bin/perl") (which "perl")) |
0fff1495 | 280 | (("/usr/bin/python") (which "python"))) |
0fff1495 | 281 | #t)) |
8601feae LC |
282 | (add-after 'configure 'add-PM.stamp |
283 | (lambda _ | |
284 | ;; Add the "PM.stamp" to avoid "no rule to make target". | |
285 | (call-with-output-file "perl/PM.stamp" (const #t)) | |
286 | #t)) | |
13164135 PN |
287 | (add-after 'build 'build-subtree |
288 | (lambda* (#:key inputs #:allow-other-keys) | |
289 | (with-directory-excursion "contrib/subtree" | |
290 | (substitute* "Makefile" | |
291 | ;; Apparently `xmlto' does not bother to looks up the stylesheets | |
292 | ;; specified in the XML, unlike the above substitution. Instead it | |
293 | ;; uses a hard-coded URL. Work around it here, but if this is | |
294 | ;; common perhaps we should hardcode this path in xmlto itself. | |
295 | (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\) man") | |
296 | (string-append "$(XMLTO) -x " | |
297 | (string-append (assoc-ref inputs "docbook-xsl") | |
298 | "/xml/xsl/docbook-xsl-" | |
299 | ,(package-version docbook-xsl)) | |
300 | "/manpages/docbook.xsl -m $(MANPAGE_XSL) man"))) | |
301 | (invoke "make") | |
302 | (invoke "make" "install") | |
303 | (invoke "make" "install-doc") | |
304 | (substitute* "git-subtree" | |
305 | (("/bin/sh") (which "sh")))) | |
306 | #t)) | |
c9f4f56b MB |
307 | (add-before 'check 'patch-tests |
308 | (lambda _ | |
6e0efe8c Y |
309 | (let ((store-directory (%store-directory))) |
310 | ;; These files contain some funny bytes that Guile is unable | |
311 | ;; to decode for shebang patching. Just delete them. | |
312 | (for-each delete-file '("t/t4201-shortlog.sh" | |
313 | "t/t7813-grep-icase-iso.sh")) | |
314 | ;; Many tests contain inline shell scripts (hooks etc). | |
315 | (substitute* (find-files "t" "\\.sh$") | |
316 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
317 | ;; Un-do shebang patching here to prevent checksum mismatch. | |
318 | (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post") | |
319 | (("^#!.*/bin/perl") "#!/usr/bin/perl")) | |
320 | (substitute* "t/t5003-archive-zip.sh" | |
321 | (("cp /bin/sh") (string-append "cp " (which "sh")))) | |
322 | (substitute* "t/t6030-bisect-porcelain.sh" | |
323 | (("\"/bin/sh\"") (string-append "\"" (which "sh") "\""))) | |
324 | ;; FIXME: This test runs `git commit` with a bogus EDITOR | |
325 | ;; and empty commit message, but does not fail the way it's | |
326 | ;; expected to. The test passes when invoked interactively. | |
327 | (substitute* "t/t7508-status.sh" | |
328 | (("\tcommit_template_commented") "\ttrue")) | |
329 | ;; More checksum mismatches due to odd shebangs. | |
330 | (substitute* "t/t9100-git-svn-basic.sh" | |
331 | (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") ) | |
332 | (substitute* "t/t9300-fast-import.sh" | |
333 | (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh") | |
334 | (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh")) | |
335 | ;; FIXME: Some hooks fail with "basename: command not found". | |
336 | ;; See 't/trash directory.t9164.../svn-hook.log'. | |
337 | (delete-file "t/t9164-git-svn-dcommit-concurrent.sh") | |
c7699ebe | 338 | |
6e0efe8c Y |
339 | ;; XXX: These tests fail intermittently for unknown reasons: |
340 | ;; <https://bugs.gnu.org/29546>. | |
341 | (for-each delete-file | |
342 | '("t/t9128-git-svn-cmd-branch.sh" | |
343 | "t/t9167-git-svn-cmd-branch-subproject.sh" | |
344 | "t/t9141-git-svn-multiple-branches.sh")) | |
345 | #t))) | |
98378db6 LC |
346 | (add-after 'install 'install-shell-completion |
347 | (lambda* (#:key outputs #:allow-other-keys) | |
348 | (let* ((out (assoc-ref outputs "out")) | |
349 | (completions (string-append out "/etc/bash_completion.d"))) | |
350 | ;; TODO: Install the tcsh and zsh completions in the right place. | |
351 | (mkdir-p completions) | |
352 | (copy-file "contrib/completion/git-completion.bash" | |
353 | (string-append completions "/git")) | |
354 | #t))) | |
145b0693 PN |
355 | (add-after 'install 'install-credential-netrc |
356 | (lambda* (#:key outputs #:allow-other-keys) | |
357 | (let* ((netrc (assoc-ref outputs "credential-netrc"))) | |
358 | (install-file "contrib/credential/netrc/git-credential-netrc" | |
359 | (string-append netrc "/bin")) | |
1cfcb841 PN |
360 | ;; Previously, Git.pm was automatically found by netrc. |
361 | ;; Perl 5.26 changed how it locates modules so that @INC no | |
362 | ;; longer includes the current working directory (the Perl | |
363 | ;; community calls this "dotless @INC"). | |
364 | (wrap-program (string-append netrc "/bin/git-credential-netrc") | |
365 | `("PERL5LIB" ":" prefix | |
366 | (,(string-append (assoc-ref outputs "out") "/share/perl5")))) | |
145b0693 | 367 | #t))) |
13164135 PN |
368 | (add-after 'install 'install-subtree |
369 | (lambda* (#:key outputs #:allow-other-keys) | |
370 | (let ((subtree (assoc-ref outputs "subtree"))) | |
371 | (install-file "contrib/subtree/git-subtree" | |
372 | (string-append subtree "/bin")) | |
373 | (install-file "contrib/subtree/git-subtree.1" | |
374 | (string-append subtree "/share/man/man1")) | |
375 | #t))) | |
98378db6 | 376 | (add-after 'install 'split |
23c0e743 LC |
377 | (lambda* (#:key inputs outputs #:allow-other-keys) |
378 | ;; Split the binaries to the various outputs. | |
379 | (let* ((out (assoc-ref outputs "out")) | |
58c18069 | 380 | (se (assoc-ref outputs "send-email")) |
23c0e743 LC |
381 | (svn (assoc-ref outputs "svn")) |
382 | (gui (assoc-ref outputs "gui")) | |
383 | (gitk (string-append out "/bin/gitk")) | |
384 | (gitk* (string-append gui "/bin/gitk")) | |
385 | (git-gui (string-append out "/libexec/git-core/git-gui")) | |
386 | (git-gui* (string-append gui "/libexec/git-core/git-gui")) | |
387 | (git-cit (string-append out "/libexec/git-core/git-citool")) | |
388 | (git-cit* (string-append gui "/libexec/git-core/git-citool")) | |
58c18069 EB |
389 | (git-se (string-append out "/libexec/git-core/git-send-email")) |
390 | (git-se* (string-append se "/libexec/git-core/git-send-email")) | |
23c0e743 LC |
391 | (git-svn (string-append out "/libexec/git-core/git-svn")) |
392 | (git-svn* (string-append svn "/libexec/git-core/git-svn")) | |
393 | (git-sm (string-append out | |
394 | "/libexec/git-core/git-submodule"))) | |
395 | (mkdir-p (string-append gui "/bin")) | |
396 | (mkdir-p (string-append gui "/libexec/git-core")) | |
58c18069 | 397 | (mkdir-p (string-append se "/libexec/git-core")) |
23c0e743 | 398 | (mkdir-p (string-append svn "/libexec/git-core")) |
ecfb6993 | 399 | |
23c0e743 LC |
400 | (for-each (lambda (old new) |
401 | (copy-file old new) | |
402 | (delete-file old) | |
403 | (chmod new #o555)) | |
58c18069 EB |
404 | (list gitk git-gui git-cit git-se git-svn) |
405 | (list gitk* git-gui* git-cit* git-se* git-svn*)) | |
ed5f49ff | 406 | |
b411517a | 407 | ;; Tell 'git-svn' where Subversion and perl-term-readkey are. |
23c0e743 LC |
408 | (wrap-program git-svn* |
409 | `("PATH" ":" prefix | |
410 | (,(string-append (assoc-ref inputs "subversion") | |
411 | "/bin"))) | |
412 | `("PERL5LIB" ":" prefix | |
b411517a TD |
413 | ,(map (lambda (i) (string-append (assoc-ref inputs i) |
414 | "/lib/perl5/site_perl")) | |
415 | '("subversion" "perl-term-readkey"))) | |
ed5f49ff | 416 | |
23c0e743 LC |
417 | ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so |
418 | ;; help it find 'libsvn_client-1.so'. | |
419 | `("LD_LIBRARY_PATH" ":" prefix | |
420 | (,(string-append (assoc-ref inputs "subversion") | |
421 | "/lib")))) | |
0a5a1db2 | 422 | |
58c18069 EB |
423 | ;; Tell 'git-send-email' where perl modules are. |
424 | (wrap-program git-se* | |
425 | `("PERL5LIB" ":" prefix | |
426 | ,(map (lambda (o) (string-append o "/lib/perl5/site_perl")) | |
355e53c4 | 427 | (list |
a6d0b306 | 428 | ,@(transitive-input-references |
355e53c4 | 429 | 'inputs |
a6d0b306 | 430 | (map (lambda (l) |
adb6462c | 431 | (assoc l (package-inputs this-package))) |
a6d0b306 EB |
432 | '("perl-authen-sasl" |
433 | "perl-net-smtp-ssl" | |
434 | "perl-io-socket-ssl"))))))) | |
3bec8a01 RW |
435 | |
436 | ;; Tell 'gitweb.cgi' where perl modules are. | |
437 | (wrap-program (string-append out "/share/gitweb/gitweb.cgi") | |
438 | `("PERL5LIB" ":" prefix | |
439 | ,(map (lambda (o) (string-append o "/lib/perl5/site_perl")) | |
440 | (list | |
441 | ,@(transitive-input-references | |
442 | 'inputs | |
443 | (map (lambda (l) | |
adb6462c | 444 | (assoc l (package-inputs this-package))) |
3bec8a01 | 445 | '("perl-cgi"))))))) |
58c18069 | 446 | |
23c0e743 LC |
447 | ;; Tell 'git-submodule' where Perl is. |
448 | (wrap-program git-sm | |
449 | `("PATH" ":" prefix | |
450 | (,(string-append (assoc-ref inputs "perl") | |
ecb67a18 MW |
451 | "/bin")))) |
452 | ||
453 | #t))) | |
d1cada04 LF |
454 | (add-after 'split 'install-man-pages |
455 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
456 | (let* ((out (assoc-ref outputs "out")) | |
457 | (man (string-append out "/share/man")) | |
458 | (manpages (assoc-ref inputs "git-manpages"))) | |
459 | (mkdir-p man) | |
460 | (with-directory-excursion man | |
ecb67a18 | 461 | (invoke "tar" "xvf" manpages)))))))) |
da699774 LC |
462 | |
463 | (native-search-paths | |
464 | ;; For HTTPS access, Git needs a single-file certificate bundle, specified | |
465 | ;; with $GIT_SSL_CAINFO. | |
da699774 LC |
466 | (list (search-path-specification |
467 | (variable "GIT_SSL_CAINFO") | |
6d461b21 | 468 | (file-type 'regular) |
fcd75bdb | 469 | (separator #f) ;single entry |
82de2655 DC |
470 | (files '("etc/ssl/certs/ca-certificates.crt"))) |
471 | (search-path-specification | |
472 | (variable "GIT_EXEC_PATH") | |
e3ff8383 | 473 | (separator #f) ;single entry |
82de2655 | 474 | (files '("libexec/git-core"))))) |
da699774 | 475 | |
d9ff410f AE |
476 | (synopsis "Distributed version control system") |
477 | (description | |
478 | "Git is a free distributed version control system designed to handle | |
479 | everything from small to very large projects with speed and efficiency.") | |
369387b6 | 480 | (license license:gpl2) |
9006f8bc | 481 | (home-page "https://git-scm.com/"))) |
d9ff410f | 482 | |
c23cf183 LC |
483 | (define-public git-minimal |
484 | ;; The size of the closure of 'git-minimal' is two thirds that of 'git'. | |
485 | ;; Its test suite runs slightly faster and most importantly it doesn't | |
486 | ;; depend on packages that are expensive to build such as Subversion. | |
487 | (package | |
488 | (inherit git) | |
489 | (name "git-minimal") | |
490 | (arguments | |
491 | (substitute-keyword-arguments (package-arguments git) | |
492 | ((#:phases phases) | |
493 | `(modify-phases ,phases | |
494 | (replace 'patch-makefiles | |
495 | (lambda _ | |
496 | (substitute* "Makefile" | |
497 | (("/usr/bin/perl") (which "perl"))) | |
498 | #t)) | |
499 | (delete 'build-subtree) | |
500 | (delete 'split) | |
501 | (delete 'install-man-pages) | |
502 | (delete 'install-subtree) | |
503 | (delete 'install-credential-netrc) | |
504 | (add-before 'check 'delete-svn-test | |
505 | (lambda _ | |
506 | ;; This test cannot run since we are not building 'git-svn'. | |
507 | (delete-file "t/t9020-remote-svn.sh") | |
508 | #t)) | |
509 | (add-after 'install 'remove-unusable-perl-commands | |
510 | (lambda* (#:key outputs #:allow-other-keys) | |
511 | (let* ((out (assoc-ref outputs "out")) | |
512 | (bin (string-append out "/bin")) | |
513 | (libexec (string-append out "/libexec"))) | |
514 | (for-each (lambda (file) | |
515 | (delete-file (string-append libexec | |
516 | "/git-core/" file))) | |
517 | '("git-svn" "git-cvsimport" "git-archimport" | |
518 | "git-cvsserver" "git-request-pull" | |
519 | "git-add--interactive" "git-cvsexportcommit" | |
520 | "git-instaweb" "git-send-email")) | |
521 | (delete-file (string-append bin "/git-cvsserver")) | |
522 | ||
523 | ;; These templates typically depend on Perl. Remove them. | |
524 | (delete-file-recursively | |
525 | (string-append out "/share/git-core/templates/hooks")) | |
526 | ||
527 | ;; Gitweb depends on Perl as well. | |
528 | (delete-file-recursively | |
529 | (string-append out "/share/gitweb")) | |
530 | #t))))) | |
abb6a0e0 PN |
531 | ((#:make-flags flags) |
532 | `(delete "USE_LIBPCRE2=yes" ,flags)) | |
c23cf183 | 533 | ((#:configure-flags flags) |
6beb6cc6 MO |
534 | `(list |
535 | ,@(if (%current-target-system) | |
536 | git-cross-configure-flags | |
537 | '()))) | |
c23cf183 LC |
538 | ((#:disallowed-references lst '()) |
539 | `(,perl ,@lst)))) | |
540 | (outputs '("out")) | |
541 | (native-inputs | |
542 | `(("native-perl" ,perl) | |
543 | ("gettext" ,gettext-minimal))) | |
544 | (inputs | |
545 | `(("curl" ,curl) ;for HTTP(S) access | |
546 | ("expat" ,expat) ;for 'git push' over HTTP(S) | |
547 | ("openssl" ,openssl) | |
548 | ("perl" ,perl) | |
549 | ("zlib" ,zlib) | |
550 | ("bash-for-tests" ,bash))))) | |
551 | ||
086e498b RW |
552 | (define-public libgit2 |
553 | (package | |
554 | (name "libgit2") | |
0222de2c | 555 | (version "0.28.4") |
086e498b | 556 | (source (origin |
22c88f5d TGR |
557 | (method git-fetch) |
558 | (uri (git-reference | |
559 | (url "https://github.com/libgit2/libgit2.git") | |
560 | (commit (string-append "v" version)))) | |
561 | (file-name (git-file-name name version)) | |
086e498b RW |
562 | (sha256 |
563 | (base32 | |
0222de2c | 564 | "171b25aym4q88bidc4c76y4l6jmdwifm3q9zjqsll0wjhlkycfy1")) |
03fb5ff6 DM |
565 | (patches (search-patches "libgit2-avoid-python.patch" |
566 | "libgit2-mtime-0.patch")) | |
53d26163 LC |
567 | |
568 | ;; Remove bundled software. | |
6cbee49d MW |
569 | (snippet '(begin |
570 | (delete-file-recursively "deps") | |
571 | #t)) | |
53d26163 | 572 | (modules '((guix build utils))))) |
086e498b | 573 | (build-system cmake-build-system) |
8ecba89b | 574 | (outputs '("out" "debug")) |
086e498b | 575 | (arguments |
bc5ae287 MO |
576 | `(#:configure-flags |
577 | (list "-DUSE_SHA1DC=ON" ; SHA-1 collision detection | |
578 | ,@(if (%current-target-system) | |
579 | `((string-append | |
580 | "-DPKG_CONFIG_EXECUTABLE=" | |
581 | (assoc-ref %build-inputs "pkg-config") | |
582 | "/bin/" ,(%current-target-system) "-pkg-config")) | |
583 | '())) | |
3d0fbd3c | 584 | #:phases |
086e498b RW |
585 | (modify-phases %standard-phases |
586 | (add-after 'unpack 'fix-hardcoded-paths | |
587 | (lambda _ | |
588 | (substitute* "tests/repo/init.c" | |
589 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
590 | (substitute* "tests/clar/fs.h" | |
591 | (("/bin/cp") (which "cp")) | |
592 | (("/bin/rm") (which "rm"))) | |
593 | #t)) | |
22c88f5d TGR |
594 | (add-after 'unpack 'make-git-checkout-writable |
595 | (lambda _ | |
596 | (for-each make-file-writable (find-files ".")) | |
597 | #t)) | |
bc5ae287 | 598 | ;; Run checks more verbosely, unless we are cross-compiling. |
086e498b | 599 | (replace 'check |
bc5ae287 MO |
600 | (lambda* (#:key (tests? #t) #:allow-other-keys) |
601 | (if tests? | |
602 | (invoke "./libgit2_clar" "-v" "-Q") | |
603 | ;; Tests may be disabled if cross-compiling. | |
604 | (format #t "Test suite not run.~%"))))))) | |
086e498b RW |
605 | (inputs |
606 | `(("libssh2" ,libssh2) | |
03fb5ff6 | 607 | ("http-parser" ,http-parser))) |
086e498b | 608 | (native-inputs |
03fb5ff6 DM |
609 | `(("guile" ,guile-2.2) |
610 | ("pkg-config" ,pkg-config))) | |
413f71f3 LC |
611 | (propagated-inputs |
612 | ;; These two libraries are in 'Requires.private' in libgit2.pc. | |
613 | `(("openssl" ,openssl) | |
614 | ("zlib" ,zlib))) | |
9bf160a3 | 615 | (home-page "https://libgit2.github.com/") |
086e498b RW |
616 | (synopsis "Library providing Git core methods") |
617 | (description | |
618 | "Libgit2 is a portable, pure C implementation of the Git core methods | |
619 | provided as a re-entrant linkable library with a solid API, allowing you to | |
620 | write native speed custom Git applications in any language with bindings.") | |
621 | ;; GPLv2 with linking exception | |
369387b6 | 622 | (license license:gpl2))) |
086e498b | 623 | |
53ff5495 DC |
624 | (define-public git-crypt |
625 | (package | |
626 | (name "git-crypt") | |
627 | (version "0.5.0") | |
09be6a5f TGR |
628 | (source |
629 | (origin | |
630 | (method git-fetch) | |
631 | (uri (git-reference | |
632 | (url "https://github.com/AGWA/git-crypt.git") | |
633 | (commit version))) | |
634 | (file-name (git-file-name name version)) | |
635 | (sha256 | |
636 | (base32 "1x9209n3k49k998saadr2d0lmvs01smjinx7gzzyjdwj9l904sii")))) | |
53ff5495 DC |
637 | (build-system gnu-build-system) |
638 | (inputs | |
639 | `(("git" ,git) | |
640 | ("openssl" ,openssl))) | |
641 | (arguments | |
642 | `(#:tests? #f ; No tests. | |
643 | #:phases | |
644 | (modify-phases %standard-phases | |
645 | (delete 'configure) | |
646 | (replace 'build | |
647 | (lambda _ | |
56d63f81 | 648 | (invoke "make"))) |
53ff5495 DC |
649 | (replace 'install |
650 | (lambda* (#:key outputs #:allow-other-keys) | |
651 | (let ((out (assoc-ref outputs "out"))) | |
56d63f81 TGR |
652 | (invoke "make" "install" |
653 | (string-append "PREFIX=" out)))))))) | |
53ff5495 DC |
654 | (home-page "https://www.agwa.name/projects/git-crypt") |
655 | (synopsis "Transparent encryption of files in a git repository") | |
656 | (description "git-crypt enables transparent encryption and decryption of | |
79990ce3 TGR |
657 | files in a git repository. Files which you choose to protect are encrypted when |
658 | committed, and decrypted when checked out. git-crypt lets you freely share a | |
659 | repository containing a mix of public and private content. git-crypt gracefully | |
53ff5495 | 660 | degrades, so developers without the secret key can still clone and commit to a |
79990ce3 | 661 | repository with encrypted files. This lets you store your secret material (such |
53ff5495 DC |
662 | as keys or passwords) in the same repository as your code, without requiring you |
663 | to lock down your entire repository.") | |
664 | (license license:gpl3+))) | |
665 | ||
ed2b7cb2 AM |
666 | (define-public git-remote-gcrypt |
667 | (package | |
668 | (name "git-remote-gcrypt") | |
26cd470d | 669 | (version "1.0.3") |
ed2b7cb2 AM |
670 | (source (origin |
671 | (method git-fetch) | |
672 | (uri (git-reference | |
673 | (url "https://git.spwhitton.name/git-remote-gcrypt") | |
674 | (commit version))) | |
675 | (file-name (string-append name "-" version "-checkout")) | |
676 | (sha256 | |
677 | (base32 | |
26cd470d | 678 | "1vay3204729c7wajgn3nxf0s0hzwpdrw14pl6kd8w2ss25gvw2k1")))) |
ed2b7cb2 AM |
679 | (build-system trivial-build-system) |
680 | (arguments | |
681 | `(#:modules ((guix build utils)) | |
682 | #:builder (begin | |
683 | (use-modules (guix build utils)) | |
684 | (let* ((source (assoc-ref %build-inputs "source")) | |
685 | (output (assoc-ref %outputs "out")) | |
686 | (bindir (string-append output "/bin"))) | |
687 | (install-file (string-append source "/git-remote-gcrypt") | |
688 | bindir) | |
689 | #t)))) | |
690 | (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/") | |
691 | (synopsis "Whole remote repository encryption") | |
692 | (description "git-remote-gcrypt is a Git remote helper to push and pull from | |
693 | repositories encrypted with GnuPG. It works with the standard Git transports, | |
694 | including repository hosting services like GitLab. | |
695 | ||
696 | Remote helper programs are invoked by Git to handle network transport. This | |
697 | helper handles @code{gcrypt:} URLs that access a remote repository encrypted | |
698 | with GPG, using our custom format. | |
699 | ||
700 | Supported locations are local, @code{rsync://} and @code{sftp://}, where the | |
701 | repository is stored as a set of files, or instead any Git URL where gcrypt | |
702 | will store the same representation in a Git repository, bridged over arbitrary | |
703 | Git transport. | |
704 | ||
705 | The aim is to provide confidential, authenticated Git storage and | |
706 | collaboration using typical untrusted file hosts or services.") | |
707 | (license license:gpl3+))) | |
708 | ||
7ad1fee5 SB |
709 | (define-public cgit |
710 | (package | |
711 | (name "cgit") | |
ef201cfe TGR |
712 | ;; Update the ‘git-source’ input as well. |
713 | (version "1.2.2") | |
7ad1fee5 SB |
714 | (source (origin |
715 | (method url-fetch) | |
716 | (uri (string-append | |
717 | "https://git.zx2c4.com/cgit/snapshot/cgit-" | |
718 | version ".tar.xz")) | |
719 | (sha256 | |
720 | (base32 | |
ef201cfe | 721 | "0dmjsisigjz5k4gw7gm55qhm3wazzbm4cg7a5dwf0gqg9nacx5rz")))) |
7ad1fee5 SB |
722 | (build-system gnu-build-system) |
723 | (arguments | |
724 | '(#:tests? #f ; XXX: fail to build the in-source git. | |
725 | #:test-target "test" | |
726 | #:make-flags '("CC=gcc" "SHELL_PATH=sh") | |
727 | #:phases | |
728 | (modify-phases %standard-phases | |
729 | (add-after 'unpack 'unpack-git | |
730 | (lambda* (#:key inputs #:allow-other-keys) | |
731 | ;; Unpack the source of git into the 'git' directory. | |
0eb21fba | 732 | (invoke "tar" "--strip-components=1" "-C" "git" "-xf" |
19a3e7f8 | 733 | (assoc-ref inputs "git-source")))) |
91b21ba9 OP |
734 | (add-after 'unpack 'patch-absolute-file-names |
735 | (lambda* (#:key inputs #:allow-other-keys) | |
736 | (define (quoted-file-name input path) | |
737 | (string-append "\"" input path "\"")) | |
738 | (substitute* "ui-snapshot.c" | |
739 | (("\"gzip\"") | |
740 | (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip")) | |
741 | (("\"bzip2\"") | |
742 | (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2")) | |
743 | (("\"xz\"") | |
744 | (quoted-file-name (assoc-ref inputs "xz") "/bin/xz"))) | |
57c5aa7c CB |
745 | |
746 | (substitute* "filters/about-formatting.sh" | |
747 | (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out") | |
748 | "/lib/cgit/filters")) | |
749 | (("\\| tr") (string-append "| " (which "tr")))) | |
750 | ||
751 | (substitute* "filters/html-converters/txt2html" | |
752 | (("sed") (which "sed"))) | |
753 | ||
754 | (substitute* "filters/html-converters/man2html" | |
755 | (("groff") (which "groff"))) | |
756 | ||
757 | (substitute* "filters/html-converters/rst2html" | |
758 | (("rst2html\\.py") (which "rst2html.py"))) | |
759 | ||
91b21ba9 | 760 | #t)) |
7ad1fee5 SB |
761 | (delete 'configure) ; no configure script |
762 | (add-after 'build 'build-man | |
763 | (lambda* (#:key make-flags #:allow-other-keys) | |
0eb21fba | 764 | (apply invoke "make" "doc-man" make-flags))) |
7ad1fee5 SB |
765 | (replace 'install |
766 | (lambda* (#:key make-flags outputs #:allow-other-keys) | |
767 | (let ((out (assoc-ref outputs "out"))) | |
0eb21fba TGR |
768 | (apply invoke |
769 | "make" "install" "install-man" | |
770 | (string-append "prefix=" out) | |
771 | (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit") | |
772 | make-flags) | |
773 | ;; Move the platform-dependent 'cgit.cgi' into lib to get it | |
774 | ;; stripped. | |
775 | (rename-file (string-append out "/share/cgit/cgit.cgi") | |
776 | (string-append out "/lib/cgit/cgit.cgi")) | |
777 | #t))) | |
57c5aa7c CB |
778 | (add-after 'install 'wrap-python-scripts |
779 | (lambda* (#:key outputs #:allow-other-keys) | |
780 | (for-each | |
781 | (lambda (file) | |
782 | (wrap-program (string-append (assoc-ref outputs "out") | |
783 | "/lib/cgit/filters/" file) | |
784 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))) | |
785 | '("syntax-highlighting.py" | |
786 | "html-converters/md2html")) | |
787 | #t))))) | |
7ad1fee5 SB |
788 | (native-inputs |
789 | ;; For building manpage. | |
91b21ba9 OP |
790 | `(("asciidoc" ,asciidoc) |
791 | ("gzip" ,gzip) | |
792 | ("bzip2" ,bzip2) | |
793 | ("xz" ,xz))) | |
7ad1fee5 | 794 | (inputs |
19a3e7f8 | 795 | `(;; Building cgit requires a Git source tree. |
5d9c28f1 LF |
796 | ("git-source" |
797 | ,(origin | |
798 | (method url-fetch) | |
ef201cfe TGR |
799 | ;; cgit is tightly bound to git. Use GIT_VER from the Makefile, |
800 | ;; which may not match the current (package-version git). | |
801 | (uri "mirror://kernel.org/software/scm/git/git-2.25.0.tar.xz") | |
5d9c28f1 | 802 | (sha256 |
ef201cfe | 803 | (base32 "1l58v42aazj0x9276gk8r9mwyl9pgp9w99aakz4xfhzv7wd2jq60")))) |
7ad1fee5 | 804 | ("openssl" ,openssl) |
57c5aa7c CB |
805 | ("groff" ,groff) |
806 | ("python" ,python) | |
807 | ("python-docutils" ,python-docutils) | |
808 | ("python-markdown" ,python-markdown) | |
809 | ("python-pygments" ,python-pygments) | |
7ad1fee5 SB |
810 | ("zlib" ,zlib))) |
811 | (home-page "https://git.zx2c4.com/cgit/") | |
812 | (synopsis "Web frontend for git repositories") | |
813 | (description | |
814 | "CGit is an attempt to create a fast web interface for the Git SCM, using | |
815 | a built-in cache to decrease server I/O pressure.") | |
369387b6 | 816 | (license license:gpl2))) |
7ad1fee5 | 817 | |
add8d509 CB |
818 | (define-public python-git-multimail |
819 | (package | |
820 | (name "python-git-multimail") | |
821 | (version "1.5.0.post1") | |
822 | (source | |
823 | (origin | |
824 | (method url-fetch) | |
825 | (uri (pypi-uri "git-multimail" version)) | |
826 | (sha256 | |
827 | (base32 | |
828 | "1zkrbsa70anwpw86ysfwalrb7nsr064kygfiyikyq1pl9pcl969y")))) | |
829 | (build-system python-build-system) | |
830 | (arguments | |
831 | '(#:phases | |
832 | (modify-phases %standard-phases | |
833 | (add-after 'unpack 'patch | |
834 | (lambda* (#:key inputs #:allow-other-keys) | |
835 | (substitute* "git-multimail/git_multimail.py" | |
836 | (("GIT_EXECUTABLE = 'git'") | |
837 | (string-append "GIT_EXECUTABLE = '" | |
838 | (assoc-ref inputs "git") "/bin/git" | |
839 | "'")) | |
840 | (("/usr/sbin/sendmail") | |
841 | (string-append (assoc-ref inputs "sendmail") | |
842 | "/usr/sbin/sendmail"))) | |
843 | #t))))) | |
844 | (inputs | |
845 | `(("git" ,git) | |
846 | ("sendmail" ,sendmail))) | |
847 | (home-page "https://github.com/git-multimail/git-multimail") | |
848 | (synopsis "Send notification emails for Git pushes") | |
849 | (description | |
850 | "This hook sends emails describing changes introduced by pushes to a Git | |
851 | repository. For each reference that was changed, it emits one ReferenceChange | |
852 | email summarizing how the reference was changed, followed by one Revision | |
853 | email for each new commit that was introduced by the reference change. | |
854 | ||
855 | This script is designed to be used as a post-receive hook in a Git | |
856 | repository") | |
857 | (license license:gpl2))) | |
858 | ||
65101a25 OP |
859 | (define-public python-ghp-import |
860 | (package | |
861 | (name "python-ghp-import") | |
862 | (version "0.5.5") | |
863 | (source | |
864 | (origin | |
3d78bf0e TGR |
865 | (method git-fetch) |
866 | (uri (git-reference | |
867 | (url "https://github.com/davisp/ghp-import.git") | |
868 | (commit version))) | |
869 | (file-name (git-file-name name version)) | |
65101a25 | 870 | (sha256 |
3d78bf0e | 871 | (base32 "12pmw3zz3i57ljnm0rxdyjqdyhisbvy18mjwkb3bzp5pgzs2f45c")))) |
65101a25 OP |
872 | (build-system python-build-system) |
873 | (arguments | |
874 | `(#:phases (modify-phases %standard-phases | |
875 | (add-after 'install 'install-documentation | |
876 | (lambda* (#:key outputs #:allow-other-keys) | |
877 | (let* ((out (assoc-ref outputs "out")) | |
878 | (doc (string-append out "/share/doc")) | |
879 | (licenses (string-append out "/share/licenses"))) | |
880 | (install-file "README.md" doc) | |
881 | (install-file "LICENSE" licenses))))))) | |
882 | (home-page "https://github.com/davisp/ghp-import") | |
883 | (synopsis "Copy directory to the gh-pages branch") | |
884 | (description "Script that copies a directory to the gh-pages branch (by | |
885 | default) of the repository.") | |
886 | ||
887 | ;; See <https://bugs.gnu.org/27913>. | |
888 | (license (license:non-copyleft | |
889 | "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE" | |
890 | "Tumbolia Public License")))) | |
891 | ||
892 | (define-public python2-ghp-import | |
893 | (package-with-python2 | |
894 | (strip-python2-variant python-ghp-import))) | |
895 | ||
ea4be20a MB |
896 | (define-public python-gitdb |
897 | (package | |
898 | (name "python-gitdb") | |
899e1974 | 899 | (version "2.0.4") |
ea4be20a MB |
900 | (source (origin |
901 | (method url-fetch) | |
902 | (uri (pypi-uri "gitdb2" version)) | |
903 | (sha256 | |
904 | (base32 | |
899e1974 | 905 | "0i608q9c47rdsmyac1cn6s0hzwwj7cb957y8fc9wacc5lnw8ak5v")))) |
ea4be20a MB |
906 | (build-system python-build-system) |
907 | (arguments | |
908 | `(#:phases (modify-phases %standard-phases | |
909 | (add-before 'check 'create-test-repository | |
910 | (lambda _ | |
911 | (mkdir "/tmp/testrepo") | |
912 | ;; Some tests require a git repository, so create one. | |
913 | (with-directory-excursion "/tmp/testrepo" | |
914 | (do ((filecount 1 (1+ filecount))) | |
915 | ((> filecount 1000)) | |
916 | (call-with-output-file (string-append | |
917 | "file" (number->string filecount)) | |
918 | (lambda (port) | |
919 | (format port "~a" filecount)))) | |
899e1974 | 920 | (begin |
ea4be20a MB |
921 | (invoke "git" "init") |
922 | (invoke "git" "config" "user.name" "Total Git") | |
923 | (invoke "git" "config" "user.email" "git@localhost") | |
924 | (invoke "git" "add" "-A") | |
925 | (invoke "git" "commit" "-q" "-m" "dummy commit"))) | |
926 | ||
927 | ;; The repository checkout must be a "bare" clone. | |
928 | (invoke "git" "clone" "--bare" "/tmp/testrepo" | |
929 | "/tmp/testrepo.git"))) | |
930 | (replace 'check | |
931 | (lambda _ | |
932 | (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git") | |
933 | ;; Skip tests that must be run from the gitdb repository. | |
934 | (setenv "TRAVIS" "1") | |
935 | (invoke "nosetests" "-v")))))) | |
936 | (propagated-inputs | |
937 | `(("python-smmap2" ,python-smmap2))) | |
938 | (native-inputs | |
939 | `(("git" ,git) | |
940 | ("python-nose" ,python-nose))) | |
941 | (home-page "https://github.com/gitpython-developers/gitdb") | |
942 | (synopsis "Python implementation of the Git object database") | |
943 | (description | |
944 | "GitDB allows you to access @dfn{bare} Git repositories for reading and | |
945 | writing. It aims at allowing full access to loose objects as well as packs | |
946 | with performance and scalability in mind. It operates exclusively on streams, | |
947 | allowing to handle large objects with a small memory footprint.") | |
948 | (license license:bsd-3))) | |
949 | ||
950 | (define-public python2-gitdb | |
951 | (package-with-python2 python-gitdb)) | |
952 | ||
8e617720 MB |
953 | (define-public python-gitpython |
954 | (package | |
955 | (name "python-gitpython") | |
93d50619 | 956 | (version "2.1.11") |
8e617720 MB |
957 | (source (origin |
958 | (method url-fetch) | |
959 | (uri (pypi-uri "GitPython" version)) | |
960 | (sha256 | |
961 | (base32 | |
93d50619 | 962 | "1a357c28dnhgvq3saia7v29r71ynp48l2qp5xsmnc4vgzmdxqdw2")))) |
8e617720 MB |
963 | (build-system python-build-system) |
964 | (arguments | |
965 | `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository. | |
966 | #:phases (modify-phases %standard-phases | |
967 | (add-after 'unpack 'embed-git-reference | |
968 | (lambda* (#:key inputs #:allow-other-keys) | |
969 | (substitute* "git/cmd.py" | |
970 | (("git_exec_name = \"git\"") | |
971 | (string-append "git_exec_name = \"" | |
972 | (assoc-ref inputs "git") | |
973 | "/bin/git\""))) | |
974 | #t))))) | |
975 | (inputs | |
976 | `(("git" ,git))) | |
977 | (propagated-inputs | |
978 | `(("python-gitdb" ,python-gitdb))) | |
979 | (native-inputs | |
980 | `(("python-ddt" ,python-ddt) | |
981 | ("python-nose" ,python-nose))) | |
982 | (home-page "https://github.com/gitpython-developers/GitPython") | |
983 | (synopsis "Python library for interacting with Git repositories") | |
984 | (description | |
985 | "GitPython is a python library used to interact with Git repositories, | |
986 | high-level like git-porcelain, or low-level like git-plumbing. | |
987 | ||
988 | It provides abstractions of Git objects for easy access of repository data, | |
989 | and additionally allows you to access the Git repository more directly using | |
990 | either a pure Python implementation, or the faster, but more resource intensive | |
991 | @command{git} command implementation.") | |
992 | (license license:bsd-3))) | |
993 | ||
994 | (define-public python2-gitpython | |
995 | (package-with-python2 python-gitpython)) | |
996 | ||
c7810bd1 EB |
997 | (define-public shflags |
998 | (package | |
999 | (name "shflags") | |
453c0026 | 1000 | (version "1.2.3") |
c7810bd1 | 1001 | (source (origin |
4aeb7f34 EF |
1002 | (method git-fetch) |
1003 | (uri (git-reference | |
1004 | (url "https://github.com/kward/shflags.git") | |
1005 | (commit (string-append "v" version)))) | |
1006 | (file-name (git-file-name name version)) | |
c7810bd1 EB |
1007 | (sha256 |
1008 | (base32 | |
4aeb7f34 | 1009 | "1ydx0sb6vz9s2dgp5bd64y7fpzh9qvmlfjxrbmzac8saknijrlly")))) |
dcb06ac9 | 1010 | (build-system gnu-build-system) |
c7810bd1 | 1011 | (arguments |
dcb06ac9 TGR |
1012 | `(#:tests? #f ; no tests |
1013 | #:phases | |
1014 | (modify-phases %standard-phases | |
1015 | (delete 'configure) ; nothing to configure | |
1016 | (delete 'build) ; nothing to build | |
1017 | (replace 'install | |
1018 | (lambda* (#:key outputs #:allow-other-keys) | |
1019 | (let* ((out (assoc-ref outputs "out")) | |
1020 | (src (string-append out "/src"))) | |
453c0026 | 1021 | (install-file "shflags" src) |
dcb06ac9 | 1022 | #t)))))) |
b65195c2 | 1023 | (home-page "https://github.com/kward/shflags") |
c7810bd1 EB |
1024 | (synopsis "Command-line flags library for shell scripts") |
1025 | (description | |
1026 | "Shell Flags (shFlags) is a library written to greatly simplify the | |
1027 | handling of command-line flags in Bourne based Unix shell scripts (bash, dash, | |
1028 | ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the | |
1029 | different versions of getopt on various OSes make writing portable shell | |
1030 | scripts difficult. shFlags instead provides an API that doesn't change across | |
1031 | shell and OS versions so the script writer can be confident that the script | |
1032 | will work.") | |
369387b6 | 1033 | (license license:lgpl2.1))) |
c7810bd1 EB |
1034 | |
1035 | (define-public git-flow | |
1036 | (package | |
1037 | (name "git-flow") | |
1038 | ;; This version has not be officially released yet, so we build it | |
1039 | ;; directly from the git repository. | |
1040 | (version "0.4.2-pre") | |
1041 | (source (origin | |
1042 | (method git-fetch) | |
1043 | (uri (git-reference | |
1044 | (url "https://github.com/nvie/gitflow/") | |
698bd297 | 1045 | (commit "15aab26490facf285acef56cb5d61025eacb3a69"))) |
d36df187 | 1046 | (file-name (git-file-name name version)) |
c7810bd1 EB |
1047 | (sha256 |
1048 | (base32 | |
1049 | "01fs97q76fdfnvmrh2cyjhywcs3pykf1dg58sy0frflnsdzs6prx")))) | |
1050 | (build-system gnu-build-system) | |
1051 | (inputs `(("shflags" ,shflags))) | |
1052 | (arguments | |
1053 | '(#:tests? #f ; no tests | |
1054 | #:make-flags (list (string-append "prefix=" | |
1055 | (assoc-ref %outputs "out"))) | |
aac42d78 EF |
1056 | #:phases |
1057 | (modify-phases %standard-phases | |
1058 | (add-after 'unpack 'reset-shFlags-link | |
1059 | (lambda* (#:key inputs #:allow-other-keys) | |
1060 | ;; The link points to a file in the shFlags submodule. | |
1061 | ;; Redirect it to point to our system shFlags. | |
1062 | (let ((shflags (assoc-ref inputs "shflags"))) | |
1063 | (begin | |
1064 | (delete-file "gitflow-shFlags") | |
1065 | (symlink (string-append shflags "/src/shflags") | |
1066 | "gitflow-shFlags"))))) | |
1067 | (delete 'configure) | |
1068 | (delete 'build)))) | |
c7810bd1 EB |
1069 | (home-page "http://nvie.com/posts/a-successful-git-branching-model/") |
1070 | (synopsis "Git extensions for Vincent Driessen's branching model") | |
1071 | (description | |
1072 | "Vincent Driessen's branching model is a git branching and release | |
1073 | management strategy that helps developers keep track of features, hotfixes, | |
1074 | and releases in bigger software projects. The git-flow library of git | |
1075 | subcommands helps automate some parts of the flow to make working with it a | |
1076 | lot easier.") | |
369387b6 | 1077 | (license license:bsd-2))) |
c7810bd1 | 1078 | |
205441eb SR |
1079 | (define-public stgit |
1080 | (package | |
1081 | (name "stgit") | |
90b8f4e2 | 1082 | (version "0.21") |
3154ac32 TGR |
1083 | (source |
1084 | (origin | |
1085 | (method git-fetch) | |
1086 | (uri (git-reference | |
1087 | (url "https://github.com/ctmarinas/stgit.git") | |
1088 | (commit (string-append "v" version)))) | |
1089 | (file-name (git-file-name name version)) | |
1090 | (sha256 | |
90b8f4e2 | 1091 | (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc")))) |
205441eb | 1092 | (build-system python-build-system) |
90b8f4e2 TGR |
1093 | (native-inputs |
1094 | `(("perl" ,perl))) | |
205441eb SR |
1095 | (inputs |
1096 | `(("git" ,git))) | |
1097 | (arguments | |
90b8f4e2 | 1098 | `(#:phases |
205441eb | 1099 | (modify-phases %standard-phases |
90b8f4e2 TGR |
1100 | (add-after 'unpack 'hard-code-version |
1101 | (lambda _ | |
1102 | ;; setup.py tries to cleverly extract the version number from the | |
1103 | ;; git history, which the source checkout lacks. Hard-code one. | |
1104 | (substitute* "setup.py" | |
1105 | (("get_ver\\(\\)") | |
1106 | (format #f "'~a'" ,version))) | |
1107 | #t)) | |
1108 | (add-before 'check 'patch-tests | |
1109 | (lambda _ | |
1110 | (substitute* (list "t/t1900-mail.sh" | |
1111 | "t/t7504-commit-msg-hook.sh") | |
1112 | (("/bin/sh") | |
1113 | (which "bash"))) | |
1114 | #t)) | |
205441eb SR |
1115 | (replace 'check |
1116 | (lambda _ | |
90b8f4e2 TGR |
1117 | (invoke "make" |
1118 | "PERL_PATH=perl" | |
1119 | (string-append "SHELL_PATH=" (which "bash")) | |
1120 | "test")))))) | |
205441eb SR |
1121 | (home-page "http://procode.org/stgit/") |
1122 | (synopsis "Stacked Git") | |
1123 | (description | |
1124 | "StGit is a command-line application that provides functionality similar | |
1125 | to Quilt (i.e., pushing/popping patches to/from a stack), but using Git | |
1126 | instead of @command{diff} and @command{patch}. StGit stores its patches in a | |
1127 | Git repository as normal Git commits, and provides a number of commands to | |
1128 | manipulate them in various ways.") | |
1129 | (license license:gpl2))) | |
1130 | ||
80d9941c SR |
1131 | (define-public vcsh |
1132 | (package | |
1133 | (name "vcsh") | |
1134 | (version "1.20151229") | |
c8c42907 TGR |
1135 | (source |
1136 | (origin | |
1137 | (method git-fetch) | |
1138 | (uri (git-reference | |
1139 | (url "https://github.com/RichiH/vcsh.git") | |
1140 | (commit (string-append "v" version)))) | |
1141 | (file-name (git-file-name name version)) | |
1142 | (sha256 | |
1143 | (base32 "1grpj45nbpv4j60vd2kg4rj53zrm0bc0h9l4pfd3c2mwbvywm6ab")))) | |
80d9941c SR |
1144 | (build-system gnu-build-system) |
1145 | (native-inputs | |
1146 | `(("which" ,which))) | |
1147 | (inputs | |
1148 | `(("git" ,git) | |
1149 | ("perl" ,perl) | |
1150 | ("perl-test-harness" ,perl-test-harness) | |
1151 | ("perl-shell-command" ,perl-shell-command) | |
1152 | ("perl-test-most" ,perl-test-most))) | |
1153 | (arguments | |
1154 | '(#:phases (modify-phases %standard-phases | |
1155 | (delete 'configure) | |
1156 | (delete 'build)) | |
1157 | #:make-flags (list (string-append "PREFIX=" | |
1158 | (assoc-ref %outputs "out"))) | |
1159 | #:test-target "test")) | |
1160 | (home-page "https://github.com/RichiH/vcsh") | |
1161 | (synopsis "Version control system for @code{$HOME}") | |
1162 | (description | |
1163 | "vcsh version-controls configuration files in several Git repositories, | |
1164 | all in one single directory. They all maintain their working trees without | |
1165 | clobbering each other or interfering otherwise. By default, all Git | |
1166 | repositories maintained via vcsh store the actual files in @code{$HOME}, | |
1167 | though this can be overridden.") | |
1168 | (license license:gpl2+))) | |
1169 | ||
a63094a7 | 1170 | (define-public git-test-sequence |
698bd297 | 1171 | (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76")) |
a63094a7 EB |
1172 | (package |
1173 | (name "git-test-sequence") | |
698bd297 | 1174 | (version (string-append "20140312." (string-take commit 7))) |
a63094a7 EB |
1175 | (source (origin |
1176 | (method git-fetch) | |
1177 | (uri (git-reference | |
1178 | ;; There are many other scripts in this directory; we | |
1179 | ;; are interested in just one for this package. | |
1180 | (url "https://github.com/dustin/bindir") | |
1181 | (commit commit))) | |
348f8c85 | 1182 | (file-name (git-file-name name version)) |
a63094a7 EB |
1183 | (sha256 |
1184 | (base32 | |
1185 | "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617")))) | |
1186 | (build-system trivial-build-system) | |
1187 | (arguments | |
1188 | `(#:modules ((guix build utils)) | |
1189 | #:builder (begin | |
1190 | (use-modules (guix build utils)) | |
1191 | (let* ((source (assoc-ref %build-inputs "source")) | |
1192 | (output (assoc-ref %outputs "out")) | |
1193 | (bindir (string-append output "/bin")) | |
1194 | (script "git-test-sequence")) | |
96c46210 LC |
1195 | (install-file (string-append source "/" script) |
1196 | bindir) | |
1197 | #t)))) | |
a63094a7 EB |
1198 | (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html") |
1199 | (synopsis "Run a command over a sequence of commits") | |
1200 | (description | |
1201 | "git-test-sequence is similar to an automated git bisect except it’s | |
1202 | linear. It will test every change between two points in the DAG. It will | |
1203 | also walk each side of a merge and test those changes individually.") | |
369387b6 | 1204 | (license (license:x11-style "file://LICENSE"))))) |
a63094a7 | 1205 | |
378b01dc DT |
1206 | (define-public gitolite |
1207 | (package | |
1208 | (name "gitolite") | |
7730b717 | 1209 | (version "3.6.7") |
6a8472d1 TGR |
1210 | (source |
1211 | (origin | |
1212 | (method git-fetch) | |
1213 | (uri (git-reference | |
1214 | (url "https://github.com/sitaramc/gitolite.git") | |
1215 | (commit (string-append "v" version)))) | |
1216 | (file-name (git-file-name name version)) | |
1217 | (sha256 | |
1218 | (base32 "0rmyzr66lxh2ildf3h1nh3hh2ndwk21rjdin50r5vhwbdd7jg8vb")))) | |
378b01dc DT |
1219 | (build-system gnu-build-system) |
1220 | (arguments | |
1221 | '(#:tests? #f ; no tests | |
1222 | #:phases (modify-phases %standard-phases | |
1223 | (delete 'configure) | |
1224 | (delete 'build) | |
1225 | (add-before 'install 'patch-scripts | |
1226 | (lambda* (#:key inputs #:allow-other-keys) | |
1227 | (let ((perl (string-append (assoc-ref inputs "perl") | |
1228 | "/bin/perl"))) | |
1229 | ;; This seems to take care of every shell script that | |
1230 | ;; invokes Perl. | |
1231 | (substitute* (find-files "." ".*") | |
1232 | ((" perl -") | |
db88b5a8 CL |
1233 | (string-append " " perl " -"))) |
1234 | ||
595af457 CB |
1235 | (substitute* (find-files "src/triggers" ".*") |
1236 | ((" sed ") | |
1237 | (string-append " " (which "sed") " "))) | |
1238 | ||
1239 | (substitute* | |
1240 | '("src/triggers/post-compile/update-gitweb-access-list" | |
1241 | "src/triggers/post-compile/ssh-authkeys-split" | |
1242 | "src/triggers/upstream") | |
1243 | ((" grep ") | |
1244 | (string-append " " (which "grep") " "))) | |
1245 | ||
db88b5a8 CL |
1246 | ;; Avoid references to the store in authorized_keys. |
1247 | ;; This works because gitolite-shell is in the PATH. | |
1248 | (substitute* "src/triggers/post-compile/ssh-authkeys" | |
1249 | (("\\$glshell \\$user") | |
92793c7b TGR |
1250 | "gitolite-shell $user")) |
1251 | #t))) | |
595af457 CB |
1252 | (add-before 'install 'patch-source |
1253 | (lambda* (#:key inputs #:allow-other-keys) | |
1254 | ;; Gitolite uses cat to test the readability of the | |
1255 | ;; pubkey | |
1256 | (substitute* "src/lib/Gitolite/Setup.pm" | |
1257 | (("\"cat ") | |
1258 | (string-append "\"" (which "cat") " ")) | |
1259 | (("\"ssh-keygen") | |
1260 | (string-append "\"" (which "ssh-keygen")))) | |
1261 | ||
1262 | (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm" | |
1263 | "src/lib/Gitolite/Hooks/Update.pm") | |
1264 | (("/usr/bin/perl") | |
1265 | (string-append (assoc-ref inputs "perl") | |
1266 | "/bin/perl"))) | |
1267 | ||
1268 | (substitute* "src/lib/Gitolite/Common.pm" | |
1269 | (("\"ssh-keygen") | |
1270 | (string-append "\"" (which "ssh-keygen"))) | |
1271 | (("\"logger\"") | |
1272 | (string-append "\"" | |
1273 | (assoc-ref inputs "inetutils") | |
1274 | "/bin/logger\""))) | |
1275 | ||
1276 | #t)) | |
378b01dc DT |
1277 | (replace 'install |
1278 | (lambda* (#:key outputs #:allow-other-keys) | |
1279 | (let* ((output (assoc-ref outputs "out")) | |
1280 | (sharedir (string-append output "/share/gitolite")) | |
1281 | (bindir (string-append output "/bin"))) | |
1282 | (mkdir-p sharedir) | |
1283 | (mkdir-p bindir) | |
92793c7b | 1284 | (invoke "./install" "-to" sharedir) |
378b01dc DT |
1285 | ;; Create symlinks for executable scripts in /bin. |
1286 | (for-each (lambda (script) | |
1287 | (symlink (string-append sharedir "/" script) | |
1288 | (string-append bindir "/" script))) | |
1289 | '("gitolite" "gitolite-shell")) | |
595af457 CB |
1290 | #t))) |
1291 | (add-after 'install 'wrap-scripts | |
1292 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1293 | (let ((out (assoc-ref outputs "out")) | |
1294 | (coreutils (assoc-ref inputs "coreutils")) | |
1295 | (findutils (assoc-ref inputs "findutils")) | |
1296 | (git (assoc-ref inputs "git"))) | |
1297 | (wrap-program (string-append out "/bin/gitolite") | |
1298 | `("PATH" ":" prefix | |
1299 | ,(map (lambda (dir) | |
1300 | (string-append dir "/bin")) | |
1301 | (list out coreutils findutils git)))) | |
378b01dc DT |
1302 | #t)))))) |
1303 | (inputs | |
595af457 CB |
1304 | `(("perl" ,perl) |
1305 | ("coreutils" ,coreutils) | |
1306 | ("findutils" ,findutils) | |
1307 | ("inetutils" ,inetutils))) | |
378b01dc DT |
1308 | ;; git and openssh are propagated because trying to patch the source via |
1309 | ;; regexp matching is too brittle and prone to false positives. | |
1310 | (propagated-inputs | |
1311 | `(("git" ,git) | |
1312 | ("openssh" ,openssh))) | |
1313 | (home-page "http://gitolite.com") | |
1314 | (synopsis "Git access control layer") | |
1315 | (description | |
1316 | "Gitolite is an access control layer on top of Git, providing fine access | |
1317 | control to Git repositories.") | |
369387b6 | 1318 | (license license:gpl2))) |
378b01dc | 1319 | |
5151c2e1 AB |
1320 | (define-public mercurial |
1321 | (package | |
1322 | (name "mercurial") | |
10576acb | 1323 | (version "5.2.1") |
5151c2e1 AB |
1324 | (source (origin |
1325 | (method url-fetch) | |
5575917d EF |
1326 | (uri (string-append "https://www.mercurial-scm.org/" |
1327 | "release/mercurial-" version ".tar.gz")) | |
5151c2e1 AB |
1328 | (sha256 |
1329 | (base32 | |
10576acb | 1330 | "1pxkd37b0a1mi2zakk1hi122lgz1ffy2fxdnbs8acwlqpw55bc8q")))) |
5151c2e1 AB |
1331 | (build-system python-build-system) |
1332 | (arguments | |
10576acb RJ |
1333 | `(#:phases |
1334 | (modify-phases %standard-phases | |
1335 | (replace 'check | |
e2e62bf5 TGR |
1336 | (lambda* (#:key tests? #:allow-other-keys) |
1337 | (with-directory-excursion "tests" | |
1338 | ;; The following tests are known to fail. | |
1339 | (for-each (lambda (file) | |
1340 | (delete-file file)) | |
1341 | '("test-extdiff.t" | |
1342 | "test-hghave.t" | |
1343 | "test-hgwebdir.t" | |
1344 | "test-http-branchmap.t" | |
1345 | "test-logtoprocess.t" | |
1346 | "test-merge-combination.t" | |
1347 | "test-nointerrupt.t" | |
1348 | "test-patchbomb.t" | |
1349 | "test-pull-bundle.t" | |
1350 | "test-push-http.t" | |
1351 | "test-run-tests.t" | |
1352 | "test-serve.t" | |
1353 | "test-subrepo-deep-nested-change.t" | |
1354 | "test-subrepo-recursion.t" | |
1355 | "test-transplant.t")) | |
1356 | (when tests? | |
1357 | (invoke "./run-tests.py" | |
1358 | ;; ‘make check’ does not respect ‘-j’. | |
1359 | (string-append "-j" (number->string | |
1360 | (parallel-job-count))) | |
03d76f8a TGR |
1361 | ;; The default time-outs are too low for many systems. |
1362 | ;; Raise them generously: Guix enforces its own. | |
1363 | "--timeout" "86400" | |
1364 | "--slowtimeout" "86400" | |
e2e62bf5 TGR |
1365 | ;; The test suite takes a long time and produces little |
1366 | ;; output by default. Prevent timeouts due to silence. | |
1367 | "-v")) | |
1368 | #t)))))) | |
10576acb RJ |
1369 | ;; The following inputs are only needed to run the tests. |
1370 | (native-inputs | |
1371 | `(("python-nose" ,python-nose) | |
1372 | ("unzip" ,unzip))) | |
5575917d | 1373 | (home-page "https://www.mercurial-scm.org/") |
5151c2e1 AB |
1374 | (synopsis "Decentralized version control system") |
1375 | (description | |
1376 | "Mercurial is a free, distributed source control management tool. | |
1377 | It efficiently handles projects of any size | |
1378 | and offers an easy and intuitive interface.") | |
369387b6 | 1379 | (license license:gpl2+))) |
5151c2e1 | 1380 | |
fc1e4516 AE |
1381 | (define-public neon |
1382 | (package | |
1383 | (name "neon") | |
51eb4df6 | 1384 | (version "0.30.2") |
fc1e4516 AE |
1385 | (source (origin |
1386 | (method url-fetch) | |
1387 | (uri (string-append "http://www.webdav.org/neon/neon-" | |
1388 | version ".tar.gz")) | |
1389 | (sha256 | |
1390 | (base32 | |
51eb4df6 | 1391 | "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv")))) |
fc1e4516 AE |
1392 | (build-system gnu-build-system) |
1393 | (native-inputs | |
1394 | `(("perl" ,perl) | |
1395 | ("pkg-config" ,pkg-config))) | |
1396 | (inputs | |
1397 | `(("libxml2" ,libxml2) | |
1398 | ("openssl" ,openssl) | |
1399 | ("zlib" ,zlib))) | |
1400 | (arguments | |
1401 | `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see | |
1402 | ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475 | |
1403 | #:tests? #f | |
1404 | #:configure-flags '("--enable-shared" | |
1405 | ;; requires libgnutils-config, deprecated | |
1406 | ;; in gnutls 2.8. | |
1407 | ; "--with-ssl=gnutls"))) | |
1408 | "--with-ssl=openssl"))) | |
1409 | (home-page "http://www.webdav.org/neon/") | |
1410 | (synopsis "HTTP and WebDAV client library") | |
35ad6b2e TGR |
1411 | (description |
1412 | "Neon is an HTTP and WebDAV client library, with a C interface and the | |
1413 | following features: | |
1414 | @enumerate | |
1415 | @item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE, | |
1416 | DELETE, etc.); | |
1417 | @item low-level interface to the HTTP request/response engine, allowing the use | |
1418 | of arbitrary HTTP methods, headers, etc.; | |
1419 | @item authentication support including Basic and Digest support, along with | |
1420 | GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32; | |
1421 | @item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for | |
1422 | verifying server certificates, handling client certificates, and examining | |
1423 | certificate properties, smartcard-based client certificates are also | |
1424 | supported via a PKCS#11 wrapper interface; | |
1425 | @item abstract interface to parsing XML using libxml2 or expat, and wrappers for | |
1426 | simplifying handling XML HTTP response bodies; | |
1427 | @item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify | |
1428 | property manipulation. | |
1429 | @end enumerate\n") | |
369387b6 | 1430 | (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+ |
fc1e4516 | 1431 | |
cf3fe3b0 CR |
1432 | (define-public subversion |
1433 | (package | |
1434 | (name "subversion") | |
6d9de48d | 1435 | (version "1.10.6") |
cf3fe3b0 CR |
1436 | (source (origin |
1437 | (method url-fetch) | |
5993f7c4 LF |
1438 | (uri |
1439 | (list | |
1440 | (string-append "https://archive.apache.org/dist/subversion/" | |
1441 | "subversion-" version ".tar.bz2") | |
1442 | (string-append "https://www-eu.apache.org/dist/subversion/" | |
1443 | "subversion-" version ".tar.bz2"))) | |
cf3fe3b0 CR |
1444 | (sha256 |
1445 | (base32 | |
6d9de48d | 1446 | "19zc215mhpnm92mlyl5jbv57r5zqp6cavr3s2g9yglp6j4kfgj0q")))) |
cf3fe3b0 | 1447 | (build-system gnu-build-system) |
8b2fe785 | 1448 | (arguments |
7c5a1454 EF |
1449 | '(#:phases |
1450 | (modify-phases %standard-phases | |
1451 | (add-after 'configure 'patch-libtool-wrapper-ls | |
1452 | (lambda* (#:key inputs #:allow-other-keys) | |
1453 | ;; This substitution allows tests svnauthz_tests and svnlook_tests | |
1454 | ;; to pass. These tests execute svnauthz and svnlook through | |
1455 | ;; their libtool wrapper scripts from svn hooks, whose empty | |
1456 | ;; environments cause "ls: command not found" errors. It would be | |
1457 | ;; nice if this fix ultimately made its way into libtool. | |
1458 | (let ((coreutils (assoc-ref inputs "coreutils"))) | |
1459 | (substitute* "libtool" | |
491f2918 EF |
1460 | (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls"))) |
1461 | #t))) | |
71653653 LF |
1462 | (add-before 'build 'patch-test-sh |
1463 | (lambda _ | |
1464 | (substitute* "subversion/tests/libsvn_repos/repos-test.c" | |
1465 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1466 | #t)) | |
7c5a1454 EF |
1467 | (add-after 'install 'install-perl-bindings |
1468 | (lambda* (#:key outputs #:allow-other-keys) | |
1469 | ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'. | |
1470 | (let ((out (assoc-ref outputs "out"))) | |
6d0f2612 MW |
1471 | (invoke "make" "swig-pl-lib") |
1472 | ;; FIXME: Test failures. | |
1473 | ;; (invoke "make" "check-swig-pl") | |
1474 | (invoke "make" "install-swig-pl-lib") | |
7c5a1454 | 1475 | |
6d0f2612 MW |
1476 | ;; Set the right installation prefix. |
1477 | (with-directory-excursion | |
1478 | "subversion/bindings/swig/perl/native" | |
1479 | (invoke "perl" "Makefile.PL" | |
1480 | "NO_PERLLOCAL=1" | |
1481 | (string-append "PREFIX=" out)) | |
1482 | (invoke "make" "install" | |
1483 | (string-append "OTHERLDFLAGS=" | |
1484 | "-Wl,-rpath=" | |
1485 | out "/lib"))))))))) | |
8b2fe785 | 1486 | (native-inputs |
98b79d36 AE |
1487 | `(("pkg-config" ,pkg-config) |
1488 | ;; For the Perl bindings. | |
1489 | ("swig" ,swig))) | |
cf3fe3b0 | 1490 | (inputs |
2b24faa2 AE |
1491 | `(("apr" ,apr) |
1492 | ("apr-util" ,apr-util) | |
71653653 | 1493 | ("lz4" ,lz4) |
46138f3e | 1494 | ("serf" ,serf) |
cf3fe3b0 | 1495 | ("perl" ,perl) |
71653653 | 1496 | ("python" ,python-wrapper) |
cf3fe3b0 | 1497 | ("sqlite" ,sqlite) |
71653653 | 1498 | ("utf8proc" ,utf8proc) |
cf3fe3b0 | 1499 | ("zlib" ,zlib))) |
ce84c924 | 1500 | (home-page "https://subversion.apache.org/") |
35b9e423 | 1501 | (synopsis "Revision control system") |
cf3fe3b0 | 1502 | (description |
36a4366d | 1503 | "@dfn{Subversion} (svn) exists to be recognized and adopted as a |
749b90a5 | 1504 | centralized version control system characterized by its |
cf3fe3b0 CR |
1505 | reliability as a safe haven for valuable data; the simplicity of its model and |
1506 | usage; and its ability to support the needs of a wide variety of users and | |
1507 | projects, from individuals to large-scale enterprise operations.") | |
369387b6 | 1508 | (license license:asl2.0))) |
cf3fe3b0 | 1509 | |
1b1c335f LC |
1510 | (define-public rcs |
1511 | (package | |
1512 | (name "rcs") | |
73ebc66f | 1513 | (version "5.9.4") |
1b1c335f LC |
1514 | (source (origin |
1515 | (method url-fetch) | |
1516 | (uri (string-append "mirror://gnu/rcs/rcs-" | |
1517 | version ".tar.xz")) | |
1518 | (sha256 | |
1519 | (base32 | |
096f0080 ST |
1520 | "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86")) |
1521 | (patches (search-patches "rcs-5.9.4-noreturn.patch")))) | |
1b1c335f | 1522 | (build-system gnu-build-system) |
740c24df | 1523 | (native-inputs `(("ed" ,ed))) |
4929ee9b EB |
1524 | (arguments |
1525 | `(#:phases (modify-phases %standard-phases | |
1526 | (add-before 'check 'disable-t810 | |
1527 | ;; See https://savannah.gnu.org/bugs/index.php?52288 | |
1528 | ;; Back-porting the fix is non-trivial, so disable for now. | |
1529 | (lambda _ | |
1530 | (substitute* "tests/Makefile" | |
1531 | ((" t810 \\\\\n") "")) | |
1532 | #t))))) | |
6fd52309 | 1533 | (home-page "https://www.gnu.org/software/rcs/") |
1b1c335f LC |
1534 | (synopsis "Per-file local revision control system") |
1535 | (description | |
79c311b8 LC |
1536 | "RCS is the original Revision Control System. It works on a |
1537 | file-by-file basis, in contrast to subsequent version control systems such as | |
1538 | CVS, Subversion, and Git. This can make it suitable for system | |
1539 | administration files, for example, which are often inherently local to one | |
1540 | machine.") | |
369387b6 | 1541 | (license license:gpl3+))) |
1972fed4 LC |
1542 | |
1543 | (define-public cvs | |
1544 | (package | |
1545 | (name "cvs") | |
1546 | (version "1.12.13") | |
1547 | (source (origin | |
1548 | (method url-fetch) | |
1549 | (uri (string-append | |
9006f8bc | 1550 | "https://ftp.gnu.org/non-gnu/cvs/source/feature/" |
1972fed4 | 1551 | version "/cvs-" version ".tar.bz2")) |
bba3c489 | 1552 | (patches (search-patches "cvs-CVE-2017-12836.patch")) |
1972fed4 LC |
1553 | (sha256 |
1554 | (base32 | |
1555 | "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq")))) | |
1556 | (build-system gnu-build-system) | |
1557 | (arguments | |
1558 | ;; XXX: The test suite looks flawed, and the package is obsolete anyway. | |
7fbbd3e7 EF |
1559 | '(#:tests? #f |
1560 | #:configure-flags (list "--with-external-zlib"))) | |
1972fed4 LC |
1561 | (inputs `(("zlib" ,zlib) |
1562 | ("nano" ,nano))) ; the default editor | |
1563 | (home-page "http://cvs.nongnu.org") | |
1564 | (synopsis "Historical centralized version control system") | |
1565 | (description | |
1566 | "CVS is a version control system, an important component of Source | |
1567 | Configuration Management (SCM). Using it, you can record the history of | |
1568 | sources files, and documents. It fills a similar role to the free software | |
1569 | RCS, PRCS, and Aegis packages.") | |
369387b6 | 1570 | (license license:gpl1+))) |
a4572a17 | 1571 | |
59ef2030 ML |
1572 | (define-public cvs-fast-export |
1573 | (package | |
1574 | (name "cvs-fast-export") | |
66416c0c | 1575 | (version "1.45") |
59ef2030 ML |
1576 | (source (origin |
1577 | (method url-fetch) | |
cfc92cd7 TGR |
1578 | (uri (string-append "http://www.catb.org/~esr/cvs-fast-export/" |
1579 | "cvs-fast-export-" version ".tar.gz")) | |
59ef2030 ML |
1580 | (sha256 |
1581 | (base32 | |
66416c0c | 1582 | "19pxg6p0pcgyd2fbnh3wy1kazv6vcfi5lzc2whhdi1w9kj4r9c4z")))) |
59ef2030 ML |
1583 | (build-system gnu-build-system) |
1584 | (arguments | |
d2885c83 EF |
1585 | '(#:phases |
1586 | (modify-phases %standard-phases | |
66416c0c | 1587 | (delete 'configure) ; no configure script |
d2885c83 EF |
1588 | (add-after 'unpack 'remove-optimizations |
1589 | (lambda _ | |
1590 | ;; Don't optimize for a specific processor architecture. | |
1591 | (substitute* "Makefile" | |
1592 | (("CFLAGS \\+= -march=native") "")) | |
d2885c83 EF |
1593 | #t))) |
1594 | #:parallel-build? #f ; parallel a2x commands fail spectacularly | |
59ef2030 ML |
1595 | #:make-flags |
1596 | (list "CC=gcc" (string-append "prefix?=" (assoc-ref %outputs "out"))))) | |
1597 | (inputs `(("git" ,git))) | |
1598 | (native-inputs `(("asciidoc" ,asciidoc) | |
59ef2030 ML |
1599 | ;; These are needed for the tests. |
1600 | ("cvs" ,cvs) | |
1601 | ("python" ,python-2) | |
1602 | ("rcs" ,rcs))) | |
1603 | (home-page "http://www.catb.org/esr/cvs-fast-export/") | |
1604 | (synopsis "Export an RCS or CVS history as a fast-import stream") | |
1605 | (description "This program analyzes a collection of RCS files in a CVS | |
1606 | repository (or outside of one) and, when possible, emits an equivalent history | |
1607 | in the form of a fast-import stream. Not all possible histories can be | |
1608 | rendered this way; the program tries to emit useful warnings when it can't. | |
1609 | ||
1610 | The program can also produce a visualization of the resulting commit directed | |
1611 | acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org, | |
1612 | Graphviz}. The package also includes @command{cvssync}, a tool for mirroring | |
1613 | masters from remote CVS hosts.") | |
369387b6 | 1614 | (license license:gpl2+))) |
59ef2030 | 1615 | |
a4572a17 LC |
1616 | (define-public vc-dwim |
1617 | (package | |
1618 | (name "vc-dwim") | |
b2211976 | 1619 | (version "1.9") |
a4572a17 LC |
1620 | (source (origin |
1621 | (method url-fetch) | |
1622 | (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-" | |
1623 | version ".tar.xz")) | |
1624 | (sha256 | |
1625 | (base32 | |
b2211976 | 1626 | "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf")))) |
a4572a17 | 1627 | (build-system gnu-build-system) |
b2211976 EF |
1628 | (inputs `(("perl" ,perl))) |
1629 | (native-inputs | |
1630 | `(("emacs" ,emacs-minimal) ; for `ctags' | |
1631 | ("inetutils" ,inetutils))) ; for `hostname', used in the tests | |
f968f1a7 | 1632 | (home-page "https://www.gnu.org/software/vc-dwim/") |
a4572a17 LC |
1633 | (synopsis "Version-control-agnostic ChangeLog diff and commit tool") |
1634 | (description | |
a22dc0c4 LC |
1635 | "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\". |
1636 | vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and | |
1637 | using version control at the same time, for example by printing a reminder | |
1638 | when a file change has been described in the ChangeLog but the file has not | |
79c311b8 | 1639 | been added to the VC. vc-chlog scans changed files and generates |
a22dc0c4 | 1640 | standards-compliant ChangeLog entries based on the changes that it detects.") |
369387b6 | 1641 | (license license:gpl3+))) |
83a39ed7 LC |
1642 | |
1643 | (define-public diffstat | |
1644 | (package | |
1645 | (name "diffstat") | |
db546942 | 1646 | (version "1.63") |
83a39ed7 LC |
1647 | (source (origin |
1648 | (method url-fetch) | |
86bc52f9 TGR |
1649 | (uri |
1650 | (list | |
1651 | (string-append "ftp://invisible-island.net/diffstat/" | |
17e5b488 | 1652 | "diffstat-" version ".tgz") |
86bc52f9 | 1653 | (string-append "http://invisible-mirror.net/archives/diffstat/" |
17e5b488 | 1654 | "diffstat-" version ".tgz"))) |
83a39ed7 LC |
1655 | (sha256 |
1656 | (base32 | |
db546942 | 1657 | "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby")))) |
83a39ed7 | 1658 | (build-system gnu-build-system) |
432fd269 | 1659 | (home-page "https://invisible-island.net/diffstat/") |
0aea268a | 1660 | (synopsis "Make histograms from the output of @command{diff}") |
83a39ed7 | 1661 | (description |
0aea268a TGR |
1662 | "Diffstat reads the output of @command{diff} and displays a histogram of |
1663 | the insertions, deletions, and modifications per file. It is useful for | |
1664 | reviewing large, complex patch files.") | |
369387b6 | 1665 | (license (license:x11-style "file://COPYING")))) |
25f76ef0 | 1666 | |
25f76ef0 JD |
1667 | (define-public cssc |
1668 | (package | |
1669 | (name "cssc") | |
f9f7e28b | 1670 | (version "1.4.1") |
25f76ef0 JD |
1671 | (source (origin |
1672 | (method url-fetch) | |
1673 | (uri (string-append "mirror://gnu/" name "/CSSC-" | |
1674 | version ".tar.gz")) | |
1675 | (sha256 | |
1676 | (base32 | |
f9f7e28b | 1677 | "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni")))) |
25f76ef0 JD |
1678 | (build-system gnu-build-system) |
1679 | (arguments | |
bf3c57ff EF |
1680 | `(#:phases |
1681 | (modify-phases %standard-phases | |
1682 | (add-before 'check 'precheck | |
1683 | (lambda _ | |
1684 | (begin | |
1685 | (substitute* "tests/common/test-common" | |
1686 | (("/bin/pwd") (which "pwd"))) | |
1687 | ||
1688 | (substitute* "tests/prt/all-512.sh" | |
1689 | (("/bin/sh") (which "sh"))) | |
1690 | ||
1691 | ;; XXX: This test has no hope of passing until there is a "nogroup" | |
1692 | ;; entry (or at least some group to which the guix builder does | |
1693 | ;; not belong) in the /etc/group file of the build environment. | |
1694 | ;; Currently we do not have such a group. Disable this test for now. | |
1695 | (substitute* "tests/Makefile" | |
1696 | (("test-delta ") "")))))))) | |
25f76ef0 JD |
1697 | ;; These are needed for the tests |
1698 | (native-inputs `(("git" ,git) | |
1699 | ("cvs" ,cvs))) | |
6fd52309 | 1700 | (home-page "https://www.gnu.org/software/cssc/") |
25f76ef0 JD |
1701 | (synopsis "File-based version control like SCCS") |
1702 | (description "GNU CSSC provides a replacement for the legacy Unix source | |
1703 | code control system SCCS. This allows old code still under that system to be | |
1704 | accessed and migrated on modern systems.") | |
369387b6 | 1705 | (license license:gpl3+))) |
0e534e74 | 1706 | |
e881752c | 1707 | ;; This package can unfortunately work only in -TEST mode, since Aegis |
0e534e74 JD |
1708 | ;; requires that it is installed setuid root. |
1709 | (define-public aegis | |
1710 | (package | |
1711 | (name "aegis") | |
1712 | (version "4.24") | |
1713 | (source (origin | |
1714 | (method url-fetch) | |
de67e922 LF |
1715 | (uri (string-append "mirror://sourceforge/aegis/aegis/" version |
1716 | "/aegis-" version ".tar.gz")) | |
0e534e74 JD |
1717 | (sha256 |
1718 | (base32 | |
1719 | "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl")) | |
fc1adab1 AK |
1720 | (patches (search-patches "aegis-perl-tempdir1.patch" |
1721 | "aegis-perl-tempdir2.patch" | |
1722 | "aegis-test-fixup-1.patch" | |
1723 | "aegis-test-fixup-2.patch" | |
1724 | "aegis-constness-error.patch")))) | |
0e534e74 JD |
1725 | (build-system gnu-build-system) |
1726 | (inputs | |
1727 | `(("e2fsprogs" ,e2fsprogs) | |
1728 | ("curl" ,curl) | |
0253ab39 | 1729 | ("file" ,file) |
0e534e74 JD |
1730 | ("libxml2" ,libxml2) |
1731 | ("zlib" ,zlib) | |
b94a6ca0 | 1732 | ("gettext" ,gettext-minimal))) |
0e534e74 JD |
1733 | (native-inputs |
1734 | `(("bison" ,bison) | |
1735 | ("groff" ,groff) | |
1736 | ("perl" ,perl) | |
1737 | ;; Various tests require the following: | |
e881752c | 1738 | ("cvs" ,cvs) |
0e534e74 JD |
1739 | ("flex" ,flex) |
1740 | ("cook" ,cook) | |
1741 | ("subversion" ,subversion) | |
1742 | ("rcs" ,rcs) | |
1743 | ("ed" ,ed))) | |
1744 | (arguments | |
e881752c | 1745 | `(#:configure-flags (list "--with-no-aegis-configured" |
0e534e74 JD |
1746 | "--sharedstatedir=/var/com/aegis") |
1747 | #:parallel-build? #f ; There are some nasty racy rules in the Makefile. | |
e881752c | 1748 | #:phases |
8ef843c7 EF |
1749 | (modify-phases %standard-phases |
1750 | (add-before 'configure 'pre-conf | |
1751 | (lambda _ | |
1752 | (substitute* (append '("configure" | |
1753 | "etc/check-tar-gz.sh" | |
1754 | "etc/patches.sh" | |
1755 | "etc/test.sh" | |
1756 | "script/aexver.in" | |
1757 | "script/aebisect.in" | |
1758 | "script/aeintegratq.in" | |
1759 | "script/tkaegis.in" | |
1760 | "script/test_funcs.in" | |
1761 | "web/eg_oss_templ.sh" | |
1762 | "web/webiface.html" | |
1763 | "libaegis/getpw_cache.cc") | |
1764 | (find-files "test" "\\.sh")) | |
1765 | (("/bin/sh") (which "sh"))) | |
923e2d24 TGR |
1766 | (setenv "SH" (which "sh")) |
1767 | #t)) | |
8ef843c7 EF |
1768 | (replace 'check |
1769 | (lambda _ | |
1770 | (let ((home (string-append (getcwd) "/my-new-home"))) | |
1771 | ;; Some tests need to write to $HOME. | |
1772 | (mkdir home) | |
1773 | (setenv "HOME" home) | |
1774 | ||
923e2d24 | 1775 | ;; This test assumes that flex has been symlinked to "lex". |
8ef843c7 EF |
1776 | (substitute* "test/00/t0011a.sh" |
1777 | (("type lex") "type flex")) | |
1778 | ||
0b6be05e TGR |
1779 | ;; XXX Disable tests that fail, for unknown reasons, ‘for now’. |
1780 | (for-each | |
1781 | (lambda (test) (substitute* "Makefile" | |
1782 | (((string-append "test/" test "\\.ES ")) ""))) | |
1783 | (list "00/t0011a" | |
1784 | "00/t0049a" | |
1785 | "01/t0196a")) | |
1786 | ||
8ef843c7 | 1787 | ;; The author decided to call the check rule "sure". |
923e2d24 | 1788 | (invoke "make" "sure"))))))) |
0e534e74 JD |
1789 | (home-page "http://aegis.sourceforge.net") |
1790 | (synopsis "Project change supervisor") | |
1791 | (description "Aegis is a project change supervisor, and performs some of | |
35b9e423 | 1792 | the Software Configuration Management needed in a CASE environment. Aegis |
0e534e74 JD |
1793 | provides a framework within which a team of developers may work on many |
1794 | changes to a program independently, and Aegis coordinates integrating these | |
1795 | changes back into the master source of the program, with as little disruption | |
35b9e423 | 1796 | as possible. Resolution of contention for source files, a major headache for |
0e534e74 | 1797 | any project with more than one developer, is one of Aegis's major functions.") |
369387b6 | 1798 | (license license:gpl3+))) |
2459141e | 1799 | |
62063d85 ML |
1800 | (define-public reposurgeon |
1801 | (package | |
1802 | (name "reposurgeon") | |
218b94f3 | 1803 | (version "3.43") |
62063d85 ML |
1804 | (source (origin |
1805 | (method url-fetch) | |
1806 | (uri (string-append "http://www.catb.org/~esr/" name "/" | |
1807 | name "-" version ".tar.xz")) | |
1808 | (sha256 | |
1809 | (base32 | |
218b94f3 TGR |
1810 | "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz")) |
1811 | (patches (search-patches | |
1812 | "reposurgeon-add-missing-docbook-files.patch")))) | |
62063d85 ML |
1813 | (build-system gnu-build-system) |
1814 | (arguments | |
33ecc7a4 TGR |
1815 | `(#:make-flags |
1816 | (list "ECHO=echo" | |
1817 | (string-append "target=" (assoc-ref %outputs "out"))) | |
62063d85 ML |
1818 | #:phases |
1819 | (modify-phases %standard-phases | |
218b94f3 TGR |
1820 | (add-after 'unpack 'patch-inputs |
1821 | (lambda* (#:key inputs #:allow-other-keys) | |
1822 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
1823 | (substitute* "reposurgeon" | |
1824 | (("/usr/share/zoneinfo") | |
1825 | (string-append tzdata "/share/zoneinfo"))) | |
33ecc7a4 TGR |
1826 | (substitute* "test/svn-to-svn" |
1827 | (("/bin/echo") "echo")) | |
218b94f3 | 1828 | #t))) |
33ecc7a4 | 1829 | (delete 'configure) ; no configure script |
62063d85 ML |
1830 | (add-before 'build 'fix-docbook |
1831 | (lambda* (#:key inputs #:allow-other-keys) | |
1832 | (substitute* (find-files "." "\\.xml$") | |
1833 | (("docbook/docbookx.dtd") | |
1834 | (string-append (assoc-ref inputs "docbook-xml") | |
1835 | "/xml/dtd/docbook/docbookx.dtd"))) | |
1836 | #t)) | |
33ecc7a4 TGR |
1837 | (add-before 'check 'set-up-test-environment |
1838 | (lambda* (#:key inputs #:allow-other-keys) | |
1839 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
1840 | (setenv "TZDIR" (string-append tzdata "/share/zoneinfo")) | |
1841 | #t))) | |
62063d85 ML |
1842 | (add-after 'install 'install-emacs-data |
1843 | (lambda* (#:key outputs #:allow-other-keys) | |
1844 | (install-file "reposurgeon-mode.el" | |
1845 | (string-append (assoc-ref outputs "out") | |
443c432e TGR |
1846 | "/share/emacs/site-lisp")) |
1847 | #t))))) | |
62063d85 | 1848 | (inputs |
218b94f3 TGR |
1849 | `(("python" ,python-wrapper) |
1850 | ("tzdata" ,tzdata))) | |
62063d85 | 1851 | (native-inputs |
33ecc7a4 TGR |
1852 | `( ;; For building documentation. |
1853 | ("asciidoc" ,asciidoc) | |
218b94f3 | 1854 | ("docbook-xml" ,docbook-xml) |
62063d85 ML |
1855 | ("docbook-xsl" ,docbook-xsl) |
1856 | ("libxml2" ,libxml2) | |
33ecc7a4 TGR |
1857 | ("xmlto" ,xmlto) |
1858 | ||
1859 | ;; For tests. | |
1860 | ("cvs" ,cvs) | |
1861 | ("git" ,git) | |
1862 | ("mercurial" ,mercurial) | |
1863 | ("subversion" ,subversion))) | |
62063d85 ML |
1864 | (home-page "http://www.catb.org/~esr/reposurgeon/") |
1865 | (synopsis "Edit version-control repository history") | |
1866 | (description "Reposurgeon enables risky operations that version-control | |
1867 | systems don't want to let you do, such as editing past comments and metadata | |
1868 | and removing commits. It works with any version control system that can | |
1869 | export and import Git fast-import streams, including Git, Mercurial, Fossil, | |
1870 | Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly | |
1871 | and can thus be used to script production of very high-quality conversions | |
1872 | from Subversion to any supported Distributed Version Control System (DVCS).") | |
1873 | ;; Most files are distributed under bsd-2, except 'repocutter' which is | |
1874 | ;; under bsd-3. | |
369387b6 | 1875 | (license (list license:bsd-2 license:bsd-3)))) |
62063d85 | 1876 | |
2459141e TČ |
1877 | (define-public tig |
1878 | (package | |
1879 | (name "tig") | |
446b4d4f | 1880 | (version "2.5.0") |
2459141e TČ |
1881 | (source (origin |
1882 | (method url-fetch) | |
1883 | (uri (string-append | |
73f71bc9 EF |
1884 | "https://github.com/jonas/tig/releases/download/tig-" |
1885 | version "/tig-" version ".tar.gz")) | |
2459141e TČ |
1886 | (sha256 |
1887 | (base32 | |
446b4d4f | 1888 | "1x5famvvs93ih7sr11x7m33dksb1k7zs1s3c4zkyf0cjmxkpqlzz")))) |
2459141e | 1889 | (build-system gnu-build-system) |
2203e4c2 EF |
1890 | (native-inputs |
1891 | `(("asciidoc" ,asciidoc) | |
1892 | ("xmlto" ,xmlto))) | |
2459141e | 1893 | (inputs |
d0e11e8b EF |
1894 | `(("ncurses" ,ncurses) |
1895 | ("readline" ,readline))) | |
2459141e | 1896 | (arguments |
2203e4c2 EF |
1897 | `(#:phases |
1898 | (modify-phases %standard-phases | |
1899 | (add-after 'install 'install-doc | |
1900 | (lambda _ | |
5cacd314 | 1901 | (invoke "make" "install-doc")))) |
2203e4c2 | 1902 | #:tests? #f)) ; tests require access to /dev/tty |
73f71bc9 EF |
1903 | ;; #:test-target "test")) |
1904 | (home-page "https://jonas.github.io/tig/") | |
2459141e TČ |
1905 | (synopsis "Ncurses-based text user interface for Git") |
1906 | (description | |
1907 | "Tig is an ncurses text user interface for Git, primarily intended as | |
1908 | a history browser. It can also stage hunks for commit, or colorize the | |
5416e40f | 1909 | output of the @code{git} command.") |
369387b6 | 1910 | (license license:gpl2+))) |
df7393b9 LC |
1911 | |
1912 | (define-public findnewest | |
1913 | (package | |
1914 | (name "findnewest") | |
9c7e7ead | 1915 | (version "0.3") |
395ee951 TGR |
1916 | (source |
1917 | (origin | |
1918 | (method git-fetch) | |
1919 | (uri (git-reference | |
1920 | (url "https://github.com/0-wiz-0/findnewest.git") | |
1921 | (commit (string-append "findnewest-" version)))) | |
1922 | (file-name (git-file-name name version)) | |
1923 | (sha256 | |
1924 | (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq")))) | |
df7393b9 | 1925 | (build-system gnu-build-system) |
df7393b9 LC |
1926 | (native-inputs `(("autoconf" ,autoconf) |
1927 | ("automake" ,automake))) | |
1928 | (home-page "https://github.com/0-wiz-0/findnewest/releases") | |
1929 | (synopsis "Print the modification time of the latest file") | |
1930 | (description | |
1931 | "Recursively find the newest file in a file tree and print its | |
1932 | modification time.") | |
369387b6 | 1933 | (license license:bsd-2))) |
e92b8599 KM |
1934 | |
1935 | (define-public myrepos | |
1936 | (package | |
1937 | (name "myrepos") | |
c16913d3 | 1938 | (version "1.20180726") |
e92b8599 KM |
1939 | (source |
1940 | (origin | |
d46e9fcb EF |
1941 | (method git-fetch) |
1942 | (uri (git-reference | |
1943 | (url "git://myrepos.branchable.com/myrepos") | |
1944 | (commit version))) | |
1945 | (file-name (string-append name "-" version "-checkout")) | |
e92b8599 | 1946 | (sha256 |
c16913d3 | 1947 | (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5")))) |
e92b8599 | 1948 | (build-system gnu-build-system) |
e92b8599 | 1949 | (arguments |
d46e9fcb | 1950 | '(#:test-target "test" |
30012b74 EF |
1951 | #:make-flags (list (string-append "PREFIX=" %output)) |
1952 | #:phases | |
1953 | (modify-phases %standard-phases | |
1954 | (delete 'configure) | |
1955 | (add-after 'install 'wrap-webcheckout | |
1956 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1957 | (let ((out (assoc-ref outputs "out"))) | |
1958 | (wrap-program (string-append out "/bin/webcheckout") | |
1959 | `("PERL5LIB" ":" prefix | |
1960 | ,(map (lambda (i) (string-append (assoc-ref inputs i) | |
1961 | "/lib/perl5/site_perl")) | |
1962 | '("perl-encode-locale" "perl-http-date" | |
1963 | "perl-http-message" "perl-html-parser" "perl-libwww" | |
1964 | "perl-uri" "perl-try-tiny")))) | |
1965 | #t)))))) | |
1966 | (inputs | |
1967 | `(("perl" ,perl) | |
1968 | ("perl-encode-locale" ,perl-encode-locale) | |
1969 | ("perl-html-parser" ,perl-html-parser) | |
1970 | ("perl-http-date" ,perl-http-date) | |
1971 | ("perl-http-message" ,perl-http-message) | |
1972 | ("perl-libwww" ,perl-libwww) | |
1973 | ("perl-try-tiny" ,perl-try-tiny) | |
1974 | ("perl-uri" ,perl-uri))) | |
d46e9fcb | 1975 | (home-page "https://myrepos.branchable.com/") |
e92b8599 KM |
1976 | (synopsis "Multiple repository management tool") |
1977 | (description | |
1978 | "Myrepos provides the @code{mr} command, which maps an operation (e.g., | |
1979 | fetching updates) over a collection of version control repositories. It | |
1980 | supports a large number of version control systems: Git, Subversion, | |
1981 | Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.") | |
369387b6 | 1982 | (license license:gpl2+))) |
e8d2168c EF |
1983 | |
1984 | (define-public git-annex-remote-hubic | |
1985 | (package | |
1986 | (name "git-annex-remote-hubic") | |
1987 | (version "0.3.1") | |
3671b69c TGR |
1988 | (source |
1989 | (origin | |
1990 | (method git-fetch) | |
1991 | (uri (git-reference | |
1992 | (url "https://github.com/Schnouki/git-annex-remote-hubic.git") | |
1993 | (commit (string-append "v" version)))) | |
1994 | (file-name (git-file-name name version)) | |
1995 | (sha256 | |
1996 | (base32 "16y9sk67hfi17h9n2kkffyabfccksh5rab40hhk69v6cxmbpn2sx")))) | |
e8d2168c | 1997 | (build-system python-build-system) |
f71d1a08 | 1998 | (arguments `(#:python ,python-2)) |
e8d2168c | 1999 | (native-inputs |
f3b98f4f | 2000 | `(;; for the tests |
f71d1a08 | 2001 | ("python2-six" ,python2-six))) |
e8d2168c | 2002 | (propagated-inputs |
7b6ff42a | 2003 | `(("python2-dateutil" ,python2-dateutil) |
f71d1a08 EF |
2004 | ("python2-futures" ,python2-futures) |
2005 | ("python2-rauth" ,python2-rauth) | |
2006 | ("python2-swiftclient" ,python2-swiftclient))) | |
e8d2168c EF |
2007 | (home-page "https://github.com/Schnouki/git-annex-remote-hubic/") |
2008 | (synopsis "Use hubic as a git-annex remote") | |
2009 | (description | |
2010 | "This package allows you to use your hubic account as a \"special | |
2011 | repository\" with git-annex.") | |
369387b6 | 2012 | (license license:gpl3+))) |
f36a1eba | 2013 | |
623d4b46 AG |
2014 | (define-public git-annex-remote-rclone |
2015 | (package | |
2016 | (name "git-annex-remote-rclone") | |
2017 | (version "0.6") | |
2018 | (source | |
2019 | (origin | |
2020 | (method git-fetch) | |
2021 | (uri (git-reference | |
2022 | (url "https://github.com/DanielDent/git-annex-remote-rclone.git") | |
2023 | (commit (string-append "v" version)))) | |
2024 | (file-name (git-file-name name version)) | |
2025 | (sha256 | |
2026 | (base32 | |
2027 | "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp")))) | |
2028 | (build-system trivial-build-system) | |
2029 | (arguments | |
2030 | `(#:modules ((guix build utils)) | |
2031 | #:builder | |
2032 | (begin | |
2033 | (use-modules (guix build utils)) | |
2034 | (let ((bash (string-append (assoc-ref %build-inputs "bash") | |
2035 | "/bin/bash")) | |
2036 | (rclone (string-append (assoc-ref %build-inputs "rclone") | |
2037 | "/bin/rclone"))) | |
2038 | (copy-file (string-append (assoc-ref %build-inputs "source") | |
2039 | "/git-annex-remote-rclone") | |
2040 | "git-annex-remote-rclone") | |
2041 | (substitute* "git-annex-remote-rclone" | |
2042 | (("/bin/bash") bash) | |
2043 | (("runcmd rclone") (string-append "runcmd " rclone))) | |
2044 | (install-file "git-annex-remote-rclone" | |
2045 | (string-append %output "/bin")) | |
2046 | #t)))) | |
2047 | (inputs | |
2048 | `(("bash" ,bash) | |
2049 | ("rclone" ,rclone))) | |
2050 | (home-page "https://github.com/DanielDent/git-annex-remote-rclone") | |
2051 | (synopsis "Use rclone-supported cloud storage providers with git-annex") | |
2052 | (description "This wrapper around rclone makes any destination supported | |
2053 | by rclone usable with git-annex.") | |
2054 | (license license:gpl3+))) | |
2055 | ||
f36a1eba EB |
2056 | (define-public fossil |
2057 | (package | |
2058 | (name "fossil") | |
66d05055 | 2059 | (version "2.8") |
f36a1eba EB |
2060 | (source |
2061 | (origin | |
2062 | (method url-fetch) | |
d0b13d7b | 2063 | ;; Older downloads are moved to another URL. |
2064 | (uri (list | |
2065 | (string-append | |
2066 | "https://www.fossil-scm.org/index.html/uv/download/" | |
2067 | "fossil-src-" version ".tar.gz") | |
2068 | (string-append | |
2069 | "https://www.fossil-scm.org/index.html/uv/" | |
2070 | "fossil-src-" version ".tar.gz"))) | |
f36a1eba EB |
2071 | (sha256 |
2072 | (base32 | |
0b1fb0aa EF |
2073 | "0pbinf8d2kj1j7niblhzjd2l2khg6r2pn2xvig6gavz27p3vwcka")) |
2074 | (modules '((guix build utils))) | |
2075 | (snippet | |
2076 | '(begin | |
2077 | (delete-file-recursively "compat") #t)))) | |
f36a1eba EB |
2078 | (build-system gnu-build-system) |
2079 | (native-inputs | |
2080 | `(("tcl" ,tcl) ;for configuration only | |
2081 | ("which" ,which) ;for tests only | |
2082 | ("ed" ,ed))) ;ditto | |
2083 | (inputs | |
2084 | `(("openssl" ,openssl) | |
2085 | ("zlib" ,zlib) | |
2086 | ("sqlite" ,sqlite))) | |
2087 | (arguments | |
2088 | `(#:configure-flags (list "--with-openssl=auto" | |
2089 | "--disable-internal-sqlite") | |
2090 | #:test-target "test" | |
2091 | #:phases (modify-phases %standard-phases | |
66d05055 JL |
2092 | (add-after 'patch-source-shebangs 'patch-sh |
2093 | (lambda _ | |
2094 | (substitute* '("auto.def") | |
2095 | (("/bin/sh") (which "sh"))) | |
2096 | #t)) | |
f36a1eba EB |
2097 | (replace 'configure |
2098 | (lambda* (#:key outputs (configure-flags '()) | |
5c0f68e8 | 2099 | #:allow-other-keys) |
f36a1eba EB |
2100 | ;; The 'configure' script is not an autoconf script and |
2101 | ;; chokes on unrecognized options. | |
5c0f68e8 TGR |
2102 | (apply invoke |
2103 | "./configure" | |
2104 | (string-append "--prefix=" | |
2105 | (assoc-ref outputs "out")) | |
2106 | configure-flags) | |
2107 | #t)) | |
f36a1eba EB |
2108 | (add-before 'check 'test-setup |
2109 | (lambda _ | |
2110 | (setenv "USER" "guix") | |
2111 | (setenv "TZ" "UTC") | |
f36a1eba EB |
2112 | #t))))) |
2113 | (home-page "https://fossil-scm.org") | |
2114 | (synopsis "Software configuration management system") | |
2115 | (description | |
2116 | "Fossil is a distributed source control management system which supports | |
2117 | access and administration over HTTP CGI or via a built-in HTTP server. It has | |
2118 | a built-in wiki, built-in file browsing, built-in tickets system, etc.") | |
369387b6 | 2119 | (license (list license:public-domain ;src/miniz.c, src/shell.c |
2120 | license:bsd-2)))) | |
1062f245 | 2121 | |
2122 | (define-public stagit | |
2123 | (package | |
2124 | (name "stagit") | |
6b86af5a | 2125 | (version "0.7.2") |
1062f245 | 2126 | (source (origin |
2127 | (method url-fetch) | |
fea8b729 | 2128 | (uri (string-append "https://dl.2f30.org/releases/" |
1062f245 | 2129 | name "-" version ".tar.gz")) |
2130 | (sha256 | |
2131 | (base32 | |
6b86af5a | 2132 | "1m3s9g1z9szbjrhm8sic91xh6f2bfpi56rskdkqd5wc4wdycpyi5")))) |
1062f245 | 2133 | (build-system gnu-build-system) |
2134 | (arguments | |
2135 | `(#:tests? #f ; No tests | |
2136 | #:make-flags (list "CC=gcc" | |
2137 | (string-append "PREFIX=" %output)) | |
2138 | #:phases | |
2139 | (modify-phases %standard-phases | |
2140 | (delete 'configure)))) ; No configure script | |
2141 | (inputs | |
2142 | `(("libgit2" ,libgit2))) | |
fea8b729 | 2143 | (home-page "https://2f30.org/") |
1062f245 | 2144 | (synopsis "Static git page generator") |
2145 | (description "Stagit creates static pages for git repositories, the results can | |
2146 | be served with a HTTP file server of your choice.") | |
2147 | (license license:expat))) | |
d81f131f | 2148 | |
ca3c1439 OP |
2149 | (define-public gource |
2150 | (package | |
2151 | (name "gource") | |
5bc4188f | 2152 | (version "0.49") |
ca3c1439 OP |
2153 | (source (origin |
2154 | (method url-fetch) | |
2155 | (uri (string-append | |
45b48698 OP |
2156 | "https://github.com/acaudwell/Gource/releases/download" |
2157 | "/gource-" version "/gource-" version ".tar.gz")) | |
ca3c1439 OP |
2158 | (sha256 |
2159 | (base32 | |
5bc4188f | 2160 | "12hf5ipcsp9dxsqn84n4kr63xaiskrnf5a084wr29qk171lj7pd9")))) |
ca3c1439 OP |
2161 | (build-system gnu-build-system) |
2162 | (arguments | |
2163 | `(#:configure-flags | |
2164 | (list (string-append "--with-boost-libdir=" | |
2165 | (assoc-ref %build-inputs "boost") | |
2166 | "/lib")))) | |
2167 | (native-inputs | |
2168 | `(("pkg-config" ,pkg-config))) | |
2169 | (inputs | |
2170 | `(("boost" ,boost) | |
2171 | ("ftgl" ,ftgl) | |
2172 | ("glew" ,glew) | |
2173 | ("glm" ,glm) | |
2174 | ("glu" ,glu) | |
2175 | ("libpng" ,libpng) | |
2176 | ("mesa" ,mesa) | |
2177 | ("pcre" ,pcre) | |
2178 | ("sdl-union" ,(sdl-union (list sdl2 sdl2-image))))) | |
2179 | (home-page "http://gource.io/") | |
2180 | (synopsis "3D visualisation tool for source control repositories") | |
2181 | (description "@code{gource} provides a software version control | |
2182 | visualization. The repository is displayed as a tree where the root of the | |
2183 | repository is the centre, directories are branches and files are leaves. | |
2184 | Contributors to the source code appear and disappear as they contribute to | |
2185 | specific files and directories.") | |
2186 | (license license:gpl3+))) | |
0ed7498a SB |
2187 | |
2188 | (define-public src | |
2189 | (package | |
2190 | (name "src") | |
2191 | (version "1.18") | |
2192 | (source (origin | |
2193 | (method url-fetch) | |
2194 | (uri (string-append | |
2195 | "http://www.catb.org/~esr/src/src-" version ".tar.gz")) | |
2196 | (sha256 | |
2197 | (base32 | |
2198 | "0n0skhvya8w2az45h2gsafxy8m2mvqas64nrgxifcmrzfv0rf26c")))) | |
2199 | (build-system gnu-build-system) | |
2200 | (arguments | |
2201 | '(#:make-flags | |
2202 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
2203 | #:phases | |
2204 | (modify-phases %standard-phases | |
2205 | (delete 'configure) ; no 'configure' script | |
2206 | (add-after 'install 'wrap-program | |
2207 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2208 | (let* ((out (assoc-ref outputs "out")) | |
2209 | (prog (string-append out "/bin/src")) | |
2210 | (rcs (assoc-ref inputs "rcs"))) | |
2211 | (wrap-program prog | |
2212 | `("PATH" ":" prefix (,(string-append rcs "/bin")))) | |
2213 | #t))) | |
2214 | (replace 'check | |
2215 | (lambda _ | |
2216 | (setenv "HOME" (getenv "TMPDIR")) | |
2217 | (invoke "git" "config" "--global" "user.name" "guix") | |
2218 | (invoke "git" "config" "--global" "user.email" "guix") | |
2219 | (invoke "./srctest")))))) | |
2220 | (native-inputs | |
2221 | ;; For testing. | |
2222 | `(("git" ,git) | |
2223 | ("perl" ,perl))) | |
2224 | (inputs | |
2225 | `(("python" ,python-wrapper) | |
2226 | ("rcs" ,rcs))) | |
2227 | (synopsis "Simple revision control") | |
2228 | (home-page "http://www.catb.org/~esr/src/") | |
2229 | (description | |
2230 | "SRC (or src) is simple revision control, a version-control system for | |
2231 | single-file projects by solo developers and authors. It modernizes the | |
2232 | venerable RCS, hence the anagrammatic acronym. The design is tuned for use | |
2233 | cases like all those little scripts in your @file{~/bin} directory, or a | |
2234 | directory full of HOWTOs.") | |
2235 | (license license:bsd-2))) | |
a078a6ec | 2236 | |
243bdcc1 KM |
2237 | (define-public git-when-merged |
2238 | ;; Use an unreleased version to get a PY3 compatibility fix. | |
2239 | (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d")) | |
2240 | (package | |
2241 | (name "git-when-merged") | |
2242 | (version (string-append "1.2.0-" (string-take commit 7))) | |
2243 | (source (origin | |
2244 | (method git-fetch) | |
2245 | (uri (git-reference | |
2246 | (url "https://github.com/mhagger/git-when-merged/") | |
2247 | (commit commit))) | |
2248 | (file-name (git-file-name name version)) | |
2249 | (sha256 | |
2250 | (base32 | |
2251 | "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p")))) | |
2252 | (build-system gnu-build-system) | |
2253 | (arguments | |
2254 | `(#:tests? #f ; there are no tests | |
2255 | #:phases | |
2256 | (modify-phases %standard-phases | |
2257 | (delete 'configure) | |
2258 | (delete 'build) | |
2259 | (replace 'install | |
2260 | (lambda* (#:key outputs #:allow-other-keys) | |
2261 | (install-file "bin/git-when-merged" | |
2262 | (string-append (assoc-ref outputs "out") | |
2263 | "/bin")) | |
2264 | #t)) | |
2265 | (add-before 'install 'patch-git | |
2266 | (lambda* (#:key inputs #:allow-other-keys) | |
2267 | (let ((git (string-append (assoc-ref inputs "git") | |
2268 | "/bin/git"))) | |
2269 | (substitute* "bin/git-when-merged" | |
2270 | (("'git'") (string-append "'" git "'"))) | |
2271 | #t))) | |
2272 | (add-after 'install 'wrap-script | |
2273 | (lambda* (#:key outputs #:allow-other-keys) | |
2274 | (wrap-program (string-append (assoc-ref outputs "out") | |
2275 | "/bin/git-when-merged") | |
2276 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) | |
2277 | #t))))) | |
2278 | (inputs | |
2279 | `(("git" ,git) | |
2280 | ("python" ,python-wrapper))) | |
2281 | (home-page "https://github.com/mhagger/git-when-merged") | |
2282 | (synopsis "Determine when a commit was merged into a Git branch") | |
2283 | (description "This Git extension defines a subcommand, | |
2284 | @code{when-merged}, whose core operation is to find the merge that brought a | |
2285 | given commit into the specified ref(s). It has various options that control | |
2286 | how information about the merge is displayed.") | |
887437ee | 2287 | (license license:gpl2+)))) |
3855506f KM |
2288 | |
2289 | (define-public git-imerge | |
2290 | (package | |
2291 | (name "git-imerge") | |
2292 | (version "1.1.0") | |
5c54debc TGR |
2293 | (source |
2294 | (origin | |
2295 | (method git-fetch) | |
2296 | (uri (git-reference | |
2297 | (url "https://github.com/mhagger/git-imerge.git") | |
2298 | (commit (string-append "v" version)))) | |
2299 | (file-name (git-file-name name version)) | |
2300 | (sha256 | |
2301 | (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4")))) | |
3855506f KM |
2302 | (build-system gnu-build-system) |
2303 | (arguments | |
5c54debc | 2304 | `(#:tests? #f ; only manual test scripts |
3855506f KM |
2305 | #:make-flags (list (string-append "DESTDIR=" %output) |
2306 | "PREFIX=") | |
2307 | #:phases | |
2308 | (modify-phases %standard-phases | |
2309 | (delete 'configure) | |
2310 | (add-before 'install 'patch-git | |
2311 | (lambda* (#:key inputs #:allow-other-keys) | |
2312 | (let ((git (string-append (assoc-ref inputs "git") | |
2313 | "/bin/git"))) | |
2314 | (substitute* "git-imerge" | |
2315 | (("'git'") (string-append "'" git "'"))) | |
2316 | #t))) | |
2317 | (add-after 'install 'wrap-script | |
2318 | (lambda* (#:key outputs #:allow-other-keys) | |
2319 | (wrap-program (string-append (assoc-ref outputs "out") | |
2320 | "/bin/git-imerge") | |
2321 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) | |
2322 | #t))))) | |
2323 | (inputs | |
2324 | `(("git" ,git) | |
2325 | ("python" ,python-wrapper))) | |
2326 | (home-page "https://github.com/mhagger/git-imerge") | |
2327 | (synopsis "Incremental merge for Git") | |
2328 | (description "This Git extension defines a subcommand, @code{imerge}, | |
2329 | which performs an incremental merge between two branches. Its two primary | |
2330 | design goals are to reduce the pain of resolving merge conflicts by finding | |
2331 | the smallest possible conflicts and to allow a merge to be saved, tested, | |
2332 | interrupted, published, and collaborated on while in progress.") | |
2333 | (license license:gpl2+))) | |
a3e6cf98 KK |
2334 | |
2335 | (define-public git-lfs | |
2336 | (package | |
2337 | (name "git-lfs") | |
e75f87b5 | 2338 | (version "2.7.2") |
a3e6cf98 KK |
2339 | (source (origin |
2340 | (method git-fetch) | |
2341 | (uri (git-reference | |
2342 | (url "https://github.com/git-lfs/git-lfs") | |
2343 | (commit (string-append "v" version)))) | |
2344 | (file-name (git-file-name name version)) | |
2345 | (sha256 | |
2346 | (base32 | |
e75f87b5 | 2347 | "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc")))) |
a3e6cf98 KK |
2348 | (build-system go-build-system) |
2349 | (arguments | |
2350 | '(#:import-path "github.com/git-lfs/git-lfs")) | |
2351 | (home-page "https://git-lfs.github.com/") | |
2352 | (synopsis "Git extension for versioning large files") | |
2353 | (description | |
2354 | "Git Large File Storage (LFS) replaces large files such as audio samples, | |
2355 | videos, datasets, and graphics with text pointers inside Git, while storing the | |
2356 | file contents on a remote server.") | |
2357 | (license license:expat))) |