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