projects/guix·blob java-team · refs

5398 lines · 225.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013 Cyril Roelandt <[email protected]>
4;;; Copyright © 2013-2022, 2024-2026 Ludovic Courtès <[email protected]>
5;;; Copyright © 2013, 2014 Andreas Enge <[email protected]>
6;;; Copyright © 2015, 2016 Mathieu Lirzin <[email protected]>
7;;; Copyright © 2014, 2015, 2016 Mark H Weaver <[email protected]>
8;;; Copyright © 2014, 2016, 2019, 2021 Eric Bavier <[email protected]>
9;;; Copyright © 2015-2026 Flashner <[email protected]>
10;;; Copyright © 2015, 2018, 2020, 2021, 2022 Kyle Meyer <[email protected]>
11;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2016, 2017 Leo Famulari <[email protected]>
13;;; Copyright © 2016, 2017, 2018 Nikita <[email protected]>
14;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <[email protected]>
15;;; Copyright © 2017 Vasile Dumitrascu <[email protected]>
16;;; Copyright © 2017 Clément Lassieur <[email protected]>
17;;; Copyright © 2017, 2020 EuAndreh <[email protected]>
18;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke <[email protected]>
19;;; Copyright © 2017 Stefan Reichör <[email protected]>
20;;; Copyright © 2017, 2020, 2024 Oleg Pykhalov <[email protected]>
21;;; Copyright © 2018 Sou Bunnbu <[email protected]>
22;;; Copyright © 2018 Christopher Baines <[email protected]>
23;;; Copyright © 2018 Timothy Sample <[email protected]>
24;;; Copyright © 2018, 2025 Arun Isaac <[email protected]>
25;;; Copyright © 2019 Jovany Leandro G.C <[email protected]>
26;;; Copyright © 2019 Kei Kebreau <[email protected]>
27;;; Copyright © 2019, 2020 Alex Griffin <[email protected]>
28;;; Copyright © 2020 Roel Janssen <[email protected]>
29;;; Copyright © 2020, 2021 Brice Waegeneire <[email protected]>
30;;; Copyright © 2020 John D. Boy <[email protected]>
31;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <[email protected]>
32;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <[email protected]>
33;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
34;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
35;;; Copyright © 2021 Greg Hogan <[email protected]>
36;;; Copyright © 2021, 2022, 2023, 2024 Maxim Cournoyer <[email protected]>
37;;; Copyright © 2021 Chris Marusich <[email protected]>
38;;; Copyright © 2021 Léo Le Bouter <[email protected]>
39;;; Copyright © 2021 LibreMiami <[email protected]>
40;;; Copyright © 2021 Xinglu Chen <[email protected]>
41;;; Copyright © 2021 François J. <[email protected]>
42;;; Copyright © 2021 Julien Lepiller <[email protected]>
43;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
44;;; Copyright © 2021, 2024 jgart <[email protected]>
45;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
46;;; Copyright © 2022 Jai Vetrivelan <[email protected]>
47;;; Copyright © 2022 Maxime Devos <[email protected]>
48;;; Copyright © 2022 Dhruvin Gandhi <[email protected]>
49;;; Copyright © 2015, 2022 David Thompson <[email protected]>
50;;; Copyright © 2023, 2025 Nicolas Graves <[email protected]>
51;;; Copyright © 2023 Bruno Victal <[email protected]>
52;;; Copyright © 2023 Kjartan Oli Agustsson <[email protected]>
53;;; Copyright © 2023 Steve George <[email protected]>
54;;; Copyright © 2023 Josselin Poiret <[email protected]>
55;;; Copyright © 2024 Hilton Chain <[email protected]>
56;;; Copyright © 2023, 2024, 2026 Zheng Junjie <[email protected]>
57;;; Copyright © 2023 Ryan Desfosses <[email protected]>
58;;; Copyright © 2024 Suhail Singh <[email protected]>
59;;; Copyright © 2024 Simon Tournier <[email protected]>
60;;; Copyright © 2024 Javier Olaechea <[email protected]>
61;;; Copyright © 2024-2026 Ashish SHUKLA <[email protected]>
62;;; Copyright © 2024 Wilko Meyer <[email protected]>
63;;; Copyright © 2024 Herman Rimm <[email protected]>
64;;; Copyright © 2024, 2026 Sharlatan Hellseher <[email protected]>
65;;; Copyright © 2025 Artyom V. Poptsov <[email protected]>
66;;; Copyright © 2025 Dariqq <[email protected]>
67;;; Copyright © 2025 Tomas Volf <[email protected]>
68;;; Copyright © 2025 Matthew Elwin <[email protected]>
69;;; Copyright © 2025 Roman Scherer <[email protected]>
70;;; Copyright © 2026 Ingar <[email protected]>
71;;; Copyright © 2026 Nguyễn Gia Phong <[email protected]>
72;;; Copyright © 2026 Luca Kredel <[email protected]>
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages version-control)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (guix utils)
92 #:use-module (guix packages)
93 #:use-module (guix deprecation)
94 #:use-module (guix gexp)
95 #:use-module (guix download)
96 #:use-module (guix fossil-download)
97 #:use-module (guix git-download)
98 #:use-module (guix hg-download)
99 #:use-module (guix build-system cargo)
100 #:use-module (guix build-system cmake)
101 #:use-module (guix build-system copy)
102 #:use-module (guix build-system emacs)
103 #:use-module (guix build-system gnu)
104 #:use-module (guix build-system go)
105 #:use-module (guix build-system perl)
106 #:use-module (guix build-system pyproject)
107 #:use-module (guix build-system qt)
108 #:use-module (guix build-system trivial)
109 #:use-module (gnu packages apr)
110 #:use-module (gnu packages autotools)
111 #:use-module (gnu packages documentation)
112 #:use-module (gnu packages base)
113 #:use-module (gnu packages bash)
114 #:use-module (gnu packages bison)
115 #:use-module (gnu packages boost)
116 #:use-module (gnu packages build-tools)
117 #:use-module (gnu packages check)
118 #:use-module (gnu packages crypto)
119 #:use-module (gnu packages curl)
120 #:use-module (gnu packages databases)
121 #:use-module (gnu packages docbook)
122 #:use-module (gnu packages file)
123 #:use-module (gnu packages compiler-tools)
124 #:use-module (gnu packages freedesktop)
125 #:use-module (gnu packages gawk)
126 #:use-module (gnu packages gettext)
127 #:use-module (gnu packages gcc)
128 #:use-module (gnu packages gl)
129 #:use-module (gnu packages glib)
130 #:use-module (gnu packages gnome)
131 #:use-module (gnu packages gnupg)
132 #:use-module (gnu packages golang)
133 #:use-module (gnu packages golang-build)
134 #:use-module (gnu packages golang-check)
135 #:use-module (gnu packages golang-compression)
136 #:use-module (gnu packages golang-crypto)
137 #:use-module (gnu packages golang-vcs)
138 #:use-module (gnu packages golang-web)
139 #:use-module (gnu packages golang-xyz)
140 #:use-module (gnu packages groff)
141 #:use-module (gnu packages guile)
142 #:use-module (gnu packages guile-xyz)
143 #:use-module (gnu packages image)
144 #:use-module (gnu packages imagemagick)
145 #:use-module (gnu packages less)
146 #:use-module (gnu packages libbsd)
147 #:use-module (gnu packages libevent)
148 #:use-module (gnu packages linux)
149 #:use-module (gnu packages mail)
150 #:use-module (gnu packages man)
151 #:use-module (gnu packages maths)
152 #:use-module (gnu packages ncurses)
153 #:use-module (gnu packages ssh)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages patchutils)
156 #:use-module (gnu packages pcre)
157 #:use-module (gnu packages perl)
158 #:use-module (gnu packages perl-check)
159 #:use-module (gnu packages php)
160 #:use-module (gnu packages pkg-config)
161 #:use-module (gnu packages prometheus)
162 #:use-module (gnu packages python)
163 #:use-module (gnu packages python-build)
164 #:use-module (gnu packages python-check)
165 #:use-module (gnu packages python-crypto)
166 #:use-module (gnu packages python-web)
167 #:use-module (gnu packages python-xyz)
168 #:use-module (gnu packages readline)
169 #:use-module (gnu packages rsync)
170 #:use-module (gnu packages ruby-xyz)
171 #:use-module (gnu packages sqlite)
172 #:use-module (gnu packages texinfo)
173 #:use-module (gnu packages text-editors)
174 #:use-module (gnu packages admin)
175 #:use-module (gnu packages xml)
176 #:use-module (gnu packages emacs)
177 #:use-module (gnu packages compression)
178 #:use-module (gnu packages qt)
179 #:use-module (gnu packages rust)
180 #:use-module (gnu packages sdl)
181 #:use-module (gnu packages swig)
182 #:use-module (gnu packages sync)
183 #:use-module (gnu packages tcl)
184 #:use-module (gnu packages textutils)
185 #:use-module (gnu packages time)
186 #:use-module (gnu packages tls)
187 #:use-module (gnu packages tor)
188 #:use-module (gnu packages)
189 #:use-module (ice-9 match)
190 #:use-module (srfi srfi-1)
191 #:export (make-gitolite))
192
193(define-public breezy
194 (package
195 (name "breezy")
196 (version "3.3.22")
197 (source
198 (origin
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/breezy-team/breezy")
202 (commit (string-append "brz-" version))))
203 (file-name (git-file-name name version))
204 (sha256
205 (base32 "05xrwn8i8djrd2n9bwcas0y3sy51im8klw1w8ykvg3qhcnl4qlcg"))))
206 (build-system pyproject-build-system)
207 (arguments
208 (list
209 #:modules
210 '(((guix build cargo-build-system) #:prefix cargo:)
211 (guix build pyproject-build-system)
212 (guix build utils))
213 #:imported-modules
214 `(,@%cargo-build-system-modules
215 ,@%pyproject-build-system-modules)
216 #:phases
217 #~(modify-phases %standard-phases
218 (add-after 'unpack 'prepare-cargo-build-system
219 (lambda args
220 (for-each
221 (lambda (phase)
222 (format #t "Running cargo phase: ~a~%" phase)
223 (apply (assoc-ref cargo:%standard-phases phase)
224 #:cargo-target #$(cargo-triplet)
225 args))
226 '(unpack-rust-crates
227 configure
228 check-for-pregenerated-files
229 patch-cargo-checksums))))
230 (add-after 'unpack 'patch-test-shebangs
231 (lambda _
232 (substitute* (append (find-files "breezy/bzr/tests")
233 (find-files "breezy/tests"))
234 (("#!/bin/sh")
235 (format #f "#!~a" (which "sh"))))))
236 (add-after 'build 'build-man
237 (lambda _
238 (invoke "python3" "tools/generate_docs.py" "man")))
239 (add-after 'install 'install-man
240 (lambda _
241 (let ((man1 (string-append #$output "/share/man/man1")))
242 (install-file "brz.1" man1)
243 (install-file "breezy/git/git-remote-bzr.1" man1))))
244 (add-after 'install 'install-completion
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let* ((bash (string-append #$output
247 "/share/bash-completion/completions")))
248 (install-file "contrib/bash/brz" bash))))
249 (add-after 'install-man 'bzr-compat
250 (lambda _
251 (let ((bin (string-append #$output "/bin"))
252 (man1 (string-append #$output "/share/man/man1")))
253 (symlink (in-vicinity bin "brz")
254 (in-vicinity bin "bzr"))
255 (call-with-output-file (string-append man1 "/bzr.1")
256 (lambda (port)
257 (format port ".so man1/brz.1"))))))
258 ;; tests: passed 33237 tests, 4393 tests skipped
259 (replace 'check
260 (lambda* (#:key tests? #:allow-other-keys)
261 (when tests?
262 (setenv "BZR_EDITOR" "nano")
263 (invoke "brz" "selftest" "--verbose" "--parallel=fork"
264 ;; This test hangs
265 "-x" "breezy.tests.blackbox.test_serve"
266 ;; No GnuPG key results for pattern: [email protected]
267 "-x" "breezy.tests.test_gpg"
268 ;; compgen: command not found
269 "-x" "bash_completion"
270 ;; No such file or directory: '/etc/mtab'
271 "-x" "breezy.tests.blackbox.test_diff.TestExternalDiff.test_external_diff"
272 ;; Value "/etc/ssl/certs/ca-certificates.crt" is not valid for "ssl.ca_certs"
273 "-x" "breezy.tests.test_https_urllib.CaCertsConfigTests.test_default_exists"
274 ;; Unknown Failure
275 "-x" "breezy.tests.test_plugins.TestLoadPluginAt.test_compiled_loaded"
276 "-x" "breezy.tests.test_plugins.TestPlugins.test_plugin_get_path_pyc_only"
277 "-x" "breezy.tests.test_selftest.TestActuallyStartBzrSubprocess.test_start_and_stop_bzr_subprocess_send_signal"
278 ;; AttributeError: module 'paramiko' has no attribute 'DSSKey'
279 "-x" "breezy.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh"
280 ;; Network access is required
281 "-x" "breezy.git.tests.test_server.TestPlainFetch.test_fetch_from_native_git"
282 "-x" "breezy.git.tests.test_server.TestPlainFetch.test_fetch_from_non_git"
283 "-x" "breezy.git.tests.test_server.TestPlainFetch.test_fetch_nothin")))))))
284 (native-inputs
285 (append
286 (list gettext-minimal
287 python-cython
288 python-setuptools
289 python-setuptools-gettext
290 python-setuptools-rust
291 python-tomli
292 rust
293 `(,rust "cargo")
294 ;; tests
295 nano
296 python-testtools
297 python-packaging
298 python-subunit)
299 (or (and=> (%current-target-system)
300 (compose list make-rust-sysroot))
301 '())))
302 (inputs (cons* python-catalogus
303 python-configobj
304 python-dulwich
305 python-fastbencode
306 python-merge3
307 python-patiencediff
308 python-pyyaml
309 python-urllib3
310 python-vcsgraph
311 ;; [optional]
312 python-fastimport
313 python-gpg
314 python-launchpadlib
315 python-paramiko
316 python-pygithub
317 python-subunit
318
319 (cargo-inputs 'breezy)))
320 (home-page "https://www.breezy-vcs.org/")
321 (synopsis "Decentralized revision control system")
322 (description
323 "Breezy (@command{brz}) is a decentralized revision control system. By
324default, Breezy provides support for both the
325@uref{https://bazaar.canonical.com/, Bazaar} and @uref{https://www.git-scm.com,
326Git} file formats. Breezy is backwards compatible with Bazaar's disk format
327and protocols. One of the key differences with Bazaar is that Breezy runs on
328Python 3.3 and later, rather than on Python 2.")
329 (license license:gpl2+)))
330
331(define-public python-vcsgraph
332 (package
333 (name "python-vcsgraph")
334 (version "0.3.2")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "https://github.com/breezy-team/vcsgraph")
340 (commit (string-append "v" version))))
341 (file-name (git-file-name name version))
342 (sha256
343 (base32 "15hxlvvz2s21rpgk6nvlhzv9lb8glicjfsgx5vvcaqrh2y0qdr05"))))
344 (build-system pyproject-build-system)
345 (arguments
346 (list
347 #:imported-modules (append %cargo-build-system-modules
348 %pyproject-build-system-modules)
349 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
350 (guix build pyproject-build-system)
351 (guix build utils))
352 #:test-flags #~(list "--pyargs" "vcsgraph")
353 #:phases
354 #~(modify-phases %standard-phases
355 (add-after 'unpack 'prepare-cargo-build-system
356 (lambda args
357 (for-each (lambda (phase)
358 (format #t "Running cargo phase: ~a~%" phase)
359 (apply (assoc-ref cargo:%standard-phases phase)
360 #:cargo-target #$(cargo-triplet)
361 args))
362 '(prepare-rust-crates
363 unpack-rust-crates
364 configure
365 check-for-pregenerated-files
366 patch-cargo-checksums))))
367 (add-before 'check 'remove-local-source
368 (lambda _
369 (delete-file-recursively "vcsgraph"))))))
370 (native-inputs
371 (append (list python-pytest
372 python-setuptools
373 python-setuptools-rust
374 rust
375 (list rust "cargo"))
376 (or (and=> (%current-target-system)
377 (compose list make-rust-sysroot))
378 '())))
379 (inputs (cargo-inputs 'python-vcsgraph))
380 (home-page "https://github.com/breezy-team/vcsgraph")
381 (synopsis "Graph algorithms for version control systems")
382 (description
383 "This package provides a Python library providing graph algorithms
384optimized for version control systems.")
385 (license license:gpl2+)))
386
387(define git-cross-configure-flags
388 #~(list "ac_cv_fread_reads_directories=yes"
389 "ac_cv_snprintf_returns_bogus=no"
390 "ac_cv_iconv_omits_bom=no"))
391
392;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
393;; Its test suite runs slightly faster and most importantly it doesn't
394;; depend on packages that are expensive to build such as Subversion.
395(define-public git-minimal/pinned
396 (package
397 (name "git-minimal")
398 (version "2.54.0")
399 (source (origin
400 (method url-fetch)
401 (uri (string-append "mirror://kernel.org/software/scm/git/git-"
402 version ".tar.xz"))
403 (sha256
404 (base32
405 "18w18qay032ir85d5fzd6iz0bsrihzsdpa4sz2gff3f1chiid2gn"))))
406 (build-system gnu-build-system)
407 (arguments
408 (list
409 #:modules `((srfi srfi-1)
410 (srfi srfi-26)
411 (ice-9 format)
412 (ice-9 textual-ports)
413 ((guix build gnu-build-system) #:prefix gnu:)
414 ,@%default-gnu-modules)
415 ;; Make sure the full bash does not end up in the final closure.
416 #:disallowed-references (list (this-package-native-input "bash")
417 (this-package-native-input "perl"))
418 #:test-target "test"
419 #:configure-flags
420 #~(cons "--with-gitconfig=/etc/gitconfig"
421 #$(if (%current-target-system) git-cross-configure-flags #~(list)))
422 #:make-flags
423 #~(list "V=1" ;more verbose compilation
424 (string-append "SHELL_PATH="
425 #+(this-package-native-input "bash-minimal")
426 "/bin/sh")
427
428 ;; Tests require a bash with completion support.
429 (string-append "TEST_SHELL_PATH="
430 #+(this-package-native-input "bash")
431 "/bin/bash")
432
433 ;; By default 'make install' creates hard links for
434 ;; things in 'libexec/git-core', which leads to huge
435 ;; nars; see <https://bugs.gnu.org/21949>.
436 "NO_INSTALL_HARDLINKS=indeed")
437 #:phases
438 #~(modify-phases %standard-phases
439 #$@(if (%current-target-system)
440 ;; The git build system assumes build == host
441 #~((add-after 'unpack 'use-host-uname_S
442 (lambda _
443 (substitute* "config.mak.uname"
444 (("uname_S := .*" all)
445 (if #$(target-hurd?)
446 "uname_S := GNU\n"
447 all))))))
448 ;; We do not have a full bash when cross-compiling.
449 #~((add-after 'unpack 'modify-PATH
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((path (string-split (getenv "PATH") #\:))
452 (bash-full #$(this-package-native-input "bash")))
453 ;; Drop the test bash from PATH so that (which "sh")
454 ;; and similar does the right thing.
455 (setenv "PATH"
456 (string-join
457 (remove (cut string-prefix? bash-full <>)
458 path)
459 ":")))))))
460 #$@(if (system-hurd?)
461 #~((add-after 'unpack 'delete-tests/hurd
462 (lambda _
463 (delete-file "t/t0052-simple-ipc.sh")
464 (delete-file "t/t5562-http-backend-content-length.sh")
465 (delete-file "t/t9902-completion.sh"))))
466 #~())
467 ;; Add cross curl-config script to PATH when cross-compiling.
468 #$@(if (%current-target-system)
469 #~((add-before 'configure 'add-cross-curl-config
470 (lambda* (#:key inputs #:allow-other-keys)
471 (setenv "PATH"
472 (string-append
473 (dirname (search-input-file
474 inputs "bin/curl-config"))
475 ":" (getenv "PATH"))))))
476 #~())
477 (add-after 'unpack 'patch-commands
478 (lambda* (#:key inputs #:allow-other-keys)
479 (define (prepend-string-to-file text file)
480 "Prepend TEXT to FILE."
481 (let ((content (call-with-input-file file
482 (cut get-string-all <>))))
483 (call-with-output-file file
484 (lambda (port)
485 (display text port)
486 (display content port)))))
487
488 (define PATH-variable-definition
489 (format #f "PATH=~{~a~^:~}${PATH:+:}$PATH~%~%"
490 (map (compose dirname (cut search-input-file inputs <>))
491 '("bin/basename"
492 "bin/sed"))))
493
494 ;; Ensure that coreutils (for basename) and sed are on PATH
495 ;; for any script that sources the 'git-sh-setup.sh' file.
496 (prepend-string-to-file PATH-variable-definition
497 "git-sh-setup.sh")
498
499 ;; Avoid depending on util-linux; it's only used to detect
500 ;; whether the system is MinGW, which we can detect at build
501 ;; time.
502 (substitute* "git-sh-setup.sh"
503 (("\\$\\(uname -s)")
504 (if #$(target-mingw?)
505 "MINGW"
506 "GNU"))) ;matched against '*'
507
508 ;; git-submodule sources 'git-sh-setup.sh', but not before
509 ;; invoking the basename and sed commands... patch them to their
510 ;; absolute location.
511 (substitute* "git-submodule.sh"
512 (("\\$\\(basename")
513 (string-append "$(" (search-input-file inputs "bin/basename")))
514 (("sed -e")
515 (string-append (search-input-file inputs "bin/sed") " -e")))
516
517 ;; git-send-email invokes the editor via 'sh'; patch it.
518 (substitute* "git-send-email.perl"
519 (("'sh'")
520 (format #f "'~a'" (search-input-file inputs "bin/sh"))))))
521 (add-after 'configure 'patch-makefiles
522 (lambda _
523 (substitute* "Makefile"
524 (("/usr/bin/perl") (which "perl")))))
525 (add-after 'configure 'add-PM.stamp
526 (lambda _
527 ;; Add the "PM.stamp" to avoid "no rule to make target".
528 (call-with-output-file "perl/PM.stamp" (const #t))))
529 (add-before 'check 'patch-tests
530 (lambda _
531 (let ((store-directory (%store-directory)))
532 ;; These files contain some funny bytes that Guile is unable
533 ;; to decode for shebang patching. Just delete them.
534 (for-each delete-file '("t/t4201-shortlog.sh"
535 "t/t7813-grep-icase-iso.sh"))
536 ;; Many tests contain inline shell scripts (hooks etc).
537 (substitute* (find-files "t" "\\.sh$")
538 (("#!/bin/sh") (string-append "#!" (which "sh"))))
539 ;; Un-do shebang patching here to prevent checksum mismatch.
540 (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
541 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
542 (substitute* "t/t5003-archive-zip.sh"
543 (("cp /bin/sh") (string-append "cp " (which "sh"))))
544 (substitute* "t/t6030-bisect-porcelain.sh"
545 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
546 ;; FIXME: This test runs `git commit` with a bogus EDITOR
547 ;; and empty commit message, but does not fail the way it's
548 ;; expected to. The test passes when invoked interactively.
549 (substitute* "t/t7508-status.sh"
550 (("\tcommit_template_commented") "\ttrue"))
551 ;; More checksum mismatches due to odd shebangs.
552 (substitute* "t/t9100-git-svn-basic.sh"
553 (((string-append "\"#!" store-directory ".*/bin/sh"))
554 "\"#!/bin/sh") )
555 (substitute* "t/t9300-fast-import.sh"
556 (((string-append "\t#!" store-directory ".*/bin/sh"))
557 "\t#!/bin/sh")
558 (((string-append "'#!" store-directory ".*/bin/sh"))
559 "'#!/bin/sh"))
560 ;; FIXME: Some hooks fail with "basename: command not found".
561 ;; See 't/trash directory.t9164.../svn-hook.log'.
562 (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
563
564 ;; XXX: These tests fail intermittently for unknown reasons:
565 ;; <https://bugs.gnu.org/29546>.
566 (for-each delete-file
567 '("t/t9128-git-svn-cmd-branch.sh"
568 "t/t9167-git-svn-cmd-branch-subproject.sh"
569 "t/t9141-git-svn-multiple-branches.sh"))
570
571 #$@(if (version>=? (package-version this-package)
572 "2.48.0")
573 ;; Purge the purged tests in meson.build
574 #~((substitute
575 "t/meson.build"
576 (list (cons "^(.+')(t[^']+[.]sh)('.*)$"
577 (lambda (line matches)
578 (let* ((match-offset (vector-ref (car matches) 3))
579 (test-file (string-append "t/"
580 (substring line
581 (car match-offset)
582 (cdr match-offset)))))
583 (if (file-exists? test-file)
584 line
585 "")))))))
586 #~()))))
587 (add-after 'install 'install-shell-completion
588 (lambda _
589 (let ((bash (string-append #$output "/etc/bash_completion.d"))
590 (zsh (string-append #$output "/share/zsh/site-functions")))
591 ;; TODO: Install the tcsh completions in the right place.
592 (for-each mkdir-p (list bash zsh))
593 (copy-file "contrib/completion/git-completion.bash"
594 (string-append bash "/git"))
595 (copy-file "contrib/completion/git-completion.bash"
596 (string-append zsh "/git-completion.bash"))
597 (copy-file "contrib/completion/git-prompt.sh"
598 (string-append #$output "/bin/git-prompt"))
599 (copy-file "contrib/completion/git-completion.zsh"
600 (string-append zsh "/_git")))))
601 (add-after 'install 'remove-unusable-perl-commands
602 (lambda _
603 (let ((bin (string-append #$output "/bin"))
604 (libexec (string-append #$output "/libexec")))
605 (for-each (lambda (file)
606 (delete-file (string-append libexec
607 "/git-core/" file)))
608 '("git-svn" "git-cvsimport" "git-archimport"
609 "git-cvsserver" "git-request-pull"
610
611 ;; git-add--interactive was removed in Git 2.40 but
612 ;; this phase is inherited by older versions.
613 #$@(if (version>=? (package-version this-package)
614 "2.40.1")
615 #~()
616 #~("git-add--interactive"))
617
618 "git-cvsexportcommit"
619 "git-instaweb" "git-send-email"))
620 (delete-file (string-append bin "/git-cvsserver"))
621
622 ;; These templates typically depend on Perl. Remove them.
623 (delete-file-recursively
624 (string-append #$output "/share/git-core/templates/hooks"))
625
626 ;; Gitweb depends on Perl as well.
627 (delete-file-recursively
628 (string-append #$output "/share/gitweb")))))
629 (add-after 'install 'restore-sample-hooks-shebang
630 (lambda _
631 (let* ((dir (string-append #$output
632 "/share/git-core/templates/hooks")))
633 (for-each (lambda (file)
634 (format #t "restoring shebang on `~a'~%" file)
635 (substitute* file
636 (("^#!.*/bin/sh") "#!/bin/sh")))
637 (find-files dir ".*"))))))))
638 (native-inputs
639 ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
640 ;; see <https://bugs.gnu.org/39513>.
641 (list bash-minimal
642 bash
643 gettext-minimal
644 perl))
645 (inputs
646 (list bash-minimal
647 coreutils-minimal
648 curl ;for HTTP(S) access
649 expat ;for 'git push' over HTTP(S)
650 openssl
651 perl
652 sed
653 zlib))
654 (native-search-paths
655 ;; For HTTPS access, Git needs a single-file certificate bundle, specified
656 ;; with $GIT_SSL_CAINFO.
657 (list (search-path-specification
658 (variable "GIT_SSL_CAINFO")
659 (file-type 'regular)
660 (separator #f) ;single entry
661 (files '("etc/ssl/certs/ca-certificates.crt")))
662 (search-path-specification
663 (variable "GIT_EXEC_PATH")
664 (separator #f) ;single entry
665 (files '("libexec/git-core")))))
666 (synopsis "Distributed version control system")
667 (description
668 "Git is a free distributed version control system designed to handle
669everything from small to very large projects with speed and efficiency.")
670 (properties '((hidden? . #t) ;pinned variant for Graphene/GTK+
671 (lint-hidden-cpe-vendors . ("jenkins"))
672 (upstream-name . "git")))
673 (license license:gpl2)
674 (home-page "https://git-scm.com/")))
675
676(define-public git-minimal
677 (package
678 (inherit git-minimal/pinned)
679 (properties (alist-delete 'hidden?
680 (package-properties git-minimal/pinned)))))
681
682(define-public git
683 (package/inherit git-minimal
684 (name "git")
685 (outputs '("out" ;the core
686 "send-email" ;for git-send-email
687 "svn" ;git-svn
688 "credential-netrc" ;git-credential-netrc
689 "credential-libsecret" ;git-credential-libsecret
690 "subtree" ;git-subtree
691 "gui")) ;gitk, git gui
692 (arguments
693 (substitute-keyword-arguments arguments
694 ((#:disallowed-references disallowed-refs ''())
695 (list (this-package-native-input "bash")))
696 ((#:make-flags flags #~'())
697 #~(cons "USE_LIBPCRE2=yes" #$flags))
698 ((#:configure-flags flags #~'())
699 ;; The explicit --with-tcltk forces the build system to hardcode the
700 ;; absolute file name to 'wish'.
701 #~(cons (string-append "--with-tcltk="
702 (search-input-file %build-inputs
703 "bin/wish8.6"))
704 #$flags))
705 ((#:phases phases '%standard-phases)
706 #~(modify-phases #$phases
707 (delete 'remove-unusable-perl-commands)
708 (replace 'patch-makefiles
709 (lambda _
710 (substitute* (find-files "." "Makefile")
711 (("/bin/sh") (which "sh"))
712 (("/usr/bin/perl") (which "perl"))
713 (("/usr/bin/python") (which "python3")))))
714 (add-after 'build 'build-subtree
715 (lambda* (#:key native-inputs inputs #:allow-other-keys)
716 (invoke "make" "-C" "Documentation" "asciidoc.conf")
717 (with-directory-excursion "contrib/subtree"
718 (invoke "make")
719 (invoke "make" "install")
720 (invoke "make" "install-doc")
721 (substitute* "git-subtree"
722 (("/bin/sh") (which "sh"))))))
723 (add-after 'install 'install-doc
724 (lambda* (#:key parallel-build? #:allow-other-keys)
725 (define job-count (if parallel-build?
726 (number->string (parallel-job-count))
727 "1"))
728 (invoke "make" "-C" "Documentation"
729 "install-info" "install-man"
730 "-j" job-count
731 ;; The Makefile refer to 'docbook2x-texi', but our
732 ;; binary is named 'docbook2texi'.
733 "DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl")))
734 (add-after 'install 'install-credential-netrc
735 (lambda _
736 (install-file
737 "contrib/credential/netrc/git-credential-netrc.perl"
738 (string-append #$output:credential-netrc "/bin"))
739 (rename-file (string-append #$output:credential-netrc
740 "/bin/git-credential-netrc.perl")
741 (string-append #$output:credential-netrc
742 "/bin/git-credential-netrc"))
743 ;; Previously, Git.pm was automatically found by netrc.
744 ;; Perl 5.26 changed how it locates modules so that @INC no
745 ;; longer includes the current working directory (the Perl
746 ;; community calls this "dotless @INC").
747 (wrap-program (string-append #$output:credential-netrc
748 "/bin/git-credential-netrc")
749 `("PERL5LIB" ":" prefix
750 (,(string-append #$output "/share/perl5"))))))
751 (add-after 'install 'install-credential-libsecret
752 (lambda _
753 (with-directory-excursion "contrib/credential/libsecret"
754 ((assoc-ref gnu:%standard-phases 'build))
755 (install-file "git-credential-libsecret"
756 (string-append #$output:credential-libsecret
757 "/bin")))))
758 (add-after 'install 'install-subtree
759 (lambda _
760 (install-file "contrib/subtree/git-subtree"
761 (string-append #$output:subtree "/bin"))
762 (install-file "contrib/subtree/git-subtree.1"
763 (string-append #$output:subtree
764 "/share/man/man1"))))
765 (add-after 'install 'split
766 (lambda* (#:key inputs #:allow-other-keys)
767 ;; Split the binaries to the various outputs.
768 (let* ((out #$output)
769 (se #$output:send-email)
770 (svn #$output:svn)
771 (gui #$output:gui)
772 (gitk (string-append out "/bin/gitk"))
773 (gitk* (string-append gui "/bin/gitk"))
774 (git-gui (string-append
775 out "/libexec/git-core/git-gui"))
776 (git-gui* (string-append
777 gui "/libexec/git-core/git-gui"))
778 (git-cit (string-append
779 out "/libexec/git-core/git-citool"))
780 (git-cit* (string-append
781 gui "/libexec/git-core/git-citool"))
782 (git-se (string-append
783 out "/libexec/git-core/git-send-email"))
784 (git-se* (string-append
785 se "/libexec/git-core/git-send-email"))
786 (git-svn (string-append
787 out "/libexec/git-core/git-svn"))
788 (git-svn* (string-append
789 svn "/libexec/git-core/git-svn"))
790 (git-sm (string-append
791 out "/libexec/git-core/git-submodule")))
792 (mkdir-p (string-append gui "/bin"))
793 (mkdir-p (string-append gui "/libexec/git-core"))
794 (mkdir-p (string-append se "/libexec/git-core"))
795 (mkdir-p (string-append svn "/libexec/git-core"))
796
797 (for-each (lambda (old new)
798 (copy-file old new)
799 (delete-file old)
800 (chmod new #o555))
801 (list gitk git-gui git-cit git-se git-svn)
802 (list gitk* git-gui* git-cit* git-se* git-svn*))
803
804 ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
805
806 ;; FIXME: Old school 'assoc-ref' is used to retrieve
807 ;; subversion here, as #$(this-package-input "subversion")
808 ;; causes a dependency cycle for unknown reasons.
809 (wrap-program git-svn*
810 `("PATH" ":" prefix
811 (,(dirname (search-input-file inputs "bin/perl"))))
812 `("PERL5LIB" ":" prefix
813 ,(search-path-as-list
814 '("lib/perl5/site_perl")
815 (list (assoc-ref inputs "subversion")
816 #$(this-package-input "perl-term-readkey"))))
817
818 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
819 ;; help it find 'libsvn_client-1.so'.
820 `("LD_LIBRARY_PATH" ":" prefix
821 (,(string-append (assoc-ref inputs "subversion")
822 "/lib"))))
823
824 ;; Tell 'git-send-email' where perl modules are.
825 (wrap-program git-se*
826 `("PERL5LIB" ":" prefix
827 ,(search-path-as-list
828 '("lib/perl5/site_perl")
829 '#$(delete-duplicates
830 (let ((perl-inputs
831 (list (this-package-input "perl-authen-sasl")
832 (this-package-input "perl-net-smtp-ssl")
833 (this-package-input "perl-io-socket-ssl"))))
834 (append perl-inputs
835 (map last
836 (append-map
837 package-transitive-propagated-inputs
838 perl-inputs))))))))
839
840 ;; Tell 'gitweb.cgi' where perl modules are.
841 (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
842 `("PERL5LIB" ":" prefix
843 ,(search-path-as-list
844 '("lib/perl5/site_perl")
845 '#$(delete-duplicates
846 (let ((perl-inputs (list (this-package-input
847 "perl-cgi"))))
848 (append perl-inputs
849 (map last
850 (append-map
851 package-transitive-propagated-inputs
852 perl-inputs)))))))))))))))
853 (native-inputs
854 (modify-inputs native-inputs
855 ;; For documentation.
856 (append asciidoc
857 docbook2x
858 docbook-xml-4.5
859 docbook-xsl
860 libxslt
861 pkg-config
862 texinfo
863 xmlto)))
864 (inputs
865 (modify-inputs inputs
866 (append bash-minimal ;for wrap-program
867 python ;for git-p4
868
869 ;; For PCRE support in git grep (USE_LIBPCRE2).
870 pcre2
871
872 ;; For 'gitweb.cgi'.
873 perl-cgi
874
875 ;; For 'git-svn'.
876 subversion
877 perl-term-readkey
878
879 ;; For 'git-send-email'.
880 perl-authen-sasl
881 perl-net-smtp-ssl
882 perl-io-socket-ssl
883
884 ;; For 'git gui', 'gitk', and 'git citool'.
885 tcl
886 tk
887
888 ;; For 'git-credential-libsecret'
889 glib
890 libsecret)))))
891
892;;; The symbol git-minimal/fixed should be used when git-minimal needs fixes
893;;; (security or else) and this deprecation could be removed.
894(define-deprecated/public-alias git-minimal/fixed git-minimal/pinned)
895
896(define-public mergiraf
897 (package
898 (name "mergiraf")
899 (version "0.16.3")
900 (source
901 (origin
902 (method url-fetch)
903 (uri (crate-uri "mergiraf" version))
904 (file-name (string-append name "-" version ".tar.gz"))
905 (sha256
906 (base32 "0b5rsdz1s68kc37rqvjwpgwj2651arigbzgcf7chdspzjc9fkllk"))))
907 (build-system cargo-build-system)
908 (arguments
909 (list #:install-source? #f))
910 ;; for tests
911 (native-inputs (list git-minimal/pinned))
912 (inputs (cargo-inputs 'mergiraf))
913 (home-page "https://mergiraf.org/")
914 (synopsis "Syntax-aware merge driver for Git")
915 (description "This package provides a syntax-aware merge driver for Git.")
916 (license license:gpl3)))
917
918(define-public python-klaus
919 (package
920 (name "python-klaus")
921 (version "3.0.1")
922 (source (origin
923 (method url-fetch)
924 (uri (pypi-uri "klaus" version))
925 (sha256
926 (base32
927 "1w6sl15llnkcg7kmnpn64awdiis061q2gijnhdx0ng7z4p1glapl"))
928 (patches
929 (search-patches "python-klaus-support-python-3.12.patch"))))
930 (build-system pyproject-build-system)
931 (arguments
932 (list
933 #:tests? #f ; TODO: https://github.com/jonashaag/klaus/issues/322
934 #:phases
935 #~(modify-phases %standard-phases
936 (add-after 'unpack 'configure-git
937 (lambda* (#:key inputs #:allow-other-keys)
938 (for-each (lambda (file)
939 (substitute* file
940 (("\"git\"")
941 (string-append "\""
942 (search-input-file inputs "/bin/git") "\""))))
943 (list "klaus/ctagsutils.py"
944 "klaus/repo.py"
945 "klaus/utils.py"
946 "tests/test_contrib.py"
947 "tests/test_make_app.py")))))))
948 (inputs (list git-minimal))
949 (native-inputs
950 (list python-pytest python-setuptools python-wheel))
951 (propagated-inputs
952 (list python-dulwich python-flask python-httpauth
953 python-humanize python-pygments python-werkzeug))
954 (home-page "https://github.com/jonashaag/klaus")
955 (synopsis "Simple git web viewer")
956 (description
957"@code{klaus} is a simple, easy-to-set-up git web viewer. It features
958@itemize
959@item Super easy to set up -- no configuration required
960@item Syntax highlighting
961@item Markdown + RestructuredText rendering support
962@item Pull + push support (Git Smart HTTP)
963@item Code navigation using Exuberant ctags
964@end itemize")
965 (license license:isc)))
966
967(define-public git2cl
968 (let ((commit "1d74d4c0d933fc69ed5cec838c73502584dead05"))
969 (package
970 (name "git2cl")
971 (version (string-append "20120919." (string-take commit 7)))
972 (source (origin
973 (method git-fetch)
974 (uri (git-reference
975 (url "https://git.savannah.nongnu.org/git/git2cl.git")
976 (commit commit)))
977 (file-name (git-file-name name version))
978 (sha256
979 (base32
980 "0wnnbm2sjvfj0qrksj89jlnl69miwl0vk3wrrvgvpclgys3na2g1"))))
981 (build-system copy-build-system)
982 (inputs
983 (list perl))
984 (arguments
985 `(#:install-plan '(("git2cl" "bin/git2cl"))))
986 (home-page "https://savannah.nongnu.org/projects/git2cl")
987 (synopsis "Convert Git logs to GNU ChangeLog format")
988 (description "@code{git2cl} is a command line tool for converting Git
989logs to GNU ChangeLog format.")
990 (license license:gpl2+))))
991
992(define-public git-cal
993 (package
994 (name "git-cal")
995 (version "0.9.1")
996 (source (origin
997 (method git-fetch)
998 (uri (git-reference
999 (url "https://github.com/k4rthik/git-cal")
1000 (commit (string-append "v" version))))
1001 (file-name (git-file-name name version))
1002 (sha256
1003 (base32
1004 "08s9sif3qlk5n2dqpzq5yjczggnqlnxldljspjdqgpfydb2dqg3z"))))
1005 (build-system perl-build-system)
1006 (home-page "https://github.com/k4rthik/git-cal/")
1007 (synopsis "GitHub like contributions calendar for terminal")
1008 (description "@code{git-cal} is a script to view commits calendar similar
1009to GitHub contributions calendar.")
1010 (license license:expat)))
1011
1012(define-public git-cliff
1013 (package
1014 (name "git-cliff")
1015 (version "2.12.0")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (crate-uri "git-cliff" version))
1020 (file-name (string-append name "-" version ".tar.gz"))
1021 (sha256
1022 (base32 "1vz1qix1yi6j5lb95q39pdxn4b6nrq8m235kjjh605m2mf0r8wyd"))))
1023 (build-system cargo-build-system)
1024 (arguments
1025 (list
1026 #:install-source? #f
1027 #:imported-modules (append %copy-build-system-modules
1028 %cargo-build-system-modules)
1029 #:modules '((guix build cargo-build-system)
1030 ((guix build copy-build-system) #:prefix copy:)
1031 (guix build utils))
1032 #:phases
1033 #~(modify-phases %standard-phases
1034 (add-after 'install 'install-extras
1035 (lambda args
1036 (mkdir "assets")
1037 (setenv "OUT_DIR" "assets")
1038 (let ((git-cliff-mangen
1039 (if #$(%current-target-system)
1040 (search-input-file native-inputs
1041 "bin/git-cliff-mangen")
1042 (in-vicinity #$output "bin/git-cliff-mangen")))
1043 (git-cliff-completions
1044 (if #$(%current-target-system)
1045 (search-input-file native-inputs
1046 "bin/git-cliff-completions")
1047 (in-vicinity #$output "bin/git-cliff-completions"))))
1048 (invoke git-cliff-mangen)
1049 (invoke git-cliff-completions))
1050 ;; Then delete the extra binaries.
1051 (delete-file (string-append #$output "/bin/git-cliff-mangen"))
1052 (delete-file (string-append #$output "/bin/git-cliff-completions"))
1053 (apply (assoc-ref copy:%standard-phases 'install)
1054 #:install-plan
1055 '(("assets/git-cliff.bash"
1056 "share/bash-completion/completions/git-cliff")
1057 ("assets/git-cliff.elv"
1058 "share//elvish/lib/git-cliff")
1059 ("assets/git-cliff.fish"
1060 "share/fish/vendor_completions.d/")
1061 ("assets/_git-cliff" "share/zsh/site-functions/")
1062 ("assets/git-cliff.1" "share/man/man1/"))
1063 args))))))
1064 (native-inputs
1065 (append (if (%current-target-system)
1066 (list this-package)
1067 '())
1068 (list pkg-config)))
1069 (inputs (cons* libgit2-1.9
1070 zlib
1071 `(,zstd "lib")
1072 (cargo-inputs 'git-cliff)))
1073 (home-page "https://github.com/orhun/git-cliff")
1074 (synopsis "Highly customizable changelog generator")
1075 (description "@command{git-cliff} can generate
1076@url{https://en.wikipedia.org/wiki/Changelog, changelog} files from the
1077@url{https://git-scm.com/, Git} history by utilizing
1078@url{https://git-cliff.org/docs/configuration/git#conventional_commits,
1079conventional commits} as well as regex-powered
1080@url{https://git-cliff.org/docs/configuration/git#commit_parsers,
1081custom parsers}. The @url{https://git-cliff.org/docs/category/templating,
1082changelog template} can be customized with a
1083@url{https://git-cliff.org/docs/configuration, configuration file} to match the
1084desired format.")
1085 (license (list license:expat license:asl2.0))))
1086
1087(define-public git-pages
1088 (package
1089 (name "git-pages")
1090 (version "0.9.1")
1091 (source
1092 (origin
1093 (method git-fetch)
1094 (uri (git-reference
1095 (url "https://codeberg.org/git-pages/git-pages.git")
1096 (commit (string-append "v" version))))
1097 (file-name (git-file-name name version))
1098 (sha256
1099 (base32 "029zas5pfky6qkbw4j9whrlyxd1pa4jfhj9jm8dg6fav292kf973"))))
1100 (build-system go-build-system)
1101 (arguments
1102 (list
1103 #:build-flags
1104 #~(list (string-append "-ldflags=-X main.versionOverride=" #$version))
1105 #:embed-files #~(list "children" "nodes" "text")
1106 #:import-path "codeberg.org/git-pages/git-pages"
1107 #:install-source? #f))
1108 (native-inputs
1109 (list go-codeberg-org-git-pages-go-headers
1110 go-codeberg-org-git-pages-go-slog-syslog
1111 go-github-com-bits-and-blooms-bloom-v3
1112 go-github-com-burntsushi-toml
1113 go-github-com-c2h5oh-datasize
1114 go-github-com-creasty-defaults
1115 go-github-com-fatih-color
1116 go-github-com-go-git-go-billy-v6
1117 go-github-com-go-git-go-git-v6
1118 go-github-com-jpillora-backoff
1119 go-github-com-kankanreno-go-snowflake
1120 go-github-com-kimmachinegun-automemlimit
1121 go-github-com-klauspost-compress
1122 go-github-com-maypok86-otter-v2
1123 go-github-com-minio-minio-go-v7
1124 go-github-com-pquerna-cachecontrol
1125 go-github-com-prometheus-client-golang
1126 go-github-com-samber-slog-multi
1127 go-github-com-stretchr-testify
1128 go-github-com-tj-go-redirects
1129 go-github-com-valyala-fasttemplate
1130 go-golang-org-x-net
1131 go-google-golang-org-protobuf))
1132 (home-page "https://codeberg.org/git-pages/git-pages")
1133 (synopsis "Scalable static site server for Git forges")
1134 (description
1135 "@command{git-pages} is a static site server for use with Git
1136forges (i.e. a @code{GitHub} Pages replacement). It is written with
1137efficiency in mind, scaling horizontally to any number of machines and serving
1138sites up to multiple gigabytes in size, while being equally suitable for small
1139single-user deployments.")
1140 (license license:bsd-0)))
1141
1142(define-public git-pages-cli
1143 (package
1144 (name "git-pages-cli")
1145 (version "1.9.0")
1146 (source
1147 (origin
1148 (method git-fetch)
1149 (uri (git-reference
1150 (url "https://codeberg.org/git-pages/git-pages-cli")
1151 (commit (string-append "v" version))))
1152 (file-name (git-file-name name version))
1153 (sha256
1154 (base32 "1ijkbc9d4jh5hn9lmcb39v0x03nbrf4zgzm0mb0c1p132py8p2mn"))))
1155 (build-system go-build-system)
1156 (arguments
1157 (list
1158 #:install-source? #f
1159 #:import-path "codeberg.org/git-pages/git-pages-cli"))
1160 (native-inputs
1161 (list go-github-com-google-uuid
1162 go-github-com-klauspost-compress
1163 go-github-com-spf13-pflag))
1164 (home-page "https://codeberg.org/git-pages/git-pages-cli")
1165 (synopsis "Command-line tool for publishing a site to a git-pages server")
1166 (description
1167 "@command{git-pages-cli} is a command-line application for publishing
1168sites to @url{https://codeberg.org/git-pages/git-pages, git-pages}.")
1169 (license license:bsd-0)))
1170
1171(define-public git-tools
1172 (package
1173 (name "git-tools")
1174 (version "2025.08")
1175 (source
1176 (origin
1177 (method git-fetch)
1178 (uri (git-reference
1179 (url "https://github.com/MestreLion/git-tools")
1180 (commit (string-append "v" version))))
1181 (file-name (git-file-name name version))
1182 (sha256
1183 (base32 "1djc40yzyrh4xhj1c717j7sqyhgwapz9mvsn9ja4yph3jxx6zs0f"))))
1184 (build-system copy-build-system)
1185 (arguments
1186 `(#:install-plan '(("git-branches-rename" "bin/git-branches-rename")
1187 ("git-clone-subset" "bin/git-clone-subset")
1188 ("git-find-uncommitted-repos"
1189 "bin/git-find-uncommitted-repos")
1190 ("git-rebase-theirs" "bin/git-rebase-theirs")
1191 ("git-restore-mtime" "bin/git-restore-mtime")
1192 ("git-strip-merge" "bin/git-strip-merge")
1193 ("./man1/" "share/man/man1"
1194 #:include-regexp (".*\\.1$")))))
1195 (inputs (list bash-minimal git-minimal python-minimal))
1196 (home-page "https://github.com/MestreLion/git-tools")
1197 (synopsis "Assorted git-related scripts and tools")
1198 (description
1199 "@code{git-tools} is a collection of bash and python scripts.
1200Specifically, it includes the following tools:
1201
1202@itemize
1203@item @code{git-branches-rename}: Batch rename branches with a matching prefix
1204to another prefix
1205@item @code{git-clone-subset}: Clone a subset of a git repository
1206@item @code{git-find-uncommitted-repos}: Recursively list repositories in the
1207given directory(ies) that have uncommitted changes
1208@item @code{git-rebase-theirs}: Resolve rebase conflicts and failed
1209cherry-picks by favoring \"theirs\" version
1210@item @code{git-restore-mtime}: Restore modification time of files based on
1211the date of the most recent commit that modified them
1212@item @code{git-strip-merge}: A git-merge wrapper that deletes files on a
1213\"foreign\" branch before merging
1214@end itemize")
1215 (license license:gpl3+)))
1216
1217(define-public git-spice
1218 (package
1219 (name "git-spice")
1220 (version "0.23.0")
1221 (source
1222 (origin
1223 (method git-fetch)
1224 (uri (git-reference
1225 (url "https://github.com/abhinav/git-spice")
1226 (commit (string-append "v" version))))
1227 (file-name (git-file-name name version))
1228 (sha256
1229 (base32 "1za4rr1jxjhlbbx0gw8wlsfa9dhw4zrpm43fz8scxlbh126wlid7"))))
1230 (build-system go-build-system)
1231 (arguments
1232 (list
1233 #:import-path "go.abhg.dev/gs"
1234 #:install-source? #f
1235 #:build-flags
1236 #~(list (string-append "-ldflags=-X main._version=" #$version))
1237 #:test-flags
1238 #~(list "-skip"
1239 (string-join
1240 ;; XXX: Tests failing with various reasons: requiring
1241 ;; networking config or write access, or outbound access, check
1242 ;; if some of them may be fixed.
1243 (list "TestAuthenticationFlow_PAT"
1244 "TestBuildRESTHandler_GETRequest"
1245 "TestBuildRESTHandler_GenericError"
1246 "TestBuildRESTHandler_HTTPError"
1247 "TestBuildRESTHandler_IntegerPath"
1248 "TestBuildRESTHandler_InvalidIntegerPath"
1249 "TestBuildRESTHandler_PathParameters"
1250 "TestDeviceFlowAuthenticator"
1251 "TestDeviceFlowAuthenticator"
1252 "TestForkWorkflow"
1253 "TestSelectAuthenticator")
1254 "|"))
1255 #:phases
1256 #~(modify-phases %standard-phases
1257 (add-after 'install 'install-shell-completion
1258 (lambda _
1259 (let* ((out #$output)
1260 (share (string-append out "/share"))
1261 (gs (string-append out "/bin/gs"))
1262 (bash-completions-dir
1263 (string-append out "/etc/bash_completion.d/"))
1264 (fish-completions-dir
1265 (string-append share "/fish/vendor_completions.d"))
1266 (zsh-completions-dir
1267 (string-append share "/zsh/site-functions")))
1268 (for-each mkdir-p
1269 (list bash-completions-dir
1270 fish-completions-dir
1271 zsh-completions-dir))
1272 (with-output-to-file
1273 (string-append bash-completions-dir "/gs")
1274 (lambda _ (invoke gs "shell" "completion" "bash")))
1275 (with-output-to-file
1276 (string-append fish-completions-dir "/gs.fish")
1277 (lambda _ (invoke gs "shell" "completion" "fish")))
1278 (with-output-to-file
1279 (string-append zsh-completions-dir "/_gs")
1280 (lambda _ (invoke gs "shell" "completion" "zsh")))))))))
1281 (native-inputs
1282 (list git-minimal/pinned ; for tests in testdata/scripts
1283 go-github-com-alecthomas-kong
1284 go-github-com-buildkite-shellwords
1285 go-github-com-charmbracelet-bubbles
1286 go-github-com-charmbracelet-bubbletea
1287 go-github-com-charmbracelet-lipgloss
1288 go-github-com-cli-browser
1289 go-github-com-creack-pty
1290 go-github-com-dustin-go-humanize
1291 go-github-com-hexops-autogold-v2
1292 go-github-com-mattn-go-isatty
1293 go-github-com-rogpeppe-go-internal-1.14
1294 go-github-com-sahilm-fuzzy
1295 go-github-com-shurcool-githubv4
1296 go-github-com-stretchr-testify
1297 go-github-com-tidwall-gjson
1298 go-github-com-vito-midterm
1299 go-github-com-zalando-go-keyring
1300 go-gitlab-com-gitlab-org-api-client-go
1301 go-go-abhg-dev-container-ring
1302 go-go-abhg-dev-io-ioutil
1303 go-go-abhg-dev-komplete
1304 go-go-abhg-dev-log-silog
1305 go-go-abhg-dev-testing-stub
1306 go-go-uber-org-mock
1307 go-golang-org-x-oauth2
1308 go-gopkg-in-dnaeon-go-vcr-v4
1309 go-gopkg-in-yaml-v3
1310 go-pgregory-net-rapid))
1311 (home-page "https://go.abhg.dev/gs")
1312 (synopsis "Manage stacks of Git branches")
1313 (description
1314 "git-spice (@code{gs}) is a command line tool for stacking Git branches,
1315a collection of branches expecting the trunk has a base branch. It manages
1316and navigates stacks of branches, conveniently modifies and rebases them also
1317provides an integration with GitHub and GitLab.")
1318 (license license:gpl3)))
1319
1320(define-public got
1321 (package
1322 (name "got")
1323 (version "0.128")
1324 (source (origin
1325 (method url-fetch)
1326 (uri
1327 (string-append
1328 "https://gameoftrees.org/releases/portable/got-portable-"
1329 version ".tar.gz"))
1330 (sha256
1331 (base32
1332 "0wjqc6l0vhyzdqiz7jbc6cagv77gm6kf3qglnshxsld1ksrbczjx"))))
1333 (inputs
1334 (list libevent
1335 `(,util-linux "lib")
1336 zlib
1337 libressl
1338 libmd
1339 libbsd
1340 ncurses))
1341 (native-inputs
1342 (list pkg-config perl))
1343 (arguments
1344 `(;; disable runpath validation, courtesy: libbsd's special
1345 ;; treatment of libmd, as it embeds path to libmd.so
1346 #:validate-runpath? #f
1347 ;; default values of GOT_*_PATH_* point to /usr/bin
1348 #:make-flags
1349 '("CFLAGS+=-DGOT_DIAL_PATH_SSH=\\\"ssh\\\""
1350 "CFLAGS+=-DGOT_TAG_PATH_SSH_KEYGEN=\\\"ssh-keygen\\\""
1351 "CFLAGS+=-DGOT_TAG_PATH_SIGNIFY=\\\"signify\\\"")
1352 #:phases ,#~(modify-phases %standard-phases
1353 (add-after 'unpack 'patch-execv-to-execvp
1354 (lambda _
1355 ;; got sources has paths hardcoded to /usr/bin
1356 (substitute* "lib/dial.c"
1357 (("execv\\(GOT_DIAL_") "execvp(GOT_DIAL_")
1358 (("execv %s\", GOT_DIAL") "execvp %s\", GOT_DIAL"))
1359 (substitute* "lib/sigs.c"
1360 (("execv\\(GOT_TAG") "execvp(GOT_TAG")
1361 (("execv %s\", GOT_TAG") "execvp %s\", GOT_TAG")))))))
1362 (build-system gnu-build-system)
1363 (synopsis "Distributed version control system")
1364 (description
1365 "Game of Trees (Got) is a version control system which prioritizes ease of use
1366and simplicity over flexibility.")
1367 (license license:isc)
1368 (home-page "https://gameoftrees.org/")
1369 (properties
1370 ;; Can lint for updates, but not update in place.
1371 '((release-monitoring-url . "https://gameoftrees.org/releases/")
1372 (lint-hidden-cpe-vendors . ("got_project"))))))
1373
1374(define-public xdiff
1375 (let ((revision "0")
1376 (commit "a137bc7ee6c76618ed1737c257548eaa10ac0089"))
1377 (package
1378 (name "xdiff")
1379 ;; The base version is taken from the CMakeLists.txt file.
1380 (version (git-version "0.1" revision commit))
1381 (source (origin
1382 (method git-fetch)
1383 (uri (git-reference
1384 (url "https://github.com/libgit2/xdiff")
1385 (commit commit)))
1386 (file-name (git-file-name name version))
1387 (sha256
1388 (base32
1389 "1rxzpag2pih64qlgq40xg1z6mz0bzvps4baxw7bmykyhjhc2gx75"))))
1390 (build-system cmake-build-system)
1391 (arguments
1392 (list
1393 #:modules '((guix build cmake-build-system)
1394 (guix build utils)
1395 (srfi srfi-26))
1396 #:tests? #f ;no test suite
1397 #:phases
1398 #~(modify-phases %standard-phases
1399 (add-after 'unpack 'create-shared-library
1400 (lambda _
1401 (substitute* "CMakeLists.txt"
1402 (("add_library\\(xdiff STATIC")
1403 "add_library(xdiff SHARED"))))
1404 (replace 'install ;no install target
1405 (lambda _
1406 (with-directory-excursion "../source"
1407 (for-each (cute install-file <>
1408 (string-append #$output "/include"))
1409 (list "xdiff.h"
1410 "git-xdiff.h"))) ;included by xdiff.h
1411 (install-file "libxdiff.so"
1412 (string-append #$output "/lib")))))))
1413 (home-page "https://github.com/libgit2/xdiff")
1414 (synopsis "File differential library used by git")
1415 (description "@code{xdiff} is the file differential library used by git,
1416which has been extracted into a standalone library for compatibility with
1417other git-like projects such as @code{libgit2}.")
1418 (license license:lgpl2.1+))))
1419
1420(define-public libgit2-1.9
1421 (package
1422 (name "libgit2")
1423 (version "1.9.4")
1424 (replacement libgit2-1.9.7)
1425 (source (origin
1426 (method git-fetch)
1427 (uri (git-reference
1428 (url "https://github.com/libgit2/libgit2")
1429 (commit (string-append "v" version))))
1430 (file-name (git-file-name "libgit2" version))
1431 (sha256
1432 (base32
1433 "07gfycsmq3hdaic3x3ldgnry3gnam1yxsy8q5f94s52xgb7j59b4"))
1434 (patches
1435 (search-patches "libgit2-proxy-reconnection.patch"
1436 "libgit2-path-max.patch"))
1437 (modules '((guix build utils)))
1438 (snippet
1439 #~(begin
1440 (for-each delete-file-recursively
1441 '("deps/chromium-zlib"
1442 "deps/llhttp"
1443 "deps/ntlmclient"
1444 "deps/pcre"
1445 "deps/winhttp"
1446 "deps/zlib"))))))
1447 (build-system cmake-build-system)
1448 (outputs '("out" "debug"))
1449 (arguments
1450 (list #:configure-flags
1451 #~(list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
1452 "-DREGEX_BACKEND=pcre2"
1453 "-DUSE_HTTP_PARSER=http-parser"
1454 "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
1455
1456 ;; Use the SHA1 implementation from OpenSSL rather than the
1457 ;; builtin one. This halves the CPU time spent in the
1458 ;; "indexing objects" phase when cloning the Guix repo.
1459 "-DUSE_SHA1=HTTPS"
1460
1461 ;; See https://github.com/libgit2/libgit2/issues/7169
1462 #$@(if (target-32bit?)
1463 '("-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64")
1464 '()))
1465 #:phases
1466 #~(modify-phases %standard-phases
1467 ;; Run checks more verbosely, unless we are cross-compiling.
1468 (replace 'check
1469 (lambda* (#:key (tests? #t) #:allow-other-keys)
1470 (if tests?
1471 (invoke "./libgit2_tests" "-v" "-Q")
1472 ;; Tests may be disabled if cross-compiling.
1473 (format #t "Test suite not run.~%")))))))
1474 (inputs
1475 (list http-parser))
1476 (native-inputs
1477 (list pkg-config python))
1478 (propagated-inputs
1479 ;; These libraries are in 'Requires.private' in libgit2.pc.
1480 (list openssl libssh2 pcre2 zlib))
1481 (home-page "https://libgit2.org/")
1482 (synopsis "Library providing Git core methods")
1483 (description
1484 "Libgit2 is a portable, pure C implementation of the Git core methods
1485provided as a re-entrant linkable library with a solid API, allowing you to
1486write native speed custom Git applications in any language with bindings.")
1487 ;; GPLv2 with linking exception
1488 (license license:gpl2)))
1489
1490(define-public libgit2-1.9.7
1491 (package
1492 (inherit libgit2-1.9)
1493 (name "libgit2")
1494 (version "1.9.7")
1495 (source
1496 (origin
1497 (inherit (package-source libgit2-1.9))
1498 (uri (git-reference
1499 (url "https://github.com/libgit2/libgit2")
1500 (commit (string-append "v" version))))
1501 (file-name (git-file-name "libgit2" version))
1502 (sha256 (base32 "0jhm723bc9v18yanlqvmwn9kpmnvbcavnlhd4jcw0n082d7jl54h"))
1503 (snippet #~(for-each delete-file-recursively
1504 '("deps/chromium-zlib"
1505 "deps/llhttp"
1506 "deps/ntlmclient"
1507 "deps/pcre2"
1508 "deps/winhttp"
1509 "deps/zlib")))))))
1510
1511(define-public libgit2-1.9/pinned
1512 ;; This is a pinned version used as a dependency for 'rust-cargo-c'.
1513 ;; Update periodically.
1514 (package/inherit libgit2-1.9
1515 (version "1.9.2")
1516 (source (origin
1517 (inherit (package-source libgit2-1.9))
1518 (method git-fetch)
1519 (uri (git-reference
1520 (url "https://github.com/libgit2/libgit2")
1521 (commit (string-append "v" version))))
1522 (file-name (git-file-name "libgit2" version))
1523 (sha256
1524 (base32
1525 "1f3wnw0s5fx4lf68i400mj6l7qyw9hf6mr7i2xlqqmp9q23q89sc"))
1526 (patches
1527 (search-patches "libgit2-uninitialized-proxy-settings.patch"
1528 "libgit2-proxy-reconnection.patch"
1529 "libgit2-path-max.patch"))))
1530 (arguments
1531 (list #:configure-flags
1532 #~(list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
1533 "-DREGEX_BACKEND=pcre2"
1534 "-DUSE_HTTP_PARSER=http-parser"
1535 "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
1536 ;; See https://github.com/libgit2/libgit2/issues/7169
1537 #$@(if (target-32bit?)
1538 '("-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64")
1539 '()))
1540 #:phases
1541 #~(modify-phases %standard-phases
1542 ;; Run checks more verbosely, unless we are cross-compiling.
1543 (replace 'check
1544 (lambda* (#:key (tests? #t) #:allow-other-keys)
1545 (if tests?
1546 (invoke "./libgit2_tests" "-v" "-Q")
1547 ;; Tests may be disabled if cross-compiling.
1548 (format #t "Test suite not run.~%")))))))
1549 (inputs
1550 (list libssh2 http-parser))
1551 (propagated-inputs
1552 ;; These libraries are in 'Requires.private' in libgit2.pc.
1553 (list openssl pcre2 zlib))
1554 (properties '((hidden? . #t)))))
1555
1556(define-public libgit2-1.8
1557 (package
1558 (inherit libgit2-1.9)
1559 (version "1.8.7")
1560 (source (origin
1561 (method git-fetch)
1562 (uri (git-reference
1563 (url "https://github.com/libgit2/libgit2")
1564 (commit (string-append "v" version))))
1565 (file-name (git-file-name "libgit2" version))
1566 (sha256
1567 (base32
1568 "1lhvrfms0p4n817c2lc9cqpgx1v82szr1p6v60jp4rpm6gfrpg6d"))
1569 (patches
1570 (search-patches "libgit2-uninitialized-proxy-settings.patch"))
1571 (modules '((guix build utils)))
1572 (snippet
1573 '(begin
1574 (for-each delete-file-recursively
1575 '("deps/chromium-zlib"
1576 "deps/llhttp"
1577 "deps/ntlmclient"
1578 "deps/pcre2"
1579 "deps/winhttp"
1580 "deps/zlib"))))))
1581 (inputs
1582 (list libssh2 http-parser))
1583 (propagated-inputs
1584 ;; These libraries are in 'Requires.private' in libgit2.pc.
1585 (list openssl pcre2 zlib))))
1586
1587(define-public libgit2-1.7
1588 (package
1589 (inherit libgit2-1.8)
1590 (version "1.7.2")
1591 (source (origin
1592 (method git-fetch)
1593 (uri (git-reference
1594 (url "https://github.com/libgit2/libgit2")
1595 (commit (string-append "v" version))))
1596 (file-name (git-file-name "libgit2" version))
1597 (sha256
1598 (base32
1599 "0i95jwrwx4svh5l4dpa5r4a99f813hlm7nzzkbqzmnw4pkyxhlvx"))
1600 ;; We need to use the bundled xdiff until an option is given
1601 ;; to use the one from git.
1602 (modules '((guix build utils)))
1603 (snippet
1604 '(begin
1605 (for-each delete-file-recursively
1606 '("deps/chromium-zlib"
1607 "deps/http-parser"
1608 "deps/ntlmclient"
1609 "deps/pcre"
1610 "deps/winhttp"
1611 "deps/zlib"))))))
1612 (arguments
1613 (substitute-keyword-arguments (package-arguments libgit2-1.8)
1614 ((#:configure-flags _ #~(list))
1615 `(list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
1616 "-DREGEX_BACKEND=pcre2"
1617 "-DUSE_HTTP_PARSER=system"
1618 "-DUSE_SSH=ON")))))) ; cmake fails to find libssh if this is missing
1619
1620(define-public libgit2-1.6
1621 (package
1622 (inherit libgit2-1.7)
1623 (version "1.6.5")
1624 (source (origin
1625 (method git-fetch)
1626 (uri (git-reference
1627 (url "https://github.com/libgit2/libgit2")
1628 (commit (string-append "v" version))))
1629 (file-name (git-file-name "libgit2" version))
1630 (sha256
1631 (base32
1632 "1v8sndvknsknf0i967qidmz73q9jx928iq7fqqgx3rbwn2g1gn6s"))
1633 (modules '((guix build utils)))
1634 (snippet
1635 '(begin
1636 (delete-file-recursively "deps")))))))
1637
1638(define-public libgit2-1.5
1639 (package
1640 (inherit libgit2-1.7)
1641 (version "1.5.2")
1642 (source (origin
1643 (method git-fetch)
1644 (uri (git-reference
1645 (url "https://github.com/libgit2/libgit2")
1646 (commit (string-append "v" version))))
1647 (file-name (git-file-name "libgit2" version))
1648 (sha256
1649 (base32
1650 "0v9jdaxmqrzbs9v5vhh2xf5xv9h29q8qqn8vmns279ljx1zav5yd"))
1651 (modules '((guix build utils)))
1652 (snippet
1653 '(begin
1654 (delete-file-recursively "deps")))))))
1655
1656(define-public libgit2
1657 ;; Default version of libgit2.
1658 libgit2-1.9)
1659
1660(define-public libgit2-1.3
1661 (package
1662 (inherit libgit2-1.5)
1663 (version "1.3.2")
1664 (source (origin
1665 (inherit (package-source libgit2-1.5))
1666 (method git-fetch)
1667 (uri (git-reference
1668 (url "https://github.com/libgit2/libgit2")
1669 (commit (string-append "v" version))))
1670 (file-name (git-file-name "libgit2" version))
1671 (sha256
1672 (base32
1673 "1dngga8jq419z6ps65wpmh2jihcf70k6r98pb1m1yiwj7qqh9792"))))
1674 (arguments
1675 (substitute-keyword-arguments (package-arguments libgit2-1.5)
1676 ((#:configure-flags _ #~'())
1677 ;; XXX: Drop '-DUSE_SHA1=HTTPS' to avoid a major rebuild.
1678 #~(list "-DUSE_NTLMCLIENT=OFF"
1679 "-DREGEX_BACKEND=pcre2"
1680 "-DUSE_HTTP_PARSER=system"
1681 "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
1682 ;; See https://github.com/libgit2/libgit2/issues/7169
1683 #$@(if (target-32bit?)
1684 '("-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64")
1685 '())))
1686 ((#:phases _ '%standard-phases)
1687 `(modify-phases %standard-phases
1688 ;; Run checks more verbosely, unless we are cross-compiling.
1689 (replace 'check
1690 (lambda* (#:key (tests? #t) #:allow-other-keys)
1691 (if tests?
1692 (invoke "./libgit2_clar" "-v" "-Q")
1693 ;; Tests may be disabled if cross-compiling.
1694 (format #t "Test suite not run.~%"))))))))))
1695
1696(define-public git-issue
1697 (let ((commit "d056998566d30235072b97982756ff607e9ecce9")
1698 (revision "0"))
1699 (package
1700 (name "git-issue")
1701 (version (git-version "0" revision commit))
1702 (source (origin
1703 (method git-fetch)
1704 (uri (git-reference
1705 (url "https://github.com/dspinellis/git-issue")
1706 (commit commit)))
1707 (sha256
1708 (base32
1709 "0002bjzv6rgpxbbsjiswg73prl7iq217qvafbxhsjp2wjj00i0sm"))))
1710 (build-system gnu-build-system)
1711 (arguments
1712 (list #:make-flags #~(list (string-append "PREFIX=" #$output))
1713 #:test-target "test"
1714 #:phases
1715 #~(modify-phases %standard-phases
1716 (delete 'configure) ;no configure script
1717 (add-before 'build 'generate-docs
1718 (lambda _
1719 (invoke "make" "sync-docs")))
1720 (add-before 'check 'fix-tests
1721 (lambda _
1722 (substitute* "test.sh"
1723 ;; Skip 3 failing tests.
1724 (("fail \"Uncommitted files sync-docs.*")
1725 "ok \"ignored\"\n")
1726 (("try_grep '\\^Tags:\\.\\*cloned'")
1727 "ok \"ignored\"")
1728 (("try \"\\$gi\" tag \"\\$issue\" cloned")
1729 "ok \"ignored\"")
1730 ;; Fix a test.
1731 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
1732 (native-inputs (list git-minimal/pinned util-linux))
1733 (inputs (list jq curl))
1734 (synopsis "Git-based decentralized issue management")
1735 (description
1736 "This is a minimalist decentralized issue management system based on
1737Git, offering (optional) bidirectional integration with GitHub and GitLab
1738issue management.")
1739 (home-page "https://github.com/dspinellis/git-issue")
1740 (license license:gpl3+))))
1741
1742(define-public git-credential-oauth
1743 (package
1744 (name "git-credential-oauth")
1745 (version "0.15.1")
1746 (source
1747 (origin
1748 (method git-fetch)
1749 (uri (git-reference
1750 (url "https://github.com/hickford/git-credential-oauth")
1751 (commit (string-append "v" version))))
1752 (file-name (git-file-name name version))
1753 (sha256
1754 (base32 "1fid6dl82val6miq61dm203y7k2kzccpmra43fngnqrr1p4hh2pl"))))
1755 (build-system go-build-system)
1756 (arguments
1757 (list
1758 #:install-source? #f
1759 #:build-flags #~(list (string-append "-ldflags=-X main.version="
1760 #$version))
1761 #:import-path "github.com/hickford/git-credential-oauth"
1762 #:phases
1763 #~(modify-phases %standard-phases
1764 (add-after 'install 'install-manpages
1765 (lambda* (#:key import-path #:allow-other-keys)
1766 (let ((man (string-append "src/" import-path
1767 "/git-credential-oauth.1")))
1768 (install-file man (string-append #$output "/share/man/man1"))))))))
1769 (native-inputs
1770 (list go-golang-org-x-oauth2))
1771 (home-page "https://github.com/hickford/git-credential-oauth")
1772 (synopsis "Git credential helper that securely authenticates using OAuth")
1773 (description
1774 "git-credential-oauth is a Git credential helper that securely
1775authenticates to GitHub, GitLab, BitBucket, Gerrit, Gitea, and Forgejo using
1776OAuth. The first time you authenticate, the helper opens a browser window to
1777the host. Subsequent authentication within storage lifetime is
1778non-interactive.")
1779 (license license:asl2.0)))
1780
1781(define-public git-crypt
1782 (package
1783 (name "git-crypt")
1784 (version "0.8.0")
1785 (source
1786 (origin
1787 (method git-fetch)
1788 (uri (git-reference
1789 (url "https://github.com/AGWA/git-crypt")
1790 (commit version)))
1791 (file-name (git-file-name name version))
1792 (sha256
1793 (base32 "0kr3z095vg08mbq9j9sl4lchnq1q9rz4a1nik1pqxh6hdn5kfcpj"))))
1794 (build-system gnu-build-system)
1795 (inputs
1796 (list git openssl))
1797 (native-inputs
1798 (list docbook-xml-4.2 docbook-xsl libxslt))
1799 (arguments
1800 (list
1801 #:tests? #f ; No tests.
1802 #:make-flags
1803 #~(list
1804 "ENABLE_MAN=yes"
1805 ;; Add flag to work around OpenSSL 3 incompatibility.
1806 ;; See <https://github.com/AGWA/git-crypt/issues/232>.
1807 "CXXFLAGS+=-DOPENSSL_API_COMPAT=0x30000000L"
1808 (string-append "PREFIX=" #$output))
1809 #:phases
1810 #~(modify-phases %standard-phases
1811 (delete 'configure))))
1812 (home-page "https://www.agwa.name/projects/git-crypt/")
1813 (synopsis "Transparent encryption of files in a git repository")
1814 (description "git-crypt enables transparent encryption and decryption of
1815files in a git repository. Files which you choose to protect are encrypted when
1816committed, and decrypted when checked out. git-crypt lets you freely share a
1817repository containing a mix of public and private content. git-crypt gracefully
1818degrades, so developers without the secret key can still clone and commit to a
1819repository with encrypted files. This lets you store your secret material (such
1820as keys or passwords) in the same repository as your code, without requiring you
1821to lock down your entire repository.")
1822 (license license:gpl3+)))
1823
1824(define-public git-remote-gcrypt
1825 (package
1826 (name "git-remote-gcrypt")
1827 (version "1.5")
1828 (source (origin
1829 (method git-fetch)
1830 (uri (git-reference
1831 (url "https://git.spwhitton.name/git-remote-gcrypt")
1832 (commit version)))
1833 (file-name (git-file-name name version))
1834 (sha256
1835 (base32
1836 "1m1wlbqpqyhh2z0ka3gjs5yabd32nnkzw5hak6czcqrhhkfsqbmv"))))
1837 (build-system trivial-build-system)
1838 (arguments
1839 `(#:modules ((guix build utils))
1840 #:builder (begin
1841 (use-modules (guix build utils))
1842 (let* ((source (assoc-ref %build-inputs "source"))
1843 (output (assoc-ref %outputs "out"))
1844 (bindir (string-append output "/bin")))
1845 (install-file (string-append source "/git-remote-gcrypt")
1846 bindir)))))
1847 (home-page "https://spwhitton.name/tech/code/git-remote-gcrypt/")
1848 (synopsis "Whole remote repository encryption")
1849 (description "git-remote-gcrypt is a Git remote helper to push and pull from
1850repositories encrypted with GnuPG. It works with the standard Git transports,
1851including repository hosting services like GitLab.
1852
1853Remote helper programs are invoked by Git to handle network transport. This
1854helper handles @code{gcrypt:} URLs that access a remote repository encrypted
1855with GPG, using our custom format.
1856
1857Supported locations are local, @code{rsync://} and @code{sftp://}, where the
1858repository is stored as a set of files, or instead any Git URL where gcrypt
1859will store the same representation in a Git repository, bridged over arbitrary
1860Git transport.
1861
1862The aim is to provide confidential, authenticated Git storage and
1863collaboration using typical untrusted file hosts or services.")
1864 (license license:gpl3+)))
1865
1866(define-public git-remote-tor
1867 (package
1868 (name "git-remote-tor")
1869 (version "0.1.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (crate-uri "git-remote-tor" version))
1874 (file-name (string-append name "-" version ".tar.gz"))
1875 (sha256
1876 (base32 "146nyd5ww073iim48r71knfwnldq635xv732h3kl4ycsh2ki3ycx"))))
1877 (build-system cargo-build-system)
1878 (arguments
1879 (list
1880 #:install-source? #f
1881 #:phases
1882 #~(modify-phases %standard-phases
1883 (add-after 'unpack 'adjust-torify
1884 (lambda* (#:key inputs #:allow-other-keys)
1885 (let ((torsocks (search-input-file inputs "/bin/torsocks")))
1886 (substitute* '("src/main.rs" "git-remote-tor.sh")
1887 (("Command::new\\(\"torsocks\"\\)")
1888 (string-append "Command::new(\"" torsocks "\")"))
1889 (("exec torsocks")
1890 (string-append "exec " torsocks))
1891 ((" and torsocks installed")
1892 ""))))))))
1893 (inputs (cons torsocks
1894 (cargo-inputs 'git-remote-tor)))
1895 (home-page "https://agentofuser.com/git-remote-tor/")
1896 (synopsis "Seamless .onion and tor-ified git remotes")
1897 (description
1898 "This package provides Seamless .onion and tor-ified git remotes.")
1899 (license (list license:expat license:asl2.0))))
1900
1901(define-public git-repo-go
1902 (package
1903 (name "git-repo-go")
1904 (version "1.0.0")
1905 (source (origin
1906 (method git-fetch)
1907 (uri (git-reference
1908 (url "https://github.com/Apteryks/git-repo-go")
1909 (commit (string-append "v" version))))
1910 (file-name (git-file-name name version))
1911 (sha256
1912 (base32
1913 "1y310dmpiaii6d84d9pvdv4wz4mx7snbpm7v9n400q0j8qnjal32"))))
1914 (build-system go-build-system)
1915 (arguments
1916 (list
1917 #:import-path "github.com/Apteryks/git-repo-go"
1918 #:build-flags
1919 #~(list "-ldflags" (string-append
1920 "-s -w " ;default ldflags
1921 "-X github.com/Apteryks/git-repo-go/version.Version="
1922 #$version))
1923 #:install-source? #f
1924 #:phases
1925 #~(modify-phases %standard-phases
1926 (add-after 'unpack 'patch-commands
1927 (lambda* (#:key inputs #:allow-other-keys)
1928 (with-directory-excursion "src/github.com/Apteryks/git-repo-go"
1929 (substitute* "config/hooks.go"
1930 ;; The commit-msg hook script is executed by Git during the
1931 ;; tests, so must have a fully referenced /bin/sh shebang.
1932 (("#!/bin/sh")
1933 (format #f "#!~a"
1934 (search-input-file inputs "bin/sh"))))
1935 (substitute* "test/t1302-helper-remote-unknown.sh"
1936 ;; This test creates some helper scripts.
1937 (("#!/bin/sh")
1938 (format #f "#!~a" (which "sh")))))))
1939 (add-before 'check 'make-HOME-writable
1940 (lambda _
1941 (setenv "HOME" "/tmp")))
1942 (add-after 'install 'functional-check
1943 (lambda* (#:key tests? #:allow-other-keys)
1944 (when tests?
1945 (setenv "PATH" (string-append #$output "/bin:"
1946 (getenv "PATH")))
1947 ;; Run the integration test suite. Parallelism
1948 ;; doesn't currently work (see:
1949 ;; https://github.com/Apteryks/git-repo-go/issues/1)
1950 (setenv "GIT_TEST_OPTS" "--verbose")
1951 (invoke "make" "-C"
1952 "src/github.com/Apteryks/git-repo-go/test")))))))
1953 (native-inputs
1954 (list git-minimal/pinned
1955 go-github-com-go-git-go-git-v5
1956 go-github-com-h2non-gock
1957 go-github-com-jiangxin-goconfig
1958 go-github-com-jiangxin-multi-log
1959 go-github-com-jiu2015-gotestspace
1960 go-github-com-mattn-go-isatty
1961 go-github-com-mattn-go-shellwords
1962 go-github-com-mitchellh-go-homedir
1963 go-github-com-spf13-cobra
1964 go-github-com-spf13-pflag
1965 go-github-com-spf13-viper
1966 go-github-com-stretchr-testify
1967 go-golang-org-x-crypto
1968 go-gopkg-in-yaml-v2
1969 perl
1970 python-minimal))
1971 (inputs
1972 (list bash-minimal))
1973 (home-page "https://git-repo.info/en/docs/")
1974 (synopsis "Git extensions for AGit-Flow and Gerrit servers")
1975 (description
1976 "@command{git-repo} provides Git extensions for interacting conveniently
1977with AGit-Flow or Gerrit servers. It makes it possible to create, update or
1978fetch @acronym{PR, pull requests}, and more. It is based on the
1979@command{repo} tool that was developed for the Gerrit project, but also
1980supports AGit-Flow and lifts the requirement to use a manifest file.")
1981 (license license:asl2.0)))
1982
1983(define-public github-cli
1984 (package
1985 (name "github-cli")
1986 (version "2.83.2")
1987 (source
1988 (origin
1989 (method git-fetch)
1990 (uri (git-reference
1991 (url "https://github.com/cli/cli")
1992 (commit (string-append "v" version))))
1993 (file-name (git-file-name name version))
1994 (sha256
1995 (base32 "04kpcy15r7px92mf13jf4w0v07sjnfqc09m1vfvr5pmw7xsg35k2"))))
1996 (build-system go-build-system)
1997 (arguments
1998 (list
1999 #:install-source? #f
2000 #:import-path "github.com/cli/cli/v2/cmd/gh"
2001 #:unpack-path "github.com/cli/cli/v2"
2002 #:embed-files
2003 #~(list ".*\\.xml" ".*\\.tmpl"
2004 ;; sigstore-go TUF repository files (root.json, staging_root.json)
2005 ".*_?root\\.json" "trusted_root\\.json"
2006 ;; go-openapi/spec schema files
2007 "jsonschema-draft-04\\.json" "schema\\.json")
2008 #:modules
2009 '((guix build go-build-system)
2010 (guix build utils)
2011 (ice-9 match))
2012 #:phases
2013 #~(modify-phases %standard-phases
2014 (add-after 'install 'install-extras
2015 (lambda* (#:key unpack-path native-inputs #:allow-other-keys)
2016 (for-each
2017 (match-lambda
2018 ((shell . path)
2019 (mkdir-p (in-vicinity #$output (dirname path)))
2020 (let ((binary
2021 (if #$(%current-target-system)
2022 (search-input-file native-inputs "bin/gh")
2023 (in-vicinity #$output "bin/gh"))))
2024 (with-output-to-file (in-vicinity #$output path)
2025 (lambda _
2026 (invoke binary "completion" "--shell" shell))))))
2027 '(("bash" . "share/bash-completion/completions/gh")
2028 ("fish" . "share/fish/vendor_completions.d/gh.fish")
2029 ("zsh" . "share/zsh/site-functions/_gh")))
2030 ;; Also install the manpages
2031 ;; taken from script/build.go
2032 (mkdir-p (in-vicinity #$output "share/man/man1"))
2033 (with-directory-excursion (string-append "src/" unpack-path)
2034 (invoke "go" "run" "./cmd/gen-docs"
2035 "--man-page" "--doc-path"
2036 (in-vicinity #$output "share/man/man1"))))))))
2037 (native-inputs
2038 (append
2039 (if (%current-target-system)
2040 (list this-package)
2041 '())
2042 (list go-github-com-atotto-clipboard
2043 go-github-com-briandowns-spinner
2044 go-github-com-cenkalti-backoff-v4
2045 go-github-com-cenkalti-backoff-v5
2046 go-github-com-charmbracelet-glamour
2047 go-github-com-charmbracelet-huh
2048 go-github-com-charmbracelet-lipgloss
2049 go-github-com-cli-go-gh-v2
2050 go-github-com-cli-oauth
2051 go-github-com-cli-safeexec
2052 go-github-com-digitorus-timestamp
2053 go-github-com-distribution-reference
2054 go-github-com-gabriel-vasile-mimetype
2055 go-github-com-gdamore-tcell-v2
2056 go-github-com-gorilla-websocket
2057 go-github-com-hashicorp-go-multierror
2058 go-github-com-hashicorp-go-version
2059 go-github-com-itchyny-timefmt-go
2060 go-github-com-joho-godotenv
2061 go-github-com-makenowjust-heredoc
2062 go-github-com-masterminds-sprig-v3
2063 go-github-com-microsoft-dev-tunnels
2064 go-github-com-muhammadmuzzammil1998-jsonc
2065 go-github-com-opentracing-opentracing-go
2066 go-github-com-rivo-tview
2067 go-github-com-shurcool-githubv4
2068 go-github-com-sigstore-sigstore-go
2069 go-github-com-spf13-cobra
2070 go-github-com-spf13-pflag
2071 go-github-com-stretchr-testify
2072 go-github-com-vmihailenco-msgpack-v5
2073 go-github-com-zalando-go-keyring
2074 go-golang-org-x-sys
2075 go-golang-org-x-term
2076 go-golang-org-x-text
2077 go-google-golang-org-grpc
2078 go-gopkg-in-yaml-v3)))
2079 (home-page "https://cli.github.com/")
2080 (synopsis "GitHub's official command-line tool")
2081 (description
2082 "@command{gh} is GitHub on the command line. It brings pull requests,
2083issues, and other GitHub concepts to the terminal next to where you are
2084already working with git and your code. It works with GitHub.com, GitHub
2085Enterprise Cloud, and GitHub Enterprise Server 2.20+.")
2086 (license license:expat)))
2087
2088(define-public cgit
2089 (package
2090 (name "cgit")
2091 ;; Update the ‘git-source’ input as well.
2092 (version "1.3")
2093 (source (origin
2094 (method git-fetch)
2095 (uri (git-reference
2096 (url "https://git.zx2c4.com/cgit")
2097 (commit (string-append "v" version))))
2098 (sha256
2099 (base32
2100 "1miwjvh4maxx6b5345wjnndzw58907lh9vif5ajqwwda6sicsnmj"))
2101 (file-name (git-file-name name version))))
2102 (build-system gnu-build-system)
2103 (arguments
2104 (list
2105 #:tests? #f ; XXX: fail to build the in-source git.
2106 #:test-target "test"
2107 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
2108 "SHELL_PATH=sh")
2109 #:phases
2110 #~(modify-phases %standard-phases
2111 (add-after 'unpack 'unpack-git
2112 (lambda* (#:key inputs #:allow-other-keys)
2113 ;; Unpack the source of git into the 'git' directory.
2114 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
2115 #$(this-package-input "git-source.tar.xz"))))
2116 (add-after 'unpack 'patch-absolute-file-names
2117 (lambda* (#:key inputs outputs #:allow-other-keys)
2118 (define (quoted-file-name input path)
2119 (string-append "\"" input path "\""))
2120 (substitute* "ui-snapshot.c"
2121 (("\"gzip\"")
2122 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
2123 (("\"bzip2\"")
2124 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
2125 (("\"xz\"")
2126 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
2127
2128 (substitute* "filters/about-formatting.sh"
2129 (("\\$\\(dirname \\$0\\)") (string-append (assoc-ref outputs "out")
2130 "/lib/cgit/filters"))
2131 (("\\| tr") (string-append "| " (which "tr"))))
2132
2133 (substitute* "filters/html-converters/txt2html"
2134 (("sed") (which "sed")))
2135
2136 (substitute* "filters/html-converters/man2html"
2137 (("groff") (which "groff")))
2138
2139 (substitute* "filters/html-converters/rst2html"
2140 (("rst2html\\.py") (which "rst2html.py")))))
2141 (delete 'configure) ; no configure script
2142 (add-after 'build 'build-man
2143 (lambda* (#:key make-flags #:allow-other-keys)
2144 (apply invoke "make" "doc-man" make-flags)))
2145 (replace 'install
2146 (lambda* (#:key make-flags outputs #:allow-other-keys)
2147 (let ((out (assoc-ref outputs "out")))
2148 (apply invoke
2149 "make" "install" "install-man"
2150 (string-append "prefix=" out)
2151 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
2152 make-flags)
2153 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
2154 ;; stripped.
2155 (rename-file (string-append out "/share/cgit/cgit.cgi")
2156 (string-append out "/lib/cgit/cgit.cgi")))))
2157 (add-after 'install 'wrap-python-scripts
2158 (lambda* (#:key outputs #:allow-other-keys)
2159 (for-each
2160 (lambda (file)
2161 (wrap-program (string-append (assoc-ref outputs "out")
2162 "/lib/cgit/filters/" file)
2163 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
2164 '("syntax-highlighting.py"
2165 "html-converters/md2html")))))))
2166 (native-inputs
2167 ;; For building manpage.
2168 (list asciidoc))
2169 (inputs
2170 (list (origin
2171 (method url-fetch)
2172 ;; Building cgit requires a Git source tree.
2173 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
2174 ;; which may not match the current (package-version git).
2175 (uri "mirror://kernel.org/software/scm/git/git-2.53.0.tar.xz")
2176 (sha256
2177 (base32
2178 "0ly6335f4qd5qkzk3xwib6h1i26w17b37968zsyvnqdhh1yvs62q"))
2179 (file-name "git-source.tar.xz"))
2180 bash-minimal
2181 openssl
2182 python
2183 python-docutils-0.19
2184 python-markdown
2185 python-pygments
2186 zlib
2187 ;; bzip2, groff, gzip and xz are inputs (not native inputs)
2188 ;; since they are actually substituted into cgit source and
2189 ;; referenced by the built package output.
2190 bzip2
2191 groff
2192 gzip
2193 xz))
2194 (home-page "https://git.zx2c4.com/cgit/")
2195 (synopsis "Web frontend for git repositories")
2196 (description
2197 "CGit is an attempt to create a fast web interface for the Git SCM, using
2198a built-in cache to decrease server I/O pressure.")
2199 (license license:gpl2)))
2200
2201(define-public cgit-pink
2202 (package
2203 (inherit cgit)
2204 (name "cgit-pink")
2205 (version "1.4.1")
2206 (source (origin
2207 (method git-fetch)
2208 (uri (git-reference
2209 (url "https://git.causal.agency/cgit-pink")
2210 (commit version)))
2211 (file-name (git-file-name name version))
2212 (sha256
2213 (base32
2214 "0yp6rm60pz8pj8wrm1aglix51hhy00al86mm94ag2bifc92q23ar"))))
2215 (arguments
2216 (substitute-keyword-arguments arguments
2217 ((#:tests? _ #f)
2218 (not (%current-target-system)))
2219 ((#:make-flags _ '())
2220 #~(list (string-append "CC=" #$(cc-for-target))
2221 (string-append "PERL_PATH="
2222 (search-input-file %build-inputs "/bin/perl"))
2223 ;; It is important to set an absolute path in SHELL_PATH
2224 ;; because it is used as the shebang of generated scripts that
2225 ;; are invoked during the test phase.
2226 (string-append "SHELL_PATH="
2227 (search-input-file %build-inputs "/bin/sh"))))
2228 ((#:phases phases #~%standard-phases)
2229 #~(modify-phases #$phases
2230 (replace 'unpack-git
2231 (lambda _
2232 ;; Unpack the source of git into the 'git' directory.
2233 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
2234 #$(this-package-input "git-source.tar.xz"))))))))
2235 (inputs
2236 (modify-inputs inputs
2237 (replace "git-source.tar.xz"
2238 ;; cgit-pink is tightly bound to git. Use GIT_VER from the Makefile,
2239 ;; which may not match the current (package-version git).
2240 (origin
2241 (method url-fetch)
2242 (uri "mirror://kernel.org/software/scm/git/git-2.36.1.tar.xz")
2243 (sha256
2244 (base32
2245 "0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0"))))))
2246 (native-inputs
2247 (modify-inputs native-inputs
2248 (append gnu-gettext perl)))
2249 (home-page "https://git.causal.agency/cgit-pink/about/")
2250 (description "cgit-pink is a fast web interface for the Git SCM, using a
2251built-in cache to decrease server I/O pressure. cgit-pink is a fork of
2252cgit.")))
2253
2254(define-public python-git-multimail
2255 (let ((commit "747fad49038b1f0eea12ab4ad453fb404111fe11")
2256 (revision "0"))
2257 (package
2258 (name "python-git-multimail")
2259 (version (git-version "1.6.0" revision commit))
2260 (source
2261 (origin
2262 (method git-fetch)
2263 (uri (git-reference
2264 (url "https://github.com/git-multimail/git-multimail")
2265 (commit commit)))
2266 (file-name (git-file-name name version))
2267 (sha256
2268 (base32 "101lm3sxdi844bj91x1sqnjw1lmqv1ir1m2dr2nfv9gap94pvaiw"))))
2269 (build-system pyproject-build-system)
2270 (arguments
2271 (list
2272 ;; Some tests are failing, but the test suite is not configurable.
2273 #:tests? #f
2274 #:phases
2275 #~(modify-phases %standard-phases
2276 (add-after 'unpack 'patch
2277 (lambda* (#:key inputs #:allow-other-keys)
2278 (substitute* "setup.py"
2279 (("'git-multimail', 'README.rst'")
2280 "'README.rst'"))
2281 (substitute* "git-multimail/git_multimail.py"
2282 (("GIT_EXECUTABLE = 'git'")
2283 (format #f "GIT_EXECUTABLE = '~a'"
2284 (search-input-file inputs "bin/git")))
2285 (("/usr/sbin/sendmail")
2286 (search-input-file inputs "/sbin/sendmail")))))
2287 (replace 'check
2288 (lambda* (#:key tests? #:allow-other-keys)
2289 (when tests?
2290 (with-directory-excursion "t"
2291 (invoke "make" "test"))))))))
2292 (native-inputs (list python-setuptools))
2293 (inputs (list git sendmail))
2294 (home-page "https://github.com/git-multimail/git-multimail")
2295 (synopsis "Send notification emails for Git pushes")
2296 (description
2297 "This hook sends emails describing changes introduced by pushes to a Git
2298repository. For each reference that was changed, it emits one ReferenceChange
2299email summarizing how the reference was changed, followed by one Revision
2300email for each new commit that was introduced by the reference change.
2301
2302This script is designed to be used as a post-receive hook in a Git
2303repository")
2304 (license license:gpl2))))
2305
2306(define-public python-ghp-import
2307 (package
2308 (name "python-ghp-import")
2309 (version "2.1.0")
2310 (source
2311 (origin
2312 (method git-fetch)
2313 (uri (git-reference
2314 (url "https://github.com/c-w/ghp-import")
2315 (commit version)))
2316 (file-name (git-file-name name version))
2317 (sha256
2318 (base32 "1v6kay6yr8sz0601ib8lrvbgpxslhll20b28i04bdwj1f1cjygy4"))))
2319 (build-system pyproject-build-system)
2320 (arguments
2321 (list
2322 #:tests? #f ;no tests, also not in Git
2323 #:phases
2324 #~(modify-phases %standard-phases
2325 (add-after 'install 'install-documentation
2326 (lambda* (#:key outputs #:allow-other-keys)
2327 (let* ((out (assoc-ref outputs "out"))
2328 (doc (string-append out "/share/doc"))
2329 (licenses (string-append out "/share/licenses")))
2330 (install-file "README.md" doc)
2331 (install-file "LICENSE" licenses)))))))
2332 (native-inputs
2333 (list python-setuptools))
2334 (propagated-inputs (list python-dateutil))
2335 (home-page "https://github.com/c-w/ghp-import")
2336 (synopsis "Copy directory to the gh-pages branch")
2337 (description "Script that copies a directory to the gh-pages branch (by
2338default) of the repository.")
2339
2340 ;; See <https://bugs.gnu.org/27913>.
2341 (license (license:non-copyleft
2342 "https://raw.githubusercontent.com/davisp/ghp-import/master/LICENSE"
2343 "Tumbolia Public License"))))
2344
2345(define-public python-gitdb
2346 (package
2347 (name "python-gitdb")
2348 (version "4.0.12")
2349 (source (origin
2350 (method url-fetch)
2351 (uri (pypi-uri "gitdb" version))
2352 (sha256
2353 (base32
2354 "0wdmzngk870944nc6q5sphzv29jzhgddbh7vzhk366hrbn2izxsy"))))
2355 (build-system pyproject-build-system)
2356 (arguments
2357 ;; One test fails, probably due to low ulimit: ValueError: Expected to
2358 ;; write 1000 objects into pack, but received only 0 from iterators.
2359 `(#:test-flags '("-k" "not test_pack_writing"
2360 "--ignore-glob=gitdb/test/performance/*.py")
2361 #:phases (modify-phases %standard-phases
2362 (add-before 'check 'create-test-repository
2363 (lambda _
2364 (mkdir "/tmp/testrepo")
2365 ;; Some tests require a git repository, so create one.
2366 (with-directory-excursion "/tmp/testrepo"
2367 (do ((filecount 1 (1+ filecount)))
2368 ((> filecount 1000))
2369 (call-with-output-file (string-append
2370 "file" (number->string filecount))
2371 (lambda (port)
2372 (format port "~a" filecount))))
2373 (begin
2374 (invoke "git" "init")
2375 (invoke "git" "config" "user.name" "Total Git")
2376 (invoke "git" "config" "user.email" "git@localhost")
2377 (invoke "git" "add" "-A")
2378 (invoke "git" "commit" "-q" "-m" "dummy commit")))
2379
2380 ;; The repository checkout must be a "bare" clone.
2381 (invoke "git" "clone" "--bare" "/tmp/testrepo"
2382 "/tmp/testrepo.git")))
2383 (add-before 'check 'pre-check
2384 (lambda _
2385 (setenv "GITDB_TEST_GIT_REPO_BASE" "/tmp/testrepo.git")
2386 ;; Skip tests that must be run from the gitdb repository.
2387 (setenv "TRAVIS" "1"))))))
2388 (propagated-inputs
2389 (list python-smmap))
2390 (native-inputs
2391 (list git-minimal/pinned python-pytest python-setuptools python-wheel))
2392 (home-page "https://github.com/gitpython-developers/gitdb")
2393 (synopsis "Python implementation of the Git object database")
2394 (description
2395 "GitDB allows you to access @dfn{bare} Git repositories for reading and
2396writing. It aims at allowing full access to loose objects as well as packs
2397with performance and scalability in mind. It operates exclusively on streams,
2398allowing to handle large objects with a small memory footprint.")
2399 (license license:bsd-3)))
2400
2401(define-public python-gitpython
2402 (package
2403 (name "python-gitpython")
2404 (version "3.1.44")
2405 (source (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "gitpython" version))
2408 (sha256
2409 (base32
2410 "0scj4hqk6msyzqvq70wk6583qzwn33w601hvn0c59gskcar30zn8"))))
2411 (build-system pyproject-build-system)
2412 (arguments
2413 (list #:tests? #f ;XXX: tests can only be run within the GitPython repository
2414 #:phases
2415 #~(modify-phases %standard-phases
2416 (add-after 'unpack 'embed-git-reference
2417 (lambda* (#:key inputs #:allow-other-keys)
2418 (substitute* "git/cmd.py"
2419 (("git_exec_name = \"git\"")
2420 (string-append "git_exec_name = \""
2421 (search-input-file inputs "/bin/git")
2422 "\""))))))))
2423 (inputs
2424 (list git-minimal/pinned))
2425 (propagated-inputs
2426 (list python-gitdb))
2427 (native-inputs
2428 (list python-setuptools))
2429 (home-page "https://github.com/gitpython-developers/GitPython")
2430 (synopsis "Python library for interacting with Git repositories")
2431 (description
2432 "GitPython is a python library used to interact with Git repositories,
2433high-level like git-porcelain, or low-level like git-plumbing.
2434
2435It provides abstractions of Git objects for easy access of repository data,
2436and additionally allows you to access the Git repository more directly using
2437either a pure Python implementation, or the faster, but more resource intensive
2438 @command{git} command implementation.")
2439 (license license:bsd-3)))
2440
2441(define-public savane
2442 (package
2443 (name "savane")
2444 (version "3.12")
2445 (source (origin
2446 (method git-fetch)
2447 (uri (git-reference
2448 (url "https://git.savannah.gnu.org/git/administration/savane")
2449 (commit (string-append "release-" version))))
2450 (file-name (git-file-name name version))
2451 (sha256
2452 (base32
2453 "05w12rc1qx10zg3i78v6q6sdhg19pml2jghfmlnnsxwjv0nrdv7n"))))
2454 (build-system gnu-build-system)
2455 (native-inputs
2456 (list autoconf
2457 automake
2458 gettext-minimal
2459 imagemagick))
2460 (inputs
2461 (list exim
2462 gnupg
2463 httpd
2464 mariadb
2465 php))
2466 (propagated-inputs
2467 (list perl
2468 perl-dbd-mysql
2469 perl-dbi
2470 perl-date-calc
2471 perl-digest-md5
2472 perl-mailtools
2473 perl-file-find-rule
2474 perl-xml-writer))
2475 (synopsis "Web-based software hosting system")
2476 (description
2477 "Savane is a Web-based software hosting system. It includes issue
2478tracking (bugs, tasks, support, news and documentation), project member
2479management by roles and individual account maintenance.")
2480 (home-page "https://savannah.nongnu.org/p/administration")
2481 (license license:agpl3+)))
2482
2483 (define-public shflags
2484 (package
2485 (name "shflags")
2486 (version "1.3.0")
2487 (source (origin
2488 (method git-fetch)
2489 (uri (git-reference
2490 (url "https://github.com/kward/shflags")
2491 (commit (string-append "v" version))))
2492 (file-name (git-file-name name version))
2493 (sha256
2494 (base32
2495 "0jj0zkly8yg42b8jvih2cmmafv95vm8mv80n3dyalvr5i14lzqd8"))))
2496 (build-system gnu-build-system)
2497 (arguments
2498 `(#:tests? #f ; no tests
2499 #:phases
2500 (modify-phases %standard-phases
2501 (delete 'configure) ; nothing to configure
2502 (delete 'build) ; nothing to build
2503 (replace 'install
2504 (lambda* (#:key outputs #:allow-other-keys)
2505 (let* ((out (assoc-ref outputs "out"))
2506 (src (string-append out "/src")))
2507 (install-file "shflags" src)
2508 #t))))))
2509 (home-page "https://github.com/kward/shflags")
2510 (synopsis "Command-line flags library for shell scripts")
2511 (description
2512 "Shell Flags (shFlags) is a library written to greatly simplify the
2513handling of command-line flags in Bourne based Unix shell scripts (bash, dash,
2514ksh, sh, zsh). Most shell scripts use getopt for flags processing, but the
2515different versions of getopt on various OSes make writing portable shell
2516scripts difficult. shFlags instead provides an API that doesn't change across
2517shell and OS versions so the script writer can be confident that the script
2518will work.")
2519 (license license:lgpl2.1)))
2520
2521(define-public trac
2522 (package
2523 (name "trac")
2524 (version "1.6")
2525 (source
2526 (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "Trac" version))
2529 (sha256
2530 (base32 "013kqa93kd1giswir9qsasm5080x5x5x4ab86ky8zmkhyrhkrmv1"))))
2531 (build-system pyproject-build-system)
2532 (arguments
2533 (list #:test-flags #~(list "-k"
2534 ;; XXX: these two tests fail, check why.
2535 (string-append
2536 "not test_remove_composite_keys"
2537 " and not test_remove_simple_keys"))))
2538 (native-inputs
2539 (list python-psycopg2
2540 python-pymysql
2541 python-pytest
2542 python-setuptools))
2543 (propagated-inputs
2544 (list python-jinja2
2545 python-multipart
2546 python-standard-smtpd))
2547 (home-page "https://trac.edgewall.org")
2548 (synopsis "Integrated SCM, wiki, issue tracker and project environment")
2549 (description "Trac is a minimalistic web-based software project management
2550and bug/issue tracking system. It provides an interface to the Git and
2551Subversion revision control systems, an integrated wiki, flexible issue
2552tracking and convenient report facilities.")
2553 (license license:bsd-3)))
2554
2555(define-public git-flow
2556 (package
2557 (name "git-flow")
2558 ;; This version has not be officially released yet, so we build it
2559 ;; directly from the git repository.
2560 (version "1.12.3")
2561 (source (origin
2562 (method git-fetch)
2563 (uri (git-reference
2564 (url "https://github.com/petervanderdoes/gitflow-avh/")
2565 (commit version)))
2566 (file-name (git-file-name name version))
2567 (sha256
2568 (base32
2569 "13q4mnrxr03wz2dkhzy73j384g299m4d545cnhxcaznvdwfany4h"))))
2570 (build-system gnu-build-system)
2571 (inputs (list shflags))
2572 (arguments
2573 '(#:tests? #f ; no tests
2574 #:make-flags (list (string-append "prefix="
2575 (assoc-ref %outputs "out")))
2576 #:phases
2577 (modify-phases %standard-phases
2578 (add-after 'unpack 'reset-shFlags-link
2579 (lambda* (#:key inputs #:allow-other-keys)
2580 ;; The link points to a file in the shFlags submodule.
2581 ;; Redirect it to point to our system shFlags.
2582 (let ((shflags (assoc-ref inputs "shflags")))
2583 (begin
2584 (delete-file "gitflow-shFlags")
2585 (symlink (string-append shflags "/src/shflags")
2586 "gitflow-shFlags")))))
2587 (delete 'configure)
2588 (delete 'build))))
2589 (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
2590 (synopsis "Git extensions for Vincent Driessen's branching model")
2591 (description
2592 "Vincent Driessen's branching model is a git branching and release
2593management strategy that helps developers keep track of features, hotfixes,
2594and releases in bigger software projects. The git-flow library of git
2595subcommands helps automate some parts of the flow to make working with it a
2596lot easier.")
2597 (license license:bsd-2)))
2598
2599(define-public stgit
2600 (package
2601 (name "stgit")
2602 (version "2.5.3")
2603 (source
2604 (origin
2605 (method git-fetch)
2606 (uri (git-reference
2607 (url "https://github.com/stacked-git/stgit")
2608 (commit (string-append "v" version))))
2609 (file-name (git-file-name name version))
2610 (sha256
2611 (base32 "0pxhl7fnycs4bx46x9m8v33lsf5hwp0fhqyihlr4sf7ms4b7adsc"))))
2612 (build-system cargo-build-system)
2613 (arguments
2614 `(#:install-source? #f
2615 #:phases
2616 (modify-phases %standard-phases
2617 (add-after 'build 'build-extras
2618 (lambda _
2619 (substitute* "Documentation/Makefile"
2620 (("docbook2x-texi") "docbook2texi"))
2621 (setenv "PERL_PATH" "perl")
2622 (invoke "make" "-C" "Documentation" "info")
2623 (invoke "make" "-C" "completion" "stgit.bash")
2624 (invoke "make" "-C" "completion" "stg.fish")))
2625 (add-after 'install 'install-extras
2626 (lambda* (#:key outputs #:allow-other-keys)
2627 (let ((out (assoc-ref outputs "out")))
2628 (invoke "make" "-C" "Documentation" "install-info"
2629 (string-append "prefix=" out))
2630 (invoke "make" "-C" "completion" "install"
2631 (string-append "prefix=" out)
2632 (string-append "bashdir=" out "/etc/bash_completion.d/"))))))))
2633 (native-inputs
2634 (list pkg-config
2635 ;; For the documentation
2636 asciidoc
2637 docbook2x
2638 libxslt
2639 perl
2640 texinfo
2641 xmlto))
2642 (inputs (cons* openssl zlib curl (cargo-inputs 'stgit-2)))
2643 (home-page "https://stacked-git.github.io/")
2644 (synopsis "Stacked Git (StGit) manages Git commits as a stack of patches")
2645 (description "StGit uses a patch stack workflow. Each individual patch
2646focuses on a single concern, while a stack of patches forms a series of commits.
2647Patches are stored as normal git commits, allowing easy merging of StGit
2648patches into other repositories using standard Git.
2649
2650Features include:
2651@itemize
2652@item Import and export patches from Git with @command{stg commit} and
2653@command{stg uncommit}
2654@item Create new patches and add them to the stack with @command{stg new}
2655@item Update a patch from the working tree with @command{stg refresh} and
2656@command{stg edit}
2657@item See information about the stack or patch with @command{stg series} and
2658@command{stg show}
2659@item Export and send a series of patches by email using @command{stg email}
2660@end itemize")
2661 (license license:gpl2)))
2662
2663(define-public emacs-stgit
2664 (package
2665 (inherit stgit)
2666 (name "emacs-stgit")
2667 (version "0.17.1") ;from stgit.el
2668 (build-system emacs-build-system)
2669 (arguments
2670 (list
2671 #:tests? #f ; no tests
2672 #:lisp-directory "contrib"
2673 #:phases
2674 #~(modify-phases %standard-phases
2675 (add-after 'unpack 'patch-version-executables
2676 (lambda* (#:key inputs #:allow-other-keys)
2677 (emacs-substitute-variables "stgit.el"
2678 ("stgit-stg-program" (search-input-file inputs "/bin/stg")))
2679 (emacs-substitute-variables "stgit.el"
2680 ("stgit-git-program" (search-input-file inputs "/bin/git")))))
2681 (add-before 'install-license-files 'leave-lisp-directory
2682 (lambda _
2683 (chdir ".."))))))
2684 (inputs (list stgit git))
2685 (synopsis "Emacs major mode for StGit interaction")
2686 (description "This package a interactive tool to interact with git
2687branches using StGit.")
2688 (license license:gpl2+)))
2689
2690(define-public vcsh
2691 (package
2692 (name "vcsh")
2693 (version "2.0.5")
2694 (source
2695 (origin
2696 (method git-fetch)
2697 (uri (git-reference
2698 (url "https://github.com/RichiH/vcsh")
2699 (commit (string-append "v" version))))
2700 (file-name (git-file-name name version))
2701 (sha256
2702 (base32 "15lb09c2q261p1pp5r7j9k8389ybrd2q19xhnp1nnha6gs78i4wq"))))
2703 (build-system gnu-build-system)
2704 (native-inputs
2705 (list autoconf
2706 automake
2707 ;; for man page
2708 ronn-ng
2709 ;; for tests
2710 perl
2711 perl-test-harness
2712 perl-shell-command
2713 perl-test-most
2714 ;; for bash-completion
2715 pkg-config))
2716 (inputs
2717 (list git))
2718 (arguments
2719 '(#:phases
2720 (modify-phases %standard-phases
2721 (add-before 'bootstrap 'fix-version-gen
2722 (lambda _
2723 (call-with-output-file ".tarball-version"
2724 (lambda (port)
2725 (display version port))))))
2726 #:make-flags (list (string-append "PREFIX="
2727 (assoc-ref %outputs "out")))
2728 #:test-target "test"))
2729 (home-page "https://github.com/RichiH/vcsh")
2730 (synopsis "Version control system for @code{$HOME}")
2731 (description
2732 "vcsh version-controls configuration files in several Git repositories,
2733all in one single directory. They all maintain their working trees without
2734clobbering each other or interfering otherwise. By default, all Git
2735repositories maintained via vcsh store the actual files in @code{$HOME},
2736though this can be overridden.")
2737 (license license:gpl2+)))
2738
2739(define-public vcstool
2740 (package
2741 (name "vcstool")
2742 (version "0.3.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "vcstool" version))
2747 (sha256
2748 (base32 "0b7f68q25x9nxqa3xcg32js3qgp4jg99anwy2c7nd1jkw5iskcq4"))))
2749 (build-system pyproject-build-system)
2750 (arguments
2751 (list
2752 #:tests? #f ; network access is required
2753 #:phases
2754 #~(modify-phases %standard-phases
2755 (add-after 'wrap 'wrap-script
2756 (lambda _
2757 (wrap-program (string-append #$output "/bin/vcs")
2758 `("PATH" ":" prefix
2759 ,(list (string-append #$git "/bin")
2760 (string-append #$breezy "/bin")
2761 (string-append #$subversion "/bin")))))))))
2762 (native-inputs
2763 (list python-pyyaml
2764 python-setuptools
2765 python-wheel))
2766 (inputs
2767 (list bash-minimal
2768 breezy
2769 git
2770 subversion))
2771 (home-page "https://github.com/dirk-thomas/vcstool")
2772 (synopsis "Multiple VCS repository managing tool")
2773 (description
2774 "This package enables manipulating multiple version control repositories
2775with one command.")
2776 (license license:asl2.0)))
2777
2778(define-public git-test-sequence
2779 (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
2780 (package
2781 (name "git-test-sequence")
2782 (version (string-append "20140312." (string-take commit 7)))
2783 (source (origin
2784 (method git-fetch)
2785 (uri (git-reference
2786 ;; There are many other scripts in this directory; we
2787 ;; are interested in just one for this package.
2788 (url "https://github.com/dustin/bindir")
2789 (commit commit)))
2790 (file-name (git-file-name name version))
2791 (sha256
2792 (base32
2793 "1dcq0y16yznbv4k9h8gg90kv1gkn8r8dbvl4m2rpfd7q5nqhn617"))))
2794 (build-system trivial-build-system)
2795 (arguments
2796 `(#:modules ((guix build utils))
2797 #:builder (begin
2798 (use-modules (guix build utils))
2799 (let* ((source (assoc-ref %build-inputs "source"))
2800 (output (assoc-ref %outputs "out"))
2801 (bindir (string-append output "/bin"))
2802 (script "git-test-sequence"))
2803 (install-file (string-append source "/" script)
2804 bindir)
2805 #t))))
2806 (home-page "https://dustin.sallings.org/2010/03/28/git-test-sequence.html")
2807 (synopsis "Run a command over a sequence of commits")
2808 (description
2809 "git-test-sequence is similar to an automated git bisect except it’s
2810linear. It will test every change between two points in the DAG. It will
2811also walk each side of a merge and test those changes individually.")
2812 (license (license:x11-style "file://LICENSE")))))
2813
2814(define* (make-gitolite #:optional (extra-inputs '()))
2815 "Make a gitolite package object with EXTRA-INPUTS added to the binary
2816wrappers, to be used for optional gitolite extensions."
2817 (package
2818 (name "gitolite")
2819 (version "3.6.14")
2820 (source
2821 (origin
2822 (method git-fetch)
2823 (uri (git-reference
2824 (url "https://github.com/sitaramc/gitolite")
2825 (commit (string-append "v" version))))
2826 (file-name (git-file-name name version))
2827 (sha256
2828 (base32 "0qfl9qjs9nvgvl244rvidap8s202bq2gsmnxaylqrkj77az6l2h7"))))
2829 (build-system gnu-build-system)
2830 (arguments
2831 (list #:tests? #f ; no tests
2832 #:phases
2833 #~(modify-phases %standard-phases
2834 (delete 'configure)
2835 (delete 'build)
2836 (add-before 'install 'patch-scripts
2837 (lambda* (#:key inputs #:allow-other-keys)
2838 ;; This seems to take care of every shell script that
2839 ;; invokes Perl.
2840 (substitute* (find-files ".")
2841 ((" perl -")
2842 (string-append
2843 " " (search-input-file inputs "bin/perl") " -")))
2844
2845 (substitute* (find-files "src/triggers" ".*")
2846 ((" sed ")
2847 (string-append
2848 " " (search-input-file inputs "bin/sed") " ")))
2849
2850 (substitute*
2851 '("src/triggers/post-compile/update-gitweb-access-list"
2852 "src/triggers/post-compile/ssh-authkeys-split"
2853 "src/triggers/upstream")
2854 ((" grep ")
2855 (string-append
2856 " " (search-input-file inputs "bin/grep") " ")))
2857
2858 (substitute* "src/triggers/post-compile/ssh-authkeys"
2859 (("\\$glshell \\$user")
2860 (string-append
2861 #$output "/bin/gitolite-shell $user")))))
2862 (add-before 'install 'patch-source
2863 (lambda* (#:key inputs #:allow-other-keys)
2864 ;; Gitolite uses cat to test the readability of the
2865 ;; pubkey
2866 (substitute* "src/lib/Gitolite/Setup.pm"
2867 (("\"cat ")
2868 (string-append
2869 "\"" (search-input-file inputs "bin/cat") " "))
2870 (("\"ssh-keygen")
2871 (string-append
2872 "\"" (search-input-file inputs "bin/ssh-keygen"))))
2873
2874 (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
2875 "src/lib/Gitolite/Hooks/Update.pm")
2876 (("/usr/bin/perl")
2877 (search-input-file inputs "bin/perl")))
2878
2879 (substitute* "src/lib/Gitolite/Common.pm"
2880 (("\"ssh-keygen")
2881 (string-append
2882 "\"" (search-input-file inputs "bin/ssh-keygen")))
2883 (("\"logger\"")
2884 (string-append
2885 "\"" (search-input-file inputs "bin/logger") "\"")))
2886
2887 (substitute* "src/lib/Gitolite/Cache.pm"
2888 (("/usr/sbin/redis-server") "redis-server"))
2889
2890 (substitute* "src/commands/svnserve"
2891 (("/usr/bin/svnserve") "svnserve"))))
2892 (replace 'install
2893 (lambda* _
2894 (let* ((sharedir (string-append #$output "/share/gitolite"))
2895 (bindir (string-append #$output "/bin")))
2896 (mkdir-p sharedir)
2897 (mkdir-p bindir)
2898 (invoke "./install" "-to" sharedir)
2899 ;; Create symlinks for executable scripts in /bin.
2900 (for-each (lambda (script)
2901 (symlink (string-append sharedir "/" script)
2902 (string-append bindir "/" script)))
2903 '("gitolite" "gitolite-shell")))))
2904 (add-after 'install 'wrap-scripts
2905 (lambda* (#:key inputs #:allow-other-keys)
2906 (for-each (lambda (file-name)
2907 (wrap-program (string-append #$output file-name)
2908 `("PATH" ":" prefix
2909 ,(append
2910 (map (lambda (command)
2911 (dirname
2912 (search-input-file
2913 inputs
2914 (string-append "bin/" command))))
2915 '("chmod" ;coreutils
2916 "find"
2917 "git"))
2918 (map (lambda (dir)
2919 (string-append dir "/bin"))
2920 (list #$output
2921 #$@extra-inputs))))))
2922 '("/bin/gitolite" "/bin/gitolite-shell")))))))
2923 (inputs
2924 (append (list bash-minimal coreutils findutils git inetutils openssh perl)
2925 extra-inputs))
2926 (home-page "https://gitolite.com")
2927 (synopsis "Git access control layer")
2928 (description
2929 "Gitolite is an access control layer on top of Git, providing fine access
2930control to Git repositories.")
2931 (license license:gpl2)))
2932
2933(define-public gitolite (make-gitolite))
2934
2935(define-public gitile
2936 ;; Use an unreleased version to fix the gitile system test.
2937 (let ((commit "1feb300c0d3069b1180e62c5e989ac0ed353a248"))
2938 (package
2939 (name "gitile")
2940 (version (string-append "0.1.4-" (string-take commit 7)))
2941 (source
2942 (origin
2943 (method git-fetch)
2944 (uri (git-reference
2945 (url "https://git.lepiller.eu/git/gitile")
2946 (commit commit)))
2947 (file-name (git-file-name name version))
2948 (sha256
2949 (base32 "1yhqn54hx7p7sc3vc85vsx7315bxs313bv3i9lzx8q0zpzc0x7xh"))))
2950 (build-system gnu-build-system)
2951 (arguments
2952 `(#:imported-modules ((guix build guile-build-system)
2953 ,@%default-gnu-imported-modules)
2954 #:make-flags (list "GUILE_AUTO_COMPILE=0")
2955 #:phases
2956 (modify-phases %standard-phases
2957 (replace 'bootstrap
2958 (lambda _
2959 ;; The 'bootstrap' script lacks a shebang, leading to "Exec
2960 ;; format error" with glibc 2.35.
2961 (invoke "autoreconf" "-vfi")))
2962 (add-after 'install 'wrap-program
2963 (lambda* (#:key inputs outputs #:allow-other-keys)
2964 (use-modules (guix build guile-build-system))
2965 ;; Wrap the 'gitile' command to refer to the right modules.
2966 (let* ((out (assoc-ref outputs "out"))
2967 (commonmark (assoc-ref inputs "guile-commonmark"))
2968 (git (assoc-ref inputs "guile-git"))
2969 (bytes (assoc-ref inputs "guile-bytestructures"))
2970 (fibers (assoc-ref inputs "guile-fibers"))
2971 (gcrypt (assoc-ref inputs "guile-gcrypt"))
2972 (syntax-highlight (assoc-ref inputs "guile-syntax-highlight"))
2973 (deps (list out commonmark git bytes fibers gcrypt
2974 syntax-highlight))
2975 (guile (assoc-ref inputs "guile"))
2976 (effective (target-guile-effective-version))
2977 (mods (string-drop-right ;drop trailing colon
2978 (string-join deps
2979 (string-append "/share/guile/site/"
2980 effective ":")
2981 'suffix)
2982 1))
2983 (objs (string-drop-right
2984 (string-join deps
2985 (string-append "/lib/guile/" effective
2986 "/site-ccache:")
2987 'suffix)
2988 1)))
2989 (wrap-program (string-append out "/bin/gitile")
2990 `("GUILE_LOAD_PATH" ":" prefix (,mods))
2991 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))))))))
2992 (native-inputs
2993 (list autoconf automake guile-3.0 pkg-config))
2994 (inputs
2995 (list bash-minimal ;for wrap-program
2996 guile-3.0
2997 guile-commonmark
2998 guile-fibers
2999 guile-gcrypt
3000 guile-git
3001 guile-syntax-highlight
3002 guile-gnutls))
3003 (home-page "https://git.lepiller.eu/gitile")
3004 (synopsis "Simple Git forge written in Guile")
3005 (description "Gitile is a Git forge written in Guile that lets you
3006visualize your public Git repositories on a web interface.")
3007 (license license:agpl3+))))
3008
3009(define-public pre-commit
3010 (package
3011 (name "pre-commit") ;formerly known as python-pre-commit
3012 (version "4.6.2")
3013 (source
3014 (origin
3015 (method git-fetch) ; no tests in PyPI release
3016 (uri (git-reference
3017 (url "https://github.com/pre-commit/pre-commit")
3018 (commit (string-append "v" version))))
3019 (file-name (git-file-name name version))
3020 (sha256
3021 (base32 "1ia6v1xjqzpanhn5p6fwrr4f6gankpp57fqcv90pkzvkspshs8b8"))
3022 (modules '((guix build utils)))
3023 (snippet '(substitute* "setup.cfg"
3024 (("virtualenv>=20.10.0") ;our virtualenv (20.3.1) is fine
3025 "virtualenv>=20.0.8")))))
3026 (build-system pyproject-build-system)
3027 (arguments
3028 (list
3029 #:test-flags
3030 #~(append
3031 ;; Skip language-specific tests because they depend on language tools.
3032 (list "--ignore=tests/languages")
3033 ;; These tests rely on a hook that tries to install packages from pip.
3034 (map (lambda (test)
3035 (string-append "--deselect=tests/repository_test.py::"
3036 test))
3037 (list "test_additional_dependencies_roll_forward"
3038 "test_control_c_control_c_on_install"
3039 "test_invalidated_virtualenv"
3040 "test_local_python_repo"
3041 "test_repository_state_compatibility"
3042 "test_reinstall"
3043 "test_really_long_file_paths"))
3044 ;; XXX: These fail with AssertionError, unclear why.
3045 (map (lambda (test)
3046 (string-append "--deselect=tests/commands/"
3047 "install_uninstall_test.py::" test))
3048 (list "test_install_existing_hooks_no_overwrite"
3049 "test_uninstall_restores_legacy_hooks"
3050 "test_installed_from_venv")))
3051 #:phases
3052 #~(modify-phases %standard-phases
3053 (add-before 'check 'prepare-check-env
3054 (lambda _
3055 ;; Change from /homeless-shelter to /tmp for write permission.
3056 (setenv "HOME" "/tmp")
3057 ;; Environment variables used in the tests.
3058 (setenv "GIT_AUTHOR_NAME" "Your Name")
3059 (setenv "GIT_COMMITTER_NAME" "Your Name")
3060 (setenv "GIT_AUTHOR_EMAIL" "[email protected]")
3061 (setenv "GIT_COMMITTER_EMAIL" "[email protected]")
3062 ;; Some tests still fail with PermissionError. Make the source
3063 ;; tree writable.
3064 ;; (for-each make-file-writable (find-files "."))
3065 ;; Some tests will need a working git repository.
3066 (invoke "git" "init")
3067 (invoke "git" "config" "--global" "user.name" "Your Name")
3068 (invoke "git" "config" "--global" "user.email" "[email protected]"))))))
3069 (native-inputs
3070 (list git-minimal/pinned
3071 python-distlib
3072 python-pytest
3073 python-pytest-env
3074 python-re-assert
3075 python-setuptools
3076 python-wheel
3077 which))
3078 ;; Propagate because pre-commit is also used as a module.
3079 (propagated-inputs
3080 (list python-cfgv
3081 python-identify
3082 python-nodeenv
3083 python-pyyaml
3084 python-virtualenv))
3085 (home-page "https://pre-commit.com/")
3086 (synopsis "Framework for managing and maintaining pre-commit hooks")
3087 (description
3088 "Pre-commit is a multi-language package manager for pre-commit hooks. You
3089specify a list of hooks you want and pre-commit manages the installation and
3090execution of any hook written in any language before every commit.")
3091 (license license:expat)))
3092
3093(define-public mercurial
3094 (package
3095 (name "mercurial")
3096 (version "7.1")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (string-append "https://www.mercurial-scm.org/"
3101 "release/mercurial-" version ".tar.gz"))
3102 (patches (search-patches "mercurial-hg-extension-path.patch"))
3103 (sha256
3104 (base32 "1jz54akdnsp5frlbsr2xg71kbp2919v61gkkx7c7bi1q7k421ng8"))))
3105 (build-system gnu-build-system)
3106 (arguments
3107 (list
3108 #:imported-modules %pyproject-build-system-modules
3109 #:modules '((guix build gnu-build-system)
3110 ((guix build pyproject-build-system) #:prefix py:)
3111 (guix build utils))
3112 #:make-flags #~(list (string-append "PREFIX=" #$output))
3113 #:phases
3114 #~(modify-phases %standard-phases
3115 (delete 'configure)
3116 (add-after 'unpack 'patch-tests
3117 (lambda* (#:key inputs #:allow-other-keys)
3118 (substitute* (find-files "tests" "\\.(t|py)$")
3119 (("/bin/sh")
3120 (search-input-file inputs "bin/sh"))
3121 (("/usr/bin/env")
3122 (search-input-file inputs "bin/env")))))
3123 (add-before 'check 'configure-check
3124 (lambda* (#:key tests? #:allow-other-keys)
3125 (with-directory-excursion "tests"
3126 (substitute* "run-tests.py"
3127 ;; XXX: Adapt pip call to build daemon chroot.
3128 (("b\"install\", b\"\\.\"")
3129 "b\"install\", b\"--no-build-isolation\", b\".\"")
3130 ;; XXX: Log the actual PYTHONPATH.
3131 (("\"PYTHONPATH\"")
3132 "\"GUIX_PYTHONPATH\"")))))
3133 (add-before 'configure-check 'add-install-to-pythonpath
3134 (assoc-ref py:%standard-phases 'add-install-to-pythonpath))
3135 (add-after 'install 'wrap
3136 (assoc-ref py:%standard-phases 'wrap))
3137 (delete 'check)
3138 (add-after 'wrap 'check
3139 (lambda* (#:key tests? #:allow-other-keys)
3140 (with-directory-excursion "tests"
3141 ;; The following tests are known to fail.
3142 (for-each delete-file
3143 '(;; XXX: This test calls 'run-tests.py --with-hg=
3144 ;; `which hg`' and fails because there is no hg on
3145 ;; PATH from before (that's why we are building it!)?
3146 "test-hghave.t"
3147
3148 ;; This test is missing a debug line
3149 ;; mmapping $TESTTMP/a/.hg/store/00changelog.i (no-pure !)
3150 ;; but the relevant output is correct.
3151 "test-revlog-mmapindex.t"
3152
3153 ;; This test creates a shebang spanning multiple
3154 ;; lines which is difficult to substitute. It
3155 ;; only tests the test runner itself, which gets
3156 ;; thoroughly tested during the check phase anyway.
3157 "test-run-tests.t"
3158
3159 ;; These tests fail because the program is not
3160 ;; connected to a TTY in the build container.
3161 "test-nointerrupt.t"
3162 "test-transaction-rollback-on-sigpipe.t"
3163
3164 ;; FIXME: This gets killed but does not receive an interrupt.
3165 "test-commandserver.t"
3166
3167 ;; These tests get unexpected warnings about using
3168 ;; deprecated functionality in Python, but otherwise
3169 ;; succeed; try enabling for later Mercurial versions.
3170 "test-demandimport.py"
3171 "test-patchbomb-tls.t"
3172 ;; Similarly, this gets a more informative error
3173 ;; message from Python 3.10 than it expects.
3174 "test-http-bad-server.t"
3175
3176 ;; Only works when run in a hg-repo, not in an
3177 ;; extracted tarball
3178 "test-doctest.py"
3179
3180 ;; TODO: the fqaddr() call fails in the build
3181 ;; container, causing these server tests to fail.
3182 "test-hgwebdir.t"
3183 "test-http-branchmap.t"
3184 "test-pull-bundle.t"
3185 "test-push-http.t"
3186 "test-serve.t"
3187 "test-subrepo-deep-nested-change.t"
3188 "test-subrepo-recursion.t"
3189 ;; FIXME: Investigate why it failed.
3190 "test-convert-darcs.t"))
3191 (when tests?
3192 (invoke "./run-tests.py"
3193 ;; ‘make check’ does not respect ‘-j’.
3194 (string-append "-j" (number->string
3195 (parallel-job-count)))
3196 ;; The default time-outs are too low for many systems.
3197 ;; Raise them generously: Guix enforces its own.
3198 "--timeout" "86400"
3199 "--slowtimeout" "86400"
3200 ;; The test suite takes a long time and produces little
3201 ;; output by default. Prevent timeouts due to silence.
3202 "-v")))))
3203 (add-after 'check 'python-sanity-check
3204 (lambda* (#:key inputs outputs #:allow-other-keys)
3205 ((assoc-ref py:%standard-phases 'sanity-check)
3206 #:inputs `(("sanity-check.py" . ,#$(default-sanity-check.py))
3207 ,@inputs)
3208 #:outputs outputs))))))
3209 (native-inputs
3210 (list python-docutils
3211 ;; The following inputs are only needed to run the tests.
3212 python-setuptools
3213 python-setuptools-scm
3214 unzip
3215 which))
3216 (inputs
3217 (list python-wrapper
3218 python-roman))
3219 ;; Find third-party extensions.
3220 (native-search-paths
3221 (list (search-path-specification
3222 (variable "HGEXTENSIONPATH")
3223 (files (list
3224 ;; Cannot use the line below due to circular imports.
3225 ;;(version-major+minor (package-version python))
3226 "lib/python3.12/site-packages/hgext3rd")))))
3227 (home-page "https://www.mercurial-scm.org/")
3228 (synopsis "Decentralized version control system")
3229 (description
3230 "Mercurial is a free, distributed source control management tool. It
3231efficiently handles projects of any size and offers an easy and intuitive
3232interface.")
3233 (license license:gpl2+)))
3234
3235(define-public python-hg-evolve
3236 (package
3237 (name "python-hg-evolve")
3238 (version "11.1.3")
3239 (source
3240 (origin
3241 (method hg-fetch)
3242 (uri (hg-reference
3243 (url "https://www.mercurial-scm.org/repo/evolve")
3244 (changeset version)))
3245 (file-name (hg-file-name name version))
3246 (sha256
3247 (base32
3248 "09rq3hgbb6qjws0kymnh8lbglsc5yjby3b2bc0savs2agf88j83z"))))
3249 (build-system pyproject-build-system)
3250 (arguments
3251 ;; Tests need mercurial source code.
3252 (list #:tests? #f))
3253 (native-inputs (list python-setuptools))
3254 (propagated-inputs (list mercurial))
3255 (home-page "https://www.mercurial-scm.org/doc/evolution/")
3256 (synopsis "Flexible evolution of Mercurial history")
3257 (description "Evolve is a Mercurial extension for faster and safer mutable
3258history. It implements the changeset evolution concept for Mercurial.")
3259 (license license:gpl2)))
3260
3261(define-public hg-commitsigs
3262 ;; Latest tag is 11 years old.
3263 (let ((changeset "b53eb6862bff")
3264 (revision "0"))
3265 (package
3266 (name "hg-commitsigs")
3267 (version (git-version "0.1.0" revision changeset))
3268 (source (origin
3269 (method hg-fetch)
3270 (uri (hg-reference
3271 (url "https://foss.heptapod.net/mercurial/commitsigs")
3272 (changeset changeset)))
3273 (file-name (git-file-name name version))
3274 (sha256
3275 (base32
3276 "059gm66q06m6ayl4brsc517zkw3ahmz249b6xm1m32ac5y24wb9x"))))
3277 (build-system copy-build-system)
3278 (arguments
3279 (list
3280 #:imported-modules (append %pyproject-build-system-modules
3281 %copy-build-system-modules)
3282 #:modules `((guix build pyproject-build-system)
3283 (guix build copy-build-system)
3284 (guix build utils))
3285 #:install-plan
3286 #~`(("commitsigs.py"
3287 ,(string-append "lib/python"
3288 (python-version
3289 #$(this-package-native-input "python"))
3290 "/site-packages/hgext3rd/commitsigs.py")))
3291 #:phases
3292 #~(modify-phases %standard-phases
3293 (add-after 'unpack 'patch-paths
3294 (lambda _
3295 (substitute* "commitsigs.py"
3296 (("b'(gpg|openssl)'," _ bin)
3297 (format #f "b'~a'," (which bin)))))))))
3298 (native-inputs
3299 (list python))
3300 (inputs
3301 (list gnupg openssl))
3302 (home-page "https://foss.heptapod.net/mercurial/commitsigs")
3303 (synopsis "Automatic signing of changeset hashes")
3304 (description "This package provides a Mercurial extension for signing
3305the changeset hash of commits. The signure is embedded directly in the
3306changeset itself; there won't be any extra commits. Either GnuPG or OpenSSL
3307can be used for signing.")
3308 (license license:gpl2)))) ;per commitsigs.py
3309
3310;; XXX: Not maintained since 2019.
3311(define-public heatwave
3312 (package
3313 (name "heatwave")
3314 (version "1.2.1")
3315 (source
3316 (origin
3317 (method url-fetch)
3318 (uri (pypi-uri "heatwave" version))
3319 (sha256
3320 (base32 "1zzwmb9hvbyswzjgap02rrq8p44hb6xlzk1wd8w01mh2vva0xlx7"))))
3321 (build-system pyproject-build-system)
3322 (arguments
3323 (list #:tests? #f)) ;no tests in PyPI
3324 (native-inputs
3325 (list python-setuptools))
3326 (propagated-inputs
3327 (list python-click
3328 python-gitpython
3329 python-monthdelta))
3330 (home-page "https://github.com/james-stoup/heatwave")
3331 (synopsis "Heat map visualization of a git repository")
3332 (description
3333 "This package provides a way of visualizing a heat map of a git repo.")
3334 (license license:gpl3)))
3335
3336(define-public neon
3337 (package
3338 (name "neon")
3339 (version "0.32.2")
3340 (source (origin
3341 (method url-fetch)
3342 (uri (string-append "https://notroj.github.io/neon/neon-"
3343 version ".tar.gz"))
3344 (sha256
3345 (base32
3346 "11mj5zpp317dmds874wfwcpgij9i3scaahdi1xfzr5b2ii36crcq"))))
3347 (build-system gnu-build-system)
3348 (native-inputs
3349 (list perl pkg-config))
3350 (inputs
3351 (list libxml2 openssl zlib))
3352 (arguments
3353 `(;; FIXME: Add tests once reverse address lookup is fixed in glibc, see
3354 ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475
3355 #:tests? #f
3356 #:configure-flags '("--enable-shared"
3357 "--disable-static"
3358 ;; requires libgnutils-config, deprecated
3359 ;; in gnutls 2.8.
3360 ; "--with-ssl=gnutls")))
3361 "--with-ssl=openssl")))
3362 (home-page "https://notroj.github.io/neon/")
3363 (synopsis "HTTP and WebDAV client library")
3364 (description
3365 "Neon is an HTTP and WebDAV client library, with a C interface and the
3366following features:
3367@enumerate
3368@item High-level wrappers for common HTTP and WebDAV operations (GET, MOVE,
3369 DELETE, etc.);
3370@item low-level interface to the HTTP request/response engine, allowing the use
3371 of arbitrary HTTP methods, headers, etc.;
3372@item authentication support including Basic and Digest support, along with
3373 GSSAPI-based Negotiate on Unix, and SSPI-based Negotiate/NTLM on Win32;
3374@item SSL/TLS support using OpenSSL or GnuTLS, exposing an abstraction layer for
3375 verifying server certificates, handling client certificates, and examining
3376 certificate properties, smartcard-based client certificates are also
3377 supported via a PKCS#11 wrapper interface;
3378@item abstract interface to parsing XML using libxml2 or expat, and wrappers for
3379 simplifying handling XML HTTP response bodies;
3380@item WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
3381 property manipulation.
3382@end enumerate\n")
3383 (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
3384
3385(define-public subversion
3386 (package
3387 (name "subversion")
3388 (version "1.14.5")
3389 (source (origin
3390 (method url-fetch)
3391 (uri (string-append "mirror://apache/subversion/"
3392 "subversion-" version ".tar.bz2"))
3393 (sha256
3394 (base32
3395 "18a4avism0a7b1siikkm6v2snhanlmqqzl4p8hspp2vbfvkjk2p7"))))
3396 (build-system gnu-build-system)
3397 (arguments
3398 (list
3399 ;; Running the tests in parallel causes test failures on i686-linux.
3400 ;; The issue was reported to [email protected], as suggested
3401 ;; at https://subversion.apache.org/reporting-issues.
3402 #:parallel-tests? #f
3403 #:configure-flags #~(list "--enable-static=no")
3404 #:phases
3405 #~(modify-phases %standard-phases
3406 (add-after 'configure 'patch-libtool-wrapper-ls
3407 (lambda* (#:key inputs #:allow-other-keys)
3408 ;; This substitution allows tests svnauthz_tests and svnlook_tests
3409 ;; to pass. These tests execute svnauthz and svnlook through
3410 ;; their libtool wrapper scripts from svn hooks, whose empty
3411 ;; environments cause "ls: command not found" errors. It would be
3412 ;; nice if this fix ultimately made its way into libtool.
3413 (substitute* "libtool"
3414 (("\\\\`ls")
3415 (string-append "\\`" (search-input-file inputs "bin/ls"))))))
3416 (add-before 'build 'patch-test-sh
3417 (lambda _
3418 (substitute* "subversion/tests/libsvn_repos/repos-test.c"
3419 (("#!/bin/sh") (string-append "#!" (which "sh"))))))
3420 (add-before 'check 'set-PARALLEL
3421 (lambda* (#:key parallel-tests? #:allow-other-keys)
3422 (if parallel-tests?
3423 (setenv "PARALLEL" (number->string (parallel-job-count)))
3424 (simple-format #t "parallel-tests? are disabled\n"))))
3425 (add-after 'install 'install-perl-bindings
3426 (lambda _
3427 ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
3428 (invoke "make" "swig-pl-lib")
3429 ;; FIXME: Test failures.
3430 ;; (invoke "make" "check-swig-pl")
3431 (invoke "make" "install-swig-pl-lib")
3432
3433 ;; Set the right installation prefix.
3434 (with-directory-excursion "subversion/bindings/swig/perl/native"
3435 (invoke "perl" "Makefile.PL" "NO_PERLLOCAL=1"
3436 (string-append "PREFIX=" #$output))
3437 (invoke "make" "install"
3438 (string-append "OTHERLDFLAGS=-Wl,-rpath="
3439 #$output "/lib"))))))))
3440 (native-inputs
3441 (list pkg-config
3442 ;; For the Perl bindings.
3443 swig-4.0))
3444 (inputs
3445 (list apr
3446 apr-util
3447 lz4
3448 perl
3449 python-wrapper
3450 serf
3451 sqlite
3452 utf8proc
3453 zlib))
3454 (home-page "https://subversion.apache.org/")
3455 (synopsis "Revision control system")
3456 (description
3457 "@dfn{Subversion} (svn) exists to be recognized and adopted as a
3458centralized version control system characterized by its
3459reliability as a safe haven for valuable data; the simplicity of its model and
3460usage; and its ability to support the needs of a wide variety of users and
3461projects, from individuals to large-scale enterprise operations.")
3462 (license license:asl2.0)))
3463
3464(define-public rcs
3465 (package
3466 (name "rcs")
3467 (version "5.10.1")
3468 (source (origin
3469 (method url-fetch)
3470 (uri (string-append "mirror://gnu/rcs/rcs-"
3471 version ".tar.lz"))
3472 (sha256
3473 (base32
3474 "1iac4d1dhsfy5zb0n3p605pihdq702v06r4g8vi8b2saf88gxpa3"))))
3475 (build-system gnu-build-system)
3476 (arguments `(#:phases
3477 (modify-phases %standard-phases
3478 (add-after 'install 'install-rcsfreeze
3479 (lambda* (#:key outputs #:allow-other-keys)
3480 (let* ((out (assoc-ref outputs "out"))
3481 (bin (string-append out "/bin"))
3482 (man1 (string-append out "/share/man/man1")))
3483 (chmod "src/rcsfreeze" #o755)
3484 (install-file "src/rcsfreeze" bin)
3485 (install-file "man/rcsfreeze.1" man1)))))))
3486 (native-inputs (list ed lzip))
3487 (home-page "https://www.gnu.org/software/rcs/")
3488 (synopsis "Per-file local revision control system")
3489 (description
3490 "RCS is the original Revision Control System. It works on a
3491file-by-file basis, in contrast to subsequent version control systems such as
3492CVS, Subversion, and Git. This can make it suitable for system
3493administration files, for example, which are often inherently local to one
3494machine.")
3495 (license license:gpl3+)))
3496
3497(define-public rcs-blame
3498 (package
3499 (name "rcs-blame")
3500 (version "1.3.1-20210207")
3501 (source (origin
3502 (method url-fetch)
3503 (uri (string-append
3504 "https://invisible-mirror.net/archives/rcs-blame/blame-"
3505 version ".tgz"))
3506 (sha256
3507 (base32
3508 "1j0brsvdx3hlbwchddafh8r2xmxv5vg4ahpd68v4bb9xhcq6pcih"))))
3509 (build-system gnu-build-system)
3510 (home-page "https://invisible-island.net/rcs-blame/rcs-blame.html")
3511 (synopsis "Display the last modification for each line in an RCS file")
3512 (description
3513 "@code{blame} outputs an annotated revision from each RCS file. An
3514annotated RCS file describes the revision and date in which each line was
3515added to the file, and the author of each line.")
3516 (license license:gpl2+)))
3517
3518(define-public rcshist
3519 (package
3520 (name "rcshist")
3521 (version "1.04-20190106")
3522 (source (origin
3523 (method url-fetch)
3524 (uri (string-append
3525 "https://invisible-mirror.net/archives/rcshist/rcshist-"
3526 version ".tgz"))
3527 (sha256
3528 (base32
3529 "01ab3xwgm934lxr8bm758am3vxwx4hxx7cc9prbgqj5nh30vdg1n"))))
3530 (build-system gnu-build-system)
3531 (home-page "https://invisible-island.net/rcshist/rcshist.html")
3532 (synopsis "Display RCS change history")
3533 (description
3534 "The @code{rcshist} utility displays the complete revision history of a
3535set of RCS files including log messages and patches. It can also display the
3536patch associated with a particular revision of an RCS file.")
3537 (license (list license:bsd-2
3538 license:bsd-3)))) ; bsd_queue.h
3539
3540(define-public cvs
3541 (package
3542 (name "cvs")
3543 (version "1.12.13")
3544 (source (origin
3545 (method url-fetch)
3546 (uri (string-append
3547 "https://ftp.gnu.org/non-gnu/cvs/source/feature/"
3548 version "/cvs-" version ".tar.bz2"))
3549 (patches (search-patches "cvs-CVE-2017-12836.patch"))
3550 (sha256
3551 (base32
3552 "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq"))))
3553 (build-system gnu-build-system)
3554 (arguments
3555 ;; XXX: The test suite looks flawed, and the package is obsolete anyway.
3556 (list
3557 #:tests? #f
3558 #:configure-flags
3559 #~(list
3560 "--with-external-zlib"
3561 "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration")
3562 #:phases
3563 #~(modify-phases %standard-phases
3564 (add-after 'unpack 'fix-include
3565 (lambda _
3566 (substitute* "lib/sighandle.c"
3567 (("#ifdef STDC_HEADERS" all)
3568 (string-append "#define STDC_HEADERS 1\n" all))))))))
3569 (inputs (list zlib nano)) ; the default editor
3570 (home-page "https://cvs.nongnu.org")
3571 (synopsis "Historical centralized version control system")
3572 (description
3573 "CVS is a version control system, an important component of Source
3574Configuration Management (SCM). Using it, you can record the history of
3575sources files, and documents. It fills a similar role to the free software
3576RCS, PRCS, and Aegis packages.")
3577 (properties '((lint-hidden-cpe-vendors . ("jenkins"))))
3578 (license license:gpl1+)))
3579
3580(define-public cvs-fast-export
3581 (package
3582 (name "cvs-fast-export")
3583 (version "1.68")
3584 (source
3585 (origin
3586 (method git-fetch)
3587 (uri (git-reference
3588 (url "https://gitlab.com/esr/cvs-fast-export")
3589 (commit version)))
3590 (sha256
3591 (base32
3592 "17225lamdw8rf2yk76rhx8zxhzqjhv88ig3ng21qgvxbhl52wnzm"))))
3593 (build-system gnu-build-system)
3594 (arguments
3595 (list
3596 ;; Tests require a lot of dependencies and are glacially slow.
3597 #:tests? #f
3598 #:phases
3599 #~(modify-phases %standard-phases
3600 (delete 'configure))
3601 #:make-flags
3602 #~(list (string-append "CC=" #$(cc-for-target))
3603 (string-append "CFLAGS+=-Wno-error=calloc-transposed-args")
3604 (string-append "prefix?=" #$output))))
3605 (inputs
3606 (list git python-wrapper))
3607 (native-inputs
3608 (list ruby-asciidoctor/minimal
3609 bison
3610 flex))
3611 (home-page "http://www.catb.org/esr/cvs-fast-export/")
3612 (synopsis "Export an RCS or CVS history as a fast-import stream")
3613 (description
3614 "This program analyzes a collection of RCS files in a CVS repository (or
3615outside of one) and, when possible, emits an equivalent history in the form of
3616a fast-import stream. Not all possible histories can be rendered this way;
3617the program tries to emit useful warnings when it can't.
3618
3619The program can also produce a visualization of the resulting commit
3620@acronym{DAG, directed acyclic graph} in the input format of
3621@uref{http://www.graphviz.org, Graphviz}. The package also includes
3622@command{cvssync}, a tool for mirroring masters from remote CVS hosts.")
3623 (license license:gpl2+)))
3624
3625(define-public vc-dwim
3626 (package
3627 (name "vc-dwim")
3628 (version "1.10")
3629 (source (origin
3630 (method url-fetch)
3631 (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-"
3632 version ".tar.xz"))
3633 (sha256
3634 (base32
3635 "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph"))))
3636 (build-system gnu-build-system)
3637 (inputs (list perl))
3638 (native-inputs
3639 (list emacs-minimal ; for `ctags'
3640 inetutils)) ; for `hostname', used in the tests
3641 (home-page "https://www.gnu.org/software/vc-dwim/")
3642 (synopsis "Version-control-agnostic ChangeLog diff and commit tool")
3643 (description
3644 "The vc-dwim package contains two tools, \"vc-dwim\" and \"vc-chlog\".
3645vc-dwim is a tool that simplifies the task of maintaining a ChangeLog and
3646using version control at the same time, for example by printing a reminder
3647when a file change has been described in the ChangeLog but the file has not
3648been added to the VC. vc-chlog scans changed files and generates
3649standards-compliant ChangeLog entries based on the changes that it detects.")
3650 (license license:gpl3+)))
3651
3652(define-public diffstat
3653 (package
3654 (name "diffstat")
3655 (version "1.65")
3656 (source (origin
3657 (method url-fetch)
3658 (uri
3659 (list
3660 (string-append "ftp://invisible-island.net/diffstat/"
3661 "diffstat-" version ".tgz")
3662 (string-append "http://invisible-mirror.net/archives/diffstat/"
3663 "diffstat-" version ".tgz")))
3664 (sha256
3665 (base32
3666 "12m2aysq6syw83bn4gqhpm284a2ran8w6m8pja2wvsvdj8j79wlc"))))
3667 (build-system gnu-build-system)
3668 (home-page "https://invisible-island.net/diffstat/")
3669 (synopsis "Make histograms from the output of @command{diff}")
3670 (description
3671 "Diffstat reads the output of @command{diff} and displays a histogram of
3672the insertions, deletions, and modifications per file. It is useful for
3673reviewing large, complex patch files.")
3674 (license (license:x11-style "file://COPYING"))))
3675
3676(define-public cssc
3677 (package
3678 (name "cssc")
3679 (version "1.4.1")
3680 (source (origin
3681 (method url-fetch)
3682 (uri (string-append "mirror://gnu/" name "/CSSC-"
3683 version ".tar.gz"))
3684 (sha256
3685 (base32
3686 "1vsisqq573xjr2qpn19iwmpqgl3mq03m790akpa4rvj60b4d1gni"))))
3687 (build-system gnu-build-system)
3688 (arguments
3689 `(#:phases
3690 (modify-phases %standard-phases
3691 (add-before 'check 'precheck
3692 (lambda _
3693 (begin
3694 (substitute* "tests/common/test-common"
3695 (("/bin/pwd") (which "pwd")))
3696
3697 (substitute* "tests/prt/all-512.sh"
3698 (("/bin/sh") (which "sh")))
3699
3700 (for-each
3701 (lambda (file)
3702 (substitute* file (("egrep") "grep -E")))
3703 '("tests/common/test-common"
3704 "tests/admin/comment.sh"
3705 "tests/cdc/2comment.sh"
3706 "tests/cdc/4order.sh"
3707 "tests/get/subst.sh"))
3708
3709 ;; XXX: This test has no hope of passing until there is a "nogroup"
3710 ;; entry (or at least some group to which the guix builder does
3711 ;; not belong) in the /etc/group file of the build environment.
3712 ;; Currently we do not have such a group. Disable this test for now.
3713 (substitute* "tests/Makefile"
3714 (("test-delta ") ""))))))))
3715 ;; These are needed for the tests
3716 (native-inputs (list git cvs))
3717 (home-page "https://www.gnu.org/software/cssc/")
3718 (synopsis "File-based version control like SCCS")
3719 (description "GNU CSSC provides a replacement for the legacy Unix source
3720code control system SCCS. This allows old code still under that system to be
3721accessed and migrated on modern systems.")
3722 (license license:gpl3+)))
3723
3724(define-public tig
3725 (package
3726 (name "tig")
3727 (version "2.6.1")
3728 (source
3729 (origin
3730 (method git-fetch)
3731 (uri (git-reference
3732 (url "https://github.com/jonas/tig")
3733 (commit (string-append "tig-" version))))
3734 (file-name (git-file-name name version))
3735 (sha256
3736 (base32 "1ixhi5jx1acg6hdq66q4zjm6zyy62w5jrddci4qrn7v7pbdavyb5"))))
3737 (build-system gnu-build-system)
3738 (arguments
3739 (list
3740 #:phases
3741 #~(modify-phases %standard-phases
3742 (add-after 'install 'install-doc
3743 (lambda _
3744 (invoke "make" "install-doc")))
3745 (add-after 'install 'install-completions
3746 (lambda _
3747 (let ((share (string-append #$output "/share")))
3748 (mkdir-p (string-append share "/bash-completion/completions"))
3749 (mkdir-p (string-append share "/zsh/site-functions"))
3750 (copy-file "contrib/tig-completion.bash"
3751 (string-append share "/bash-completion/completions/tig"))
3752 (copy-file "contrib/tig-completion.zsh"
3753 (string-append share "/zsh/site-functions/_tig"))))))
3754 #:test-target "test"
3755 #:tests? #f)) ; tests require access to /dev/tty
3756 (native-inputs
3757 (list asciidoc autoconf automake docbook-xsl libxml2 pkg-config xmlto))
3758 (inputs
3759 (list ncurses readline))
3760 (home-page "https://jonas.github.io/tig/")
3761 (synopsis "Ncurses-based text user interface for Git")
3762 (description
3763 "Tig is an ncurses text user interface for Git, primarily intended as
3764a history browser. It can also stage hunks for commit, or colorize the
3765output of the @code{git} command.")
3766 (license license:gpl2+)))
3767
3768(define-public findnewest
3769 (package
3770 (name "findnewest")
3771 (version "0.3")
3772 (source
3773 (origin
3774 (method git-fetch)
3775 (uri (git-reference
3776 (url "https://github.com/0-wiz-0/findnewest")
3777 (commit (string-append "findnewest-" version))))
3778 (file-name (git-file-name name version))
3779 (sha256
3780 (base32 "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"))))
3781 (build-system gnu-build-system)
3782 (native-inputs (list autoconf automake))
3783 (home-page "https://github.com/0-wiz-0/findnewest/releases")
3784 (synopsis "Print the modification time of the latest file")
3785 (description
3786 "Recursively find the newest file in a file tree and print its
3787modification time.")
3788 (license license:bsd-2)))
3789
3790(define-public libfossil
3791 (package
3792 (name "libfossil")
3793 (version "0.6.1")
3794 (source
3795 (origin
3796 (method fossil-fetch)
3797 (uri (fossil-reference
3798 (uri "https://fossil.wanderinghorse.net/r/libfossil")
3799 (check-in version)))
3800 (sha256
3801 (base32 "16zrha8vb4dwfmyq86iaz2xz4k91dh018bk94xkxgqbyrr33nm7y"))
3802 (modules '((guix build utils)
3803 (ice-9 ftw)
3804 (srfi srfi-26)))
3805 (snippet
3806 #~(begin
3807 (define (delete-all-but directory . preserve)
3808 (with-directory-excursion directory
3809 (let* ((pred (negate (cut member <>
3810 (cons* "." ".." preserve))))
3811 (items (scandir "." pred)))
3812 (for-each (cut delete-file-recursively <>) items))))
3813 (delete-all-but "autosetup" "proj.tcl" "wh-common.tcl")
3814 (delete-file-recursively "extsrc")))))
3815 (build-system gnu-build-system)
3816 (arguments
3817 (list #:configure-flags
3818 #~(list "--no-debug" "--no-fnc" ;TODO: C++ and Tcl binding?
3819 (string-append "--with-sqlite="
3820 #$(this-package-input "sqlite"))
3821 (string-append "--soname=libfossil.so"))
3822 #:phases
3823 #~(modify-phases %standard-phases
3824 (replace 'configure
3825 (lambda* (#:key configure-flags #:allow-other-keys)
3826 (apply invoke "autosetup"
3827 (string-append "--prefix=" #$output)
3828 configure-flags)))
3829 (replace 'check
3830 (lambda* (#:key tests? #:allow-other-keys)
3831 (when tests?
3832 (substitute* "sanity-checks.sh"
3833 ;; FIXME: these tests requires a Fossil checkout.
3834 (("\\./f-sanity.*") "")
3835 (("\\./f-parseparty.*") ""))
3836 (setenv "LD_LIBRARY_PATH" (getcwd))
3837 (invoke "./sanity-checks.sh")))))))
3838 (native-inputs (list autosetup))
3839 (inputs (list sqlite-next zlib))
3840 (home-page "https://fossil.wanderinghorse.net/r/libfossil")
3841 (synopsis "Unofficial Fossil SCM Library API")
3842 (description
3843 "@code{libfossil} is an alternative interface into Fossil repositories,
3844as opposed to a replacement for the core fossil application,
3845intended for new ways to access and manipulate fossil repositories.")
3846 (license license:bsd-2)))
3847
3848(define-public fnc
3849 (let ((check-in
3850 "c158d7ac2175078b4b783157be92de38aa627dc1a237febab9ec92093420cedb")
3851 (revision "0"))
3852 (package
3853 (name "fnc")
3854 (version (fossil-version "0.19" revision check-in))
3855 (source
3856 (origin
3857 (method fossil-fetch)
3858 (uri (fossil-reference
3859 (uri "https://fnc.sh")
3860 (check-in check-in)))
3861 (file-name (fossil-file-name name version))
3862 (sha256
3863 (base32 "00n3qrd34nccxdwwbvs9zikhz6wps6qgbvk4mfww46mshvg7mxdn"))
3864 (modules '((guix build utils)))
3865 (snippet #~(begin
3866 (delete-file-recursively "lib")
3867 (substitute* (find-files "." "\\.c$")
3868 (("^#include \"libfossil.h\"")
3869 "#include <fossil-scm/libfossil.h>"))
3870 (substitute* "fnc.bld.mk"
3871 ((" \\$\\{SQLITE_OBJS\\} \\$\\{FOSSIL_OBJS\\}") "")
3872 (("-lm -lutil -lz ") "")
3873 ;; Fix cross-compiling.
3874 (("install -s") "install"))))))
3875 (build-system gnu-build-system)
3876 (arguments
3877 (list
3878 #:phases #~(modify-phases %standard-phases
3879 (delete 'configure))
3880 #:tests? #f ;no tests
3881 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
3882 "LDFLAGS=-lfossil -lsqlite3"
3883 (string-append "PREFIX=" #$output))))
3884 (inputs (list libfossil ncurses sqlite-next))
3885 (home-page "https://fnc.sh")
3886 (synopsis "Interactive text-based user interface for Fossil")
3887 (description "fnc uses ncurses and libfossil to create a fossil user
3888interface in the terminal. It can view local changes at the hunk level to
3889prepare atomic commits.")
3890 (license license:isc))))
3891
3892(define-public myrepos
3893 (package
3894 (name "myrepos")
3895 (version "1.20180726")
3896 (source
3897 (origin
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "git://myrepos.branchable.com/myrepos")
3901 (commit version)))
3902 (file-name (string-append name "-" version "-checkout"))
3903 (sha256
3904 (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5"))))
3905 (build-system gnu-build-system)
3906 (arguments
3907 '(#:test-target "test"
3908 #:make-flags (list (string-append "PREFIX=" %output))
3909 #:phases
3910 (modify-phases %standard-phases
3911 (delete 'configure)
3912 (add-after 'install 'wrap-webcheckout
3913 (lambda* (#:key inputs outputs #:allow-other-keys)
3914 (let ((out (assoc-ref outputs "out")))
3915 (wrap-program (string-append out "/bin/webcheckout")
3916 `("PERL5LIB" ":" prefix
3917 ,(map (lambda (i) (string-append (assoc-ref inputs i)
3918 "/lib/perl5/site_perl"))
3919 '("perl-encode-locale" "perl-http-date"
3920 "perl-http-message" "perl-html-parser" "perl-libwww"
3921 "perl-uri" "perl-try-tiny"))))))))))
3922 (inputs
3923 (list bash-minimal ;for wrap-program
3924 perl
3925 perl-encode-locale
3926 perl-html-parser
3927 perl-http-date
3928 perl-http-message
3929 perl-libwww
3930 perl-try-tiny
3931 perl-uri))
3932 (home-page "https://myrepos.branchable.com/")
3933 (synopsis "Multiple repository management tool")
3934 (description
3935 "Myrepos provides the @code{mr} command, which maps an operation (e.g.,
3936fetching updates) over a collection of version control repositories. It
3937supports a large number of version control systems: Git, Subversion,
3938Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
3939 (license license:gpl2+)))
3940
3941(define-public grokmirror
3942 (package
3943 (name "grokmirror")
3944 (version "2.0.12")
3945 (source
3946 (origin
3947 (method git-fetch)
3948 (uri (git-reference
3949 (url (string-append "https://git.kernel.org/pub/scm/"
3950 "utils/grokmirror/grokmirror.git"))
3951 (commit (string-append "v" version))))
3952 (file-name (git-file-name name version))
3953 (sha256
3954 (base32 "0plmd753pjqficvqk4jn8rjp43j775c4rjq6ja04jqa89rq1ak71"))))
3955 (build-system pyproject-build-system)
3956 (arguments
3957 (list
3958 #:tests? #f ;no test suite
3959 #:phases
3960 #~(modify-phases %standard-phases
3961 (add-after 'install 'install-manpages
3962 (lambda _
3963 (let* ((man (string-append #$output "/man/man1/")))
3964 (for-each (lambda (file)
3965 (install-file file man))
3966 (find-files "." "\\.1$"))))))))
3967 (native-inputs (list python-setuptools))
3968 (propagated-inputs (list python-packaging python-requests))
3969 (home-page
3970 "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git")
3971 (synopsis "Framework to smartly mirror git repositories")
3972 (description "Grokmirror enables replicating large git repository
3973collections efficiently. Mirrors decide to clone and update repositories
3974based on a manifest file published by servers.")
3975 (license license:gpl3+)))
3976
3977(define-public patatt
3978 (package
3979 (name "patatt")
3980 (version "0.6.3")
3981 (source
3982 (origin
3983 (method git-fetch)
3984 (uri (git-reference
3985 (url "https://git.kernel.org/pub/scm/utils/patatt/patatt.git")
3986 (commit (string-append "v" version))))
3987 (file-name (git-file-name name version))
3988 (sha256
3989 (base32 "1brak6kwnwbz8739aaxxks4nyaxrlldscfmzxdcqxi24afiw3h8z"))))
3990 (build-system pyproject-build-system)
3991 (arguments
3992 ;; XXX: No tests in this release, but they are there on master.
3993 (list #:tests? #f))
3994 (native-inputs (list python-setuptools))
3995 (propagated-inputs (list python-pynacl))
3996 (home-page "https://git.kernel.org/pub/scm/utils/patatt/patatt.git")
3997 (synopsis "Tool for cryptographic patch attestation")
3998 (description "This utility provides end-to-end cryptographic attestation
3999of patches sent via mail. It does so by adapting the DKIM email signature
4000standard to include cryptographic signatures via the X-Developer-Signature
4001email header.")
4002 (license license:expat-0)))
4003
4004(define-public b4
4005 (package
4006 (name "b4")
4007 (version "0.15.2")
4008 (source
4009 (origin
4010 (method git-fetch)
4011 (uri (git-reference
4012 (url "https://git.kernel.org/pub/scm/utils/b4/b4.git")
4013 (commit (string-append "v" version))))
4014 (file-name (git-file-name name version))
4015 (sha256
4016 (base32
4017 "00h27hcdj13gq8lg408mjr6cpjzxlmy6sanzagj319lh2bfhndin"))))
4018 (build-system pyproject-build-system)
4019 (arguments
4020 (list
4021 #:tests? (not (%current-target-system)) ; git path is hardcoded.
4022 #:phases
4023 #~(modify-phases %standard-phases
4024 ;; This ensures git is present when called.
4025 (add-after 'unpack 'hardcode-git-bin
4026 (lambda* (#:key inputs #:allow-other-keys)
4027 (substitute* (find-files "src/b4" "\\.py$")
4028 (("\\['git'")
4029 (string-append
4030 "['" (search-input-file inputs "bin/git") "'"))))))))
4031 (inputs
4032 (list git-filter-repo
4033 git-minimal
4034 patatt
4035 python-dkimpy
4036 python-dnspython
4037 python-requests))
4038 (native-inputs
4039 (list python-anyio
4040 python-pytest
4041 python-pytest-asyncio
4042 python-setuptools
4043 python-textual))
4044 (home-page "https://b4.docs.kernel.org/en/latest/")
4045 (synopsis "Tool for working with patches in public-inbox archives")
4046 (description
4047 "The @code{b4} command is designed to make it easier to participate in
4048patch-based workflows for projects that have public-inbox archives.
4049
4050Features include:
4051@itemize
4052@item downloading a thread's mbox given a message ID
4053@item processing an mbox so that is ready to be fed to @code{git-am}
4054@item creating templated replies for processed patches and pull requests
4055@item submitting cryptographic attestation for patches.
4056@end itemize")
4057 (license license:gpl2+)))
4058
4059(define-public git-annex-remote-rclone
4060 (package
4061 (name "git-annex-remote-rclone")
4062 (version "0.8")
4063 (source
4064 (origin
4065 (method git-fetch)
4066 (uri (git-reference
4067 (url "https://github.com/DanielDent/git-annex-remote-rclone")
4068 (commit (string-append "v" version))))
4069 (file-name (git-file-name name version))
4070 (sha256
4071 (base32
4072 "03m95620fp891ki6rsqw5nkydwx84nag5nhyvzfi3q64fpnpmb07"))))
4073 (build-system trivial-build-system)
4074 (arguments
4075 `(#:modules ((guix build utils))
4076 #:builder
4077 (begin
4078 (use-modules (guix build utils))
4079 (let ((bash (search-input-file %build-inputs "/bin/bash"))
4080 (rclone (search-input-file %build-inputs "/bin/rclone")))
4081 (copy-file (string-append (assoc-ref %build-inputs "source")
4082 "/git-annex-remote-rclone")
4083 "git-annex-remote-rclone")
4084 (substitute* "git-annex-remote-rclone"
4085 (("/bin/bash") bash)
4086 (("runcmd rclone") (string-append "runcmd " rclone)))
4087 (install-file "git-annex-remote-rclone"
4088 (string-append %output "/bin"))
4089 #t))))
4090 (inputs
4091 (list bash rclone))
4092 (home-page "https://github.com/DanielDent/git-annex-remote-rclone")
4093 (synopsis "Use rclone-supported cloud storage providers with git-annex")
4094 (description "This wrapper around rclone makes any destination supported
4095by rclone usable with git-annex.")
4096 (license license:gpl3+)))
4097
4098(define-public fossil
4099 (package
4100 (name "fossil")
4101 (version "2.28")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (string-append
4106 "https://fossil-scm.org/home/tarball/version-" version
4107 "/fossil-" version ".tar.gz"))
4108 (sha256
4109 (base32 "1lw3ridv2id4hf5ksrpjwf7fv65wzs81wli4ksc0qr4h3xfyi66b"))))
4110 (build-system gnu-build-system)
4111 (native-inputs
4112 (list tcl ;for configuration only
4113 which ;for tests only
4114 ed)) ;ditto
4115 (inputs
4116 ;; Need sqlite >= 3.43.0.
4117 (list openssl zlib sqlite-next))
4118 (arguments
4119 `(#:configure-flags (list "--with-openssl=auto"
4120 "--enable-json"
4121 "--disable-internal-sqlite")
4122 #:test-target "test"
4123 #:phases (modify-phases %standard-phases
4124 (add-after 'patch-source-shebangs 'patch-sh
4125 (lambda _
4126 (substitute* '("auto.def")
4127 (("/bin/sh") (which "sh")))))
4128 (replace 'configure
4129 (lambda* (#:key outputs (configure-flags '())
4130 #:allow-other-keys)
4131 ;; The 'configure' script is not an autoconf script and
4132 ;; chokes on unrecognized options.
4133 (apply invoke
4134 "./configure"
4135 (string-append "--prefix="
4136 (assoc-ref outputs "out"))
4137 configure-flags)))
4138 (add-before 'check 'test-setup
4139 (lambda _
4140 (setenv "USER" "guix")
4141 (setenv "TZ" "UTC"))))))
4142 (home-page "https://fossil-scm.org")
4143 (synopsis "Software configuration management system")
4144 (description
4145 "Fossil is a distributed source control management system which supports
4146access and administration over HTTP CGI or via a built-in HTTP server. It has
4147a built-in wiki, built-in file browsing, built-in tickets system, etc.")
4148 (properties
4149 '((release-monitoring-url
4150 . "https://fossil-scm.org/home/uv/latest-release.md")))
4151 (license (list license:public-domain ;src/miniz.c, src/shell.c
4152 license:bsd-2))))
4153
4154(define-public pijul
4155 (package
4156 (name "pijul")
4157 (version "1.0.0-beta.9")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (crate-uri "pijul" version))
4162 (file-name (string-append name "-" version ".tar.gz"))
4163 (sha256
4164 (base32 "1lk261rrk4xy60d4akfn8mrrqxls28kf9mzrjcrxdzbdysml66n5"))))
4165 (build-system cargo-build-system)
4166 (arguments
4167 (list
4168 #:install-source? #f
4169 #:features '(list "git")
4170 #:phases
4171 #~(modify-phases %standard-phases
4172 (add-after 'install 'install-extras
4173 (lambda* (#:key native-inputs outputs #:allow-other-keys)
4174 (let* ((out (assoc-ref outputs "out"))
4175 (share (string-append out "/share"))
4176 (bash-completions-dir
4177 (string-append out "/etc/bash_completion.d/"))
4178 (zsh-completions-dir
4179 (string-append share "/zsh/site-functions"))
4180 (fish-completions-dir
4181 (string-append share "/fish/vendor_completions.d"))
4182 (elvish-completions-dir
4183 (string-append share "/elvish/lib"))
4184 (pijul (if #$(%current-target-system)
4185 (search-input-file native-inputs "/bin/pijul")
4186 (string-append out "/bin/pijul"))))
4187 (mkdir-p bash-completions-dir)
4188 (with-output-to-file
4189 (string-append bash-completions-dir "/pijul")
4190 (lambda _ (invoke pijul "completion" "bash")))
4191 (mkdir-p zsh-completions-dir)
4192 (with-output-to-file
4193 (string-append zsh-completions-dir "/_pijul")
4194 (lambda _ (invoke pijul "completion" "zsh")))
4195 (mkdir-p fish-completions-dir)
4196 (with-output-to-file
4197 (string-append fish-completions-dir "/pijul.fish")
4198 (lambda _ (invoke pijul "completion" "fish")))
4199 (mkdir-p elvish-completions-dir)
4200 (with-output-to-file
4201 (string-append elvish-completions-dir "/pijul")
4202 (lambda _ (invoke pijul "completion" "elvish")))))))))
4203 (native-inputs
4204 (append (if (%current-target-system)
4205 (list this-package)
4206 '())
4207 (list pkg-config)))
4208 (inputs (cons* libgit2-1.3 libssh2 libsodium openssl (cargo-inputs 'pijul)))
4209 (home-page "https://nest.pijul.com/pijul/pijul")
4210 (synopsis "Distributed version control system")
4211 (description "This package provides pijul, a sound and fast distributed
4212version control system based on a mathematical theory of asynchronous work.")
4213 (license license:gpl2+)))
4214
4215(define-public stagit
4216 (package
4217 (name "stagit")
4218 (version "1.2")
4219 (source (origin
4220 (method git-fetch)
4221 (uri (git-reference
4222 ;; NOTE: It can only be cloned using the git protocol
4223 (url "git://git.codemadness.org/stagit")
4224 (commit version)))
4225 (file-name (git-file-name name version))
4226 (sha256
4227 (base32
4228 "17yggk3fbm731z98warvix332487s0k6knhxnf9zc6f667qi2mlr"))))
4229 (build-system gnu-build-system)
4230 (arguments
4231 (list #:tests? #f ; No tests
4232 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
4233 (string-append "PREFIX=" #$output))
4234 #:phases
4235 #~(modify-phases %standard-phases
4236 (delete 'configure)))) ; No configure script
4237 (inputs
4238 (list libgit2))
4239 (home-page "https://git.codemadness.org/stagit/")
4240 (synopsis "Static git page generator")
4241 (description "Stagit creates static pages for git repositories, the results can
4242be served with a HTTP file server of your choice.")
4243 (license license:expat)))
4244
4245(define-public gource
4246 (package
4247 (name "gource")
4248 (version "0.55")
4249 (source (origin
4250 (method url-fetch)
4251 (uri (string-append
4252 "https://github.com/acaudwell/Gource/releases/download"
4253 "/gource-" version "/gource-" version ".tar.gz"))
4254 (sha256
4255 (base32
4256 "0hh17h0pf4b7yq23xsr5zhl1cs02d2bijxj7ks6m01wbs89948y8"))))
4257 (build-system gnu-build-system)
4258 (arguments
4259 `(#:configure-flags
4260 (list (string-append "--with-boost-libdir="
4261 (assoc-ref %build-inputs "boost")
4262 "/lib")
4263 "--with-tinyxml")
4264 #:disallowed-references ,(list (this-package-native-input "tzdata"))
4265 #:phases (modify-phases %standard-phases
4266 (add-after 'unpack 'unbundle
4267 (lambda _
4268 (delete-file-recursively "src/tinyxml")))
4269 (add-before 'check 'check-setup
4270 (lambda* (#:key inputs #:allow-other-keys)
4271 (setenv "TZDIR" ; for src/test/datetime_tests.cpp
4272 (search-input-directory inputs
4273 "share/zoneinfo")))))))
4274 (native-inputs
4275 (list pkg-config tzdata-for-tests))
4276 (inputs
4277 (list boost-1.83
4278 ftgl
4279 glew
4280 glm
4281 glu
4282 libpng
4283 mesa
4284 pcre2
4285 (sdl-union (list sdl2 sdl2-image))
4286 tinyxml))
4287 (home-page "https://gource.io/")
4288 (synopsis "3D visualisation tool for source control repositories")
4289 (description "@code{gource} provides a software version control
4290visualization. The repository is displayed as a tree where the root of the
4291repository is the centre, directories are branches and files are leaves.
4292Contributors to the source code appear and disappear as they contribute to
4293specific files and directories.")
4294 (license license:gpl3+)))
4295
4296(define-public src
4297 (package
4298 (name "src")
4299 (version "1.32")
4300 (source
4301 (origin
4302 (method git-fetch)
4303 (uri (git-reference
4304 (url "https://gitlab.com/esr/src.git/")
4305 (commit version)))
4306 (file-name (git-file-name name version))
4307 (sha256
4308 (base32 "0kxbmpjr98kfacjidizxcghl541fwnf8yzfvwfq5f9zbv42p8l41"))))
4309 (build-system gnu-build-system)
4310 (arguments
4311 (list
4312 #:make-flags
4313 #~(list (string-append "prefix=" #$output))
4314 #:phases
4315 #~(modify-phases %standard-phases
4316 (delete 'configure) ; no 'configure' script
4317 (add-after 'install 'wrap-program
4318 (lambda* (#:key inputs #:allow-other-keys)
4319 (let* ((prog (string-append #$output "/bin/src"))
4320 (rcs (search-input-file inputs "bin/rcs")))
4321 (wrap-program prog
4322 `("PATH" ":" prefix (,(dirname rcs)))))))
4323 (replace 'check
4324 (lambda* (#:key tests? #:allow-other-keys)
4325 (when tests?
4326 (setenv "HOME" (getenv "TMPDIR"))
4327 (invoke "git" "config" "--global" "user.name" "guix")
4328 (invoke "git" "config" "--global" "user.email" "guix")
4329 (invoke "./srctest")))))))
4330 (native-inputs
4331 (list asciidoc
4332 ;; For testing.
4333 git
4334 perl))
4335 (inputs
4336 (list bash-minimal
4337 cssc
4338 python-wrapper
4339 rcs))
4340 (synopsis "Simple revision control")
4341 (home-page "http://www.catb.org/~esr/src/")
4342 (description
4343 "SRC (or src) is simple revision control, a version-control system for
4344single-file projects by solo developers and authors. It modernizes the
4345venerable RCS, hence the anagrammatic acronym. The design is tuned for use
4346cases like all those little scripts in your @file{~/bin} directory, or a
4347directory full of HOWTOs.")
4348 (license license:bsd-2)))
4349
4350(define-public git-when-merged
4351 ;; Use an unreleased version to get a PY3 compatibility fix.
4352 (let ((commit "ab6af7865a0ba55ba364a6c507e0be6f84f31c6d"))
4353 (package
4354 (name "git-when-merged")
4355 (version (string-append "1.2.0-" (string-take commit 7)))
4356 (source (origin
4357 (method git-fetch)
4358 (uri (git-reference
4359 (url "https://github.com/mhagger/git-when-merged/")
4360 (commit commit)))
4361 (file-name (git-file-name name version))
4362 (sha256
4363 (base32
4364 "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
4365 (build-system gnu-build-system)
4366 (arguments
4367 `(#:tests? #f ; there are no tests
4368 #:phases
4369 (modify-phases %standard-phases
4370 (delete 'configure)
4371 (delete 'build)
4372 (replace 'install
4373 (lambda* (#:key outputs #:allow-other-keys)
4374 (install-file "bin/git-when-merged"
4375 (string-append (assoc-ref outputs "out")
4376 "/bin"))))
4377 (add-before 'install 'patch-git
4378 (lambda* (#:key inputs #:allow-other-keys)
4379 (let ((git (search-input-file inputs "/bin/git")))
4380 (substitute* "bin/git-when-merged"
4381 (("'git'") (string-append "'" git "'"))))))
4382 (add-after 'install 'wrap-script
4383 (lambda* (#:key outputs #:allow-other-keys)
4384 (wrap-program (string-append (assoc-ref outputs "out")
4385 "/bin/git-when-merged")
4386 `("GUIX_PYTHONPATH" ":" prefix
4387 (,(getenv "GUIX_PYTHONPATH")))))))))
4388 (inputs (list bash-minimal git python-wrapper))
4389 (home-page "https://github.com/mhagger/git-when-merged")
4390 (synopsis "Determine when a commit was merged into a Git branch")
4391 (description "This Git extension defines a subcommand,
4392@code{when-merged}, whose core operation is to find the merge that brought a
4393given commit into the specified ref(s). It has various options that control
4394how information about the merge is displayed.")
4395 (license license:gpl2+))))
4396
4397(define-public git-imerge
4398 (package
4399 (name "git-imerge")
4400 (version "1.1.0")
4401 (source
4402 (origin
4403 (method git-fetch)
4404 (uri (git-reference
4405 (url "https://github.com/mhagger/git-imerge")
4406 (commit (string-append "v" version))))
4407 (file-name (git-file-name name version))
4408 (sha256
4409 (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
4410 (build-system gnu-build-system)
4411 (arguments
4412 `(#:tests? #f ; only manual test scripts
4413 #:make-flags (list (string-append "DESTDIR=" %output)
4414 "PREFIX=")
4415 #:phases
4416 (modify-phases %standard-phases
4417 (delete 'configure)
4418 (add-before 'install 'patch-git
4419 (lambda* (#:key inputs #:allow-other-keys)
4420 (let ((git (search-input-file inputs "/bin/git")))
4421 (substitute* "git-imerge"
4422 (("'git'") (string-append "'" git "'"))))))
4423 (add-after 'install 'wrap-script
4424 (lambda* (#:key outputs #:allow-other-keys)
4425 (wrap-program (string-append (assoc-ref outputs "out")
4426 "/bin/git-imerge")
4427 `("GUIX_PYTHONPATH" ":" prefix
4428 (,(getenv "GUIX_PYTHONPATH")))))))))
4429 (inputs (list bash-minimal git python-wrapper))
4430 (home-page "https://github.com/mhagger/git-imerge")
4431 (synopsis "Incremental merge for Git")
4432 (description "This Git extension defines a subcommand, @code{imerge},
4433which performs an incremental merge between two branches. Its two primary
4434design goals are to reduce the pain of resolving merge conflicts by finding
4435the smallest possible conflicts and to allow a merge to be saved, tested,
4436interrupted, published, and collaborated on while in progress.")
4437 (license license:gpl2+)))
4438
4439(define-public go-github-com-git-lfs-wildmatch-v2
4440 (package
4441 (name "go-github-com-git-lfs-wildmatch-v2")
4442 (version "2.0.1")
4443 (source (origin
4444 (method git-fetch)
4445 (uri (git-reference
4446 (url "https://github.com/git-lfs/wildmatch")
4447 (commit (string-append "v" version))))
4448 (file-name (git-file-name name version))
4449 (sha256
4450 (base32
4451 "0yg6d77d5l6v7cd8vr00y68z9aqb8qs4lidv0hkqh4fvz0ggvpln"))))
4452 (build-system go-build-system)
4453 (arguments
4454 '(#:import-path "github.com/git-lfs/wildmatch/v2"))
4455 (home-page "https://github.com/git-lfs/wildmatch")
4456 (synopsis "Go implementation of Git's wildmatch")
4457 (description
4458 "This package is an implementation of Git's wildmatch.c-style pattern
4459matching.")
4460 (license license:expat)))
4461
4462(define-public git-lfs
4463 (package
4464 (name "git-lfs")
4465 (version "3.7.1")
4466 (source
4467 (origin
4468 (method git-fetch)
4469 (uri (git-reference
4470 (url "https://github.com/git-lfs/git-lfs")
4471 (commit (string-append "v" version))))
4472 (file-name (git-file-name name version))
4473 (sha256
4474 (base32 "0zvawzaqk528rsnrkqif04b806348p4argmpcsg6ppl0gi7295rp"))))
4475 (build-system go-build-system)
4476 (arguments
4477 (list
4478 #:embed-files #~(list "children" "nodes" "text")
4479 #:import-path "github.com/git-lfs/git-lfs/v3"
4480 #:install-source? #f
4481 #:test-flags #~(list "-skip" "TestHistoryRewriterUpdatesRefs")
4482 #:phases
4483 #~(modify-phases %standard-phases
4484 ;; Only build the man pages if ruby-asciidoctor is available.
4485 #$@(if (this-package-native-input "ruby-asciidoctor")
4486 #~((add-before 'build 'man-gen
4487 ;; Without this, the binary generated in 'build
4488 ;; phase won't have any embedded usage-text.
4489 (lambda _
4490 (with-directory-excursion "src/github.com/git-lfs/git-lfs/v3"
4491 (invoke "make" "mangen"))))
4492 (add-after 'build 'build-man-pages
4493 (lambda _
4494 (with-directory-excursion "src/github.com/git-lfs/git-lfs/v3"
4495 (invoke "make" "man"))))
4496 (add-after 'install 'install-man-pages
4497 (lambda* (#:key outputs #:allow-other-keys)
4498 (with-directory-excursion "src/github.com/git-lfs/git-lfs/v3/man"
4499 (for-each
4500 (lambda (manpage)
4501 (install-file manpage
4502 (string-append #$output "/share/man/man1")))
4503 (find-files "." "^git-lfs.*\\.1$"))))))
4504 #~())
4505 (add-after 'install 'rename-binary
4506 (lambda _
4507 (with-directory-excursion (string-append #$output "/bin")
4508 (rename-file "v3" "git-lfs")))))))
4509 (native-inputs
4510 (append (list git-minimal/pinned
4511 go-github-com-avast-retry-go
4512 go-github-com-dpotapov-go-spnego
4513 go-github-com-git-lfs-gitobj-v2
4514 go-github-com-git-lfs-go-netrc
4515 go-github-com-git-lfs-pktline
4516 go-github-com-git-lfs-wildmatch-v2
4517 go-github-com-golang-groupcache
4518 go-github-com-jmhodges-clock
4519 go-github-com-leonelquinteros-gotext
4520 go-github-com-mattn-go-isatty
4521 go-github-com-olekukonko-ts
4522 go-github-com-pkg-errors
4523 go-github-com-rubyist-tracerx
4524 go-github-com-spf13-cobra
4525 go-github-com-ssgelm-cookiejarparser
4526 go-github-com-stretchr-testify
4527 go-github-com-xeipuuv-gojsonschema
4528 go-golang-org-x-net
4529 go-golang-org-x-sync
4530 go-golang-org-x-sys)
4531 ;; make `ronn` available during build for man page generation
4532 (if (supported-package? ruby-asciidoctor/minimal)
4533 (list ronn-ng ruby-asciidoctor/minimal)
4534 '())))
4535 (home-page "https://git-lfs.com/")
4536 (synopsis "Git extension for versioning large files")
4537 (description
4538 "Git Large File Storage (LFS) replaces large files such as audio samples,
4539videos, datasets, and graphics with text pointers inside Git, while storing the
4540file contents on a remote server.")
4541 (license license:expat)))
4542
4543(define-public lfs-s3
4544 (package
4545 (name "lfs-s3")
4546 (version "0.2.1")
4547 (source
4548 (origin
4549 (method git-fetch)
4550 (uri (git-reference
4551 (url "https://github.com/nicolas-graves/lfs-s3")
4552 (commit version)))
4553 (file-name (git-file-name name version))
4554 (sha256
4555 (base32 "1d2jwpqfbcd1hb213i6fjln0sqyg8ldjfrkzf312mivp2b1bxjl3"))))
4556 (build-system go-build-system)
4557 (arguments
4558 (list
4559 #:import-path "github.com/nicolas-graves/lfs-s3"))
4560 (inputs (list git-lfs))
4561 (propagated-inputs
4562 (list go-github-com-aws-aws-sdk-go-v2
4563 go-github-com-aws-aws-sdk-go-v2-config
4564 go-github-com-aws-aws-sdk-go-v2-feature-s3-manager
4565 go-github-com-aws-aws-sdk-go-v2-service-s3
4566 go-github-com-klauspost-compress))
4567 (home-page "https://git.sr.ht/~ngraves/lfs-s3/")
4568 (synopsis "Git extension for versioning large files in S3")
4569 (description
4570 "This package provides a custom transfer agent for Git LFS, allowing
4571plain S3 bucket usage as remote storage for media files. This package uses a
4572standalone agent instead of a server.")
4573 (license license:expat)))
4574
4575(define-public git-open
4576 (package
4577 (name "git-open")
4578 (version "2.1.0")
4579 (source
4580 (origin
4581 (method git-fetch)
4582 (uri (git-reference
4583 (url "https://github.com/paulirish/git-open")
4584 (commit (string-append "v" version))))
4585 (file-name (git-file-name name version))
4586 (sha256
4587 (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
4588 (build-system copy-build-system)
4589 (inputs
4590 (list bash-minimal xdg-utils))
4591 (arguments
4592 `(#:phases
4593 (modify-phases %standard-phases
4594 (add-after 'install 'wrap-program
4595 (lambda* (#:key outputs inputs #:allow-other-keys)
4596 (let ((out (assoc-ref outputs "out"))
4597 (xdg-utils (assoc-ref inputs "xdg-utils")))
4598 (wrap-program (string-append out "/bin/git-open")
4599 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
4600 #:install-plan
4601 '(("git-open" "bin/git-open"))))
4602 (home-page "https://github.com/paulirish/git-open")
4603 (synopsis "Open a Git repository's homepage from the command-line")
4604 (description
4605 "@code{git open} opens the repository's website from the command-line,
4606guessing the URL pattern from the @code{origin} remote.")
4607 (license license:expat)))
4608
4609(define-public tla
4610 (package
4611 (name "gnu-arch")
4612 (version "1.3.5")
4613 (source (origin
4614 (method url-fetch)
4615 (uri (string-append "https://ftp.gnu.org/old-gnu/gnu-arch/"
4616 "tla-" version ".tar.gz"))
4617 (sha256
4618 (base32
4619 "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0"))
4620 (modules '((guix build utils)))
4621 (snippet
4622 '(begin
4623 ;; In tar 1.32, '--preserve' is ambiguous and leads to an
4624 ;; error, so address that.
4625 (substitute* "src/tla/libarch/archive.c"
4626 (("\"--preserve\"")
4627 "\"--preserve-permissions\""))))))
4628 (build-system gnu-build-system)
4629 (arguments
4630 (list #:phases #~(modify-phases %standard-phases
4631 (replace 'configure
4632 (lambda _
4633 (chdir "src")
4634
4635 (mkdir "=build")
4636 (chdir "=build")
4637
4638 ;; For libneon's 'configure' script.
4639 ;; XXX: There's a bundled copy of neon.
4640 (setenv "CONFIG_SHELL" (which "sh"))
4641
4642 (invoke "../configure" "--prefix" #$output
4643 "--config-shell" (which "sh")
4644 "--with-posix-shell" (which "sh")
4645 "--with-cc" "gcc"))))
4646
4647 ;; There are build failures when building in parallel.
4648 #:parallel-build? #f
4649 #:parallel-tests? #f
4650
4651 #:test-target "test"))
4652 (native-inputs
4653 (list gcc-10 which))
4654 (synopsis "Historical distributed version-control system")
4655 (description
4656 "GNU Arch, aka. @code{tla}, was one of the first free distributed
4657version-control systems (DVCS). It saw its last release in 2006. This
4658package is provided for users who need to recover @code{tla} repositories and
4659for historians.")
4660 (home-page "https://www.gnu.org/software/gnu-arch/")
4661 (license license:gpl2))) ;version 2 only
4662
4663(define-public diff-so-fancy
4664 (package
4665 (name "diff-so-fancy")
4666 (version "1.4.4")
4667 (source (origin
4668 (method git-fetch)
4669 (uri (git-reference
4670 (url "https://github.com/so-fancy/diff-so-fancy")
4671 (commit (string-append "v" version))))
4672 (file-name (git-file-name name version))
4673 (sha256
4674 (base32
4675 "0ck9v9dc9zm3wr1vdq96zwvv9szsbimyxvnd76q5l4vcb4iqnpy8"))))
4676 (inputs
4677 (list bash-minimal perl ncurses))
4678 (build-system copy-build-system)
4679 (arguments
4680 '(#:phases
4681 (modify-phases %standard-phases
4682 (add-after 'unpack 'patch-lib-path
4683 (lambda* (#:key outputs #:allow-other-keys)
4684 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
4685 (substitute* "diff-so-fancy"
4686 (("use lib.*$")
4687 (string-append "use lib '" lib "';\n"))))))
4688 (add-after 'install 'symlink-executable
4689 (lambda* (#:key outputs inputs #:allow-other-keys)
4690 (let ((out (assoc-ref outputs "out"))
4691 (ncurses (assoc-ref inputs "ncurses"))
4692 (perl (assoc-ref inputs "perl")))
4693 (wrap-program (string-append out "/bin/diff-so-fancy")
4694 `("PATH" ":" prefix (,(string-append ncurses "/bin")
4695 ,(string-append perl "/bin"))))))))
4696 #:install-plan
4697 '(("lib" "lib")
4698 ("diff-so-fancy" "bin/"))))
4699 (home-page "https://github.com/so-fancy/diff-so-fancy")
4700 (synopsis "Makes diffs more human friendly and readable")
4701 (description
4702 "@code{diff-so-fancy} strives to make your diffs human readable instead
4703of machine readable. This helps improve code quality and helps you spot
4704defects faster.")
4705 (license license:expat)))
4706
4707(define-public gita
4708 (package
4709 (name "gita")
4710 (version "0.16.7.2")
4711 (source
4712 (origin
4713 (method git-fetch)
4714 (uri (git-reference
4715 (url "https://github.com/nosarthur/gita")
4716 (commit (string-append "v" version))))
4717 (file-name (git-file-name name version))
4718 (sha256
4719 (base32 "118dzmjgml0c32yllr2178ash2hvgn201i463bv4y0qbywajm9ax"))))
4720 (build-system pyproject-build-system)
4721 (arguments
4722 (list
4723 #:test-flags #~(list "--ignore" "tests/test_main.py")
4724 #:phases
4725 #~(modify-phases %standard-phases
4726 (add-before 'check 'pre-check
4727 (lambda _
4728 (invoke (string-append
4729 #$(this-package-native-input "git-minimal") "/bin/git")
4730 "init")))
4731 (add-after 'install 'install-shell-completions
4732 (lambda _
4733 (let* ((out #$output)
4734 (bash-completion (string-append out "/etc/bash_completion.d"))
4735 (zsh-completion (string-append out "/etc/zsh/site-functions")))
4736 (mkdir-p bash-completion)
4737 (copy-file "auto-completion/bash/.gita-completion.bash"
4738 (string-append bash-completion "/gita"))
4739 (mkdir-p zsh-completion)
4740 (copy-file "auto-completion/zsh/.gita-completion.zsh"
4741 (string-append zsh-completion "/_gita"))))))))
4742 (native-inputs
4743 (list git-minimal/pinned ;for tests
4744 python-pytest
4745 python-setuptools
4746 python-wheel))
4747 (propagated-inputs
4748 (list python-argcomplete))
4749 (home-page "https://github.com/nosarthur/gita")
4750 (synopsis "Command-line tool to manage multiple Git repos")
4751 (description "This package provides a command-line tool to manage
4752multiple Git repos.
4753
4754This tool does two things:
4755@itemize
4756@item display the status of multiple Git repos such as branch, modification,
4757commit message side by side
4758@item (batch) delegate Git commands/aliases from any working directory
4759@end itemize
4760
4761If several repos are related, it helps to see their status together.")
4762 (license license:expat)))
4763
4764(define-public ghq
4765 (package
4766 (name "ghq")
4767 (version "1.7.1")
4768 (home-page "https://github.com/x-motemen/ghq")
4769 (source (origin
4770 (method git-fetch)
4771 (uri (git-reference
4772 (url home-page)
4773 (commit (string-append "v" version))))
4774 (file-name (git-file-name name version))
4775 (sha256
4776 (base32
4777 "0ai3klp3fm5r0idnml5pm55wcvkav3w0s11snlmr0ab1ki8m9sg5"))))
4778 (build-system go-build-system)
4779 (arguments
4780 (list
4781 #:install-source? #f
4782 #:import-path "github.com/x-motemen/ghq"
4783 #:phases
4784 #~(modify-phases %standard-phases
4785 (add-after 'install 'install-completions
4786 (lambda* (#:key outputs import-path #:allow-other-keys)
4787 (let* ((out #$output)
4788 (bash-completion (string-append out "/etc/bash_completion.d"))
4789 (zsh-completion (string-append out "/share/zsh/site-functions")))
4790 (with-directory-excursion (string-append "src/" import-path)
4791 (mkdir-p bash-completion)
4792 (copy-file "misc/bash/_ghq"
4793 (string-append bash-completion "/ghq"))
4794 (mkdir-p zsh-completion)
4795 (copy-file "misc/zsh/_ghq"
4796 (string-append zsh-completion "/_ghq")))))))))
4797 (native-inputs
4798 (list git-minimal/pinned))
4799 (inputs
4800 (list go-github-com-mattn-go-isatty
4801 go-github-com-motemen-go-colorine
4802 go-github-com-saracen-walker
4803 go-github-com-songmu-gitconfig
4804 go-github-com-urfave-cli-v2
4805 go-golang-org-x-net
4806 go-golang-org-x-sync
4807 go-golang-org-x-text))
4808 (synopsis "Manage remote repository clones")
4809 (description
4810 "@code{ghq} provides a way to organize remote repository clones, like
4811@code{go get} does. When you clone a remote repository by @code{ghq get}, ghq
4812makes a directory under a specific root directory (by default @file{~/ghq})
4813using the remote repository URL's host and path.")
4814 (license license:expat)))
4815
4816(define-public tkrev
4817 (package
4818 (name "tkrev")
4819 (version "9.4.1")
4820 (source
4821 (origin
4822 (method url-fetch)
4823 (uri (string-append
4824 "mirror://sourceforge/tkcvs/tkrev_" version ".tar.gz"))
4825 (sha256
4826 (base32 "0bpfbhkngzmwy476mfc69mkd94l0m2wxznrn0qzd81s450yxjw2q"))))
4827 (build-system gnu-build-system)
4828 (arguments
4829 `(#:phases
4830 (modify-phases %standard-phases
4831 (delete 'configure)
4832 (delete 'build)
4833 (replace 'install
4834 (lambda* (#:key outputs #:allow-other-keys)
4835 (let* ((out (assoc-ref outputs "out"))
4836 (bin (string-append out "/bin")))
4837 (invoke "wish" "doinstall.tcl" "-nox" out)
4838 (install-file "contrib/tkdirdiff" bin))))
4839 (add-after 'install 'wrap-programs
4840 (lambda* (#:key outputs #:allow-other-keys)
4841 (for-each
4842 (lambda (file)
4843 (wrap-program (string-append (assoc-ref outputs "out")
4844 "/bin/" file)
4845 `("PATH" ":" prefix (,(dirname (which "wish"))))))
4846 '("tkdiff"
4847 "tkdirdiff"
4848 "tkrev")))))
4849 #:tests? #f))
4850 (inputs
4851 (list bash-minimal tk))
4852 (home-page "https://tkcvs.sourceforge.io")
4853 (synopsis "Graphical interface to CVS, Subversion, Git, and RCS")
4854 (description
4855 "TkRev (formerly TkCVS) is a Tcl/Tk-based graphical interface to the CVS,
4856Subversion and Git configuration management systems. It will also help with
4857RCS. It shows the status of the files in the current working directory, and
4858has tools for tagging, merging, checking in/out, and other user operations.
4859TkDiff is included for browsing and merging your changes.")
4860 (license license:gpl2+)))
4861
4862(define-public qgit
4863 (package
4864 (name "qgit")
4865 (version "2.13")
4866 (source (origin
4867 (method git-fetch)
4868 (uri (git-reference
4869 (url "https://github.com/tibirna/qgit")
4870 (commit (string-append "qgit-" version))))
4871 (file-name (git-file-name name version))
4872 (sha256
4873 (base32
4874 "0di205cy97qdfgwnmzscw0ar7i734gmqjxz1lyfdrfhwhwapmv44"))))
4875 (build-system qt-build-system)
4876 (arguments
4877 (list #:qtbase qtbase
4878 #:tests? #f)) ;no tests
4879 (propagated-inputs
4880 (list git))
4881 (inputs
4882 (list qt5compat
4883 qtwayland))
4884 (home-page "https://github.com/tibirna/qgit")
4885 (synopsis "Graphical front-end for git")
4886 (description
4887 "Qgit is a graphical front-end for git, with features to:
4888@itemize
4889@item view revisions, diffs, files history, files annotation and archive tree,
4890@item commit changes visually cherry picking modified files,
4891@item apply or save patch series from selected commits, drag and drop commits,
4892@item associate commands sequences, scripts and anything else executable to a
4893 custom action,
4894@item push/pop commits,
4895@item apply/save/create patches
4896@item and cherry pick single modified files.
4897@end itemize")
4898 (license license:gpl3+)))
4899
4900(define-public git-filter-repo
4901 (package
4902 (name "git-filter-repo")
4903 (version "2.47.0")
4904 (source
4905 (origin
4906 (method git-fetch)
4907 (uri (git-reference
4908 (url "https://github.com/newren/git-filter-repo")
4909 (commit (string-append "v" version))))
4910 (file-name (git-file-name name version))
4911 (sha256
4912 (base32
4913 "15gwl1gax7rxwjd7q4az25xc1wmmxd1f5q63wkv4n9dab6i4ighx"))
4914 ;; Modified from <https://github.com/newren/git-filter-repo/pull/477>.
4915 ;; Used with 'unpack-git-source phase.
4916 (patches
4917 (search-patches "git-filter-repo-2.38.0-generate-doc.patch"
4918 "git-filter-repo-2.47.0-dont-crash-on-multiline-stuff.patch"))))
4919 (build-system pyproject-build-system)
4920 (arguments
4921 (list
4922 #:modules
4923 '(((guix build gnu-build-system) #:prefix gnu:)
4924 (guix build pyproject-build-system)
4925 (guix build utils)
4926 (srfi srfi-26))
4927 #:phases
4928 #~(modify-phases %standard-phases
4929 (delete 'configure)
4930 (add-after 'unpack 'unpack-git-source
4931 (lambda _
4932 (let* ((old-path (getcwd))
4933 (doc-source (string-append old-path "/Documentation")))
4934 (mkdir-p "git-source")
4935 (chdir "git-source")
4936 ((assoc-ref %standard-phases 'unpack)
4937 #:source
4938 #+(package-source (this-package-native-input "git-minimal")))
4939 (for-each
4940 (cut install-file <> doc-source)
4941 (find-files "." "asciidoc\\.conf\\.in$|manpage.*\\.xsl$"))
4942 ;; These attributes are probably not needed.
4943 (with-directory-excursion doc-source
4944 (substitute* "asciidoc.conf.in"
4945 (("@GIT_(VERSION|DATE)@") ""))
4946 (rename-file "asciidoc.conf.in" "asciidoc.conf"))
4947 (chdir old-path)
4948 (delete-file-recursively "git-source"))))
4949 (add-after 'unpack-git-source 'fix-t9391
4950 (lambda* (#:key inputs native-inputs #:allow-other-keys)
4951 (substitute* "t/t9391-filter-repo-lib-usage.sh"
4952 (("/bin/bash")
4953 (search-input-file (or native-inputs inputs) "/bin/bash")))))
4954 (add-before 'build 'set-pythondir
4955 (lambda* (#:key inputs outputs #:allow-other-keys)
4956 (substitute* "Makefile"
4957 (("(pythondir = ).*" _ pre)
4958 (string-append pre (site-packages inputs outputs))))))
4959 (add-after 'build 'build-doc
4960 (lambda _
4961 (invoke "make" "doc"
4962 (string-append "prefix=" #$output)
4963 (string-append "VERSION=" #$version))))
4964 (add-after 'install 'install-doc
4965 (lambda _
4966 (let ((man1 (string-append #$output "/share/man/man1")))
4967 (copy-recursively "Documentation/man1" man1))))
4968 (add-after 'install-doc 'compress-documentation
4969 (assoc-ref gnu:%standard-phases 'compress-documentation))
4970 (replace 'check
4971 (lambda* (#:key tests? #:allow-other-keys)
4972 (when tests?
4973 (invoke "t/run_tests")))))))
4974 (native-inputs
4975 (list asciidoc
4976 docbook-xsl
4977 git-minimal/pinned
4978 libxml2 ;for XML_CATALOG_FILES
4979 xmlto
4980 perl
4981 python-setuptools
4982 python-setuptools-scm
4983 rsync))
4984 (inputs (list python)) ;for the shebang
4985 (home-page "https://github.com/newren/git-filter-repo")
4986 (synopsis "Quickly rewrite Git repository history")
4987 (description
4988 "@command{git filter-repo} is a versatile tool for rewriting history,
4989which roughly falls into the same space of tool like git filter-branch but
4990with more capabilities. @command{git filter-repo} is now recommended by the
4991Git project instead of @command{git filter-branch}.")
4992 (license (list license:expat ;; Main license.
4993 license:gpl2)))) ;; For test harness.
4994
4995(define-public gitlint
4996 (package
4997 (name "gitlint")
4998 (version "0.19.1")
4999 (source (origin
5000 (method url-fetch)
5001 ;; the gitlint-core pypi package contains the actual gitlint
5002 ;; code; the gitlint package only pulls in gitlint-core with
5003 ;; stricter dependency versioning
5004 (uri (pypi-uri "gitlint_core" version))
5005 (sha256
5006 (base32
5007 "14lrlbdbnm1biczd54iymbgi5k02hnxmxxh3kr5650gm7yq7gybv"))))
5008 (build-system pyproject-build-system)
5009 (arguments
5010 (list
5011 #:tests? #f ;not included in PyPI, see pyproejct.toml
5012 #:phases
5013 #~(modify-phases %standard-phases
5014 (add-before 'build 'loosen-requirements
5015 (lambda* (#:key inputs #:allow-other-keys)
5016 (substitute* "gitlint/shell.py"
5017 (("'git'") (string-append
5018 "'"
5019 (search-input-file inputs "bin/git")
5020 "'"))
5021 ;; force using subprocess instead of sh so git does not need
5022 ;; to be a propagated input
5023 (("if USE_SH_LIB") "if False")))))))
5024 (native-inputs
5025 (list python-hatch-vcs
5026 python-hatchling))
5027 (inputs
5028 (list git python-arrow python-click python-sh))
5029 (home-page "https://jorisroovers.com/gitlint/")
5030 (synopsis "Linting Git commit messages")
5031 (description
5032 "Gitlint is a Git commit message linter written in Python: it checks your
5033commit messages for style.")
5034 (license license:expat)))
5035
5036(define-public git-extras
5037 (package
5038 (name "git-extras")
5039 (version "7.5.0")
5040 (source
5041 (origin
5042 (method git-fetch)
5043 (uri (git-reference
5044 (url "https://github.com/tj/git-extras")
5045 (commit version)))
5046 (file-name (git-file-name name version))
5047 (sha256
5048 (base32 "1yrnzhf7z21rrirw55vm9rwaliy4hib3qsibf0y8gs4gsv0lnr06"))))
5049 (build-system gnu-build-system)
5050 (arguments
5051 (list
5052 ;; XXX: Tests require additional setup with Pytest, see
5053 ;; <.github/workflows/ci.yml>.
5054 #:tests? #f
5055 #:make-flags
5056 #~(list (string-append "PREFIX=" #$output))
5057 #:phases
5058 #~(modify-phases %standard-phases
5059 ;; No configure script, build process, or tests.
5060 (delete 'bootstrap)
5061 (delete 'configure)
5062 (delete 'build)
5063 (delete 'check)
5064 (add-after 'unpack 'hardcode-dependency-paths
5065 (lambda* (#:key inputs #:allow-other-keys)
5066 ;; Write to and copy from temporary file to prevent
5067 ;; "make: bash: Argument list too long" errors.
5068 (let* ((temp-file (mkstemp! "temp-file.XXXXXX"))
5069 (temp-filename (port-filename temp-file)))
5070 (map (lambda (name)
5071 (format temp-file "export PATH=$PATH:~a/bin~%"
5072 (assoc-ref inputs name)))
5073 (list "coreutils-minimal"
5074 "curl"
5075 "findutils"
5076 "gawk"
5077 "less"
5078 "ncurses"
5079 "procps"
5080 "rsync"
5081 "sed"
5082 "util-linux"))
5083 ;; The Makefile injects helper scripts and functions into each
5084 ;; script. This substitution injects a PATH appending the bin
5085 ;; directory of each non-propagated input in order to minimize
5086 ;; the number of packages propagated to the profile.
5087 (substitute* "Makefile"
5088 (("head -1 bin/\\$\\(COMMAND\\) > \\$\\(TEMPFILE\\); \\\\" line)
5089 (string-append
5090 line "\n"
5091 "cat " temp-filename " >> $(TEMPFILE); \\")))))))))
5092 (propagated-inputs (list git))
5093 (inputs
5094 (list coreutils-minimal
5095 curl
5096 findutils
5097 gawk
5098 less
5099 ncurses
5100 procps
5101 rsync
5102 sed
5103 util-linux))
5104 (home-page "https://github.com/tj/git-extras")
5105 (synopsis "Additional Git utilities")
5106 (description "The git-extras package provides a collection of additional
5107git commands for repository metrics and summarization, commit and log editing,
5108developer workflow, and project and release management.")
5109 (license license:expat)))
5110
5111(define-public ngit-cli
5112 (package
5113 (name "ngit-cli")
5114 (version "2.5.0")
5115 (source (origin
5116 (method git-fetch)
5117 (uri (git-reference
5118 (url "https://ngit.dev/ngit.git")
5119 (commit (string-append "v" version))))
5120 (file-name (git-file-name name version))
5121 (patches
5122 (search-patches "ngit-cli-tests-libgit2-version.patch"))
5123 (sha256
5124 (base32
5125 "1k3h0rkm9zfpyzwvfp0aix3b8lphz1y5pb431jl2jg8wrarpf4bz"))))
5126 (build-system cargo-build-system)
5127 (arguments
5128 (list
5129 #:install-source? #f
5130 ;; Integration tests drive loopback network services, including an
5131 ;; external ngit-grasp binary; run only self-contained unit tests.
5132 #:cargo-test-flags ''("--lib" "--bins" "--benches" "--examples")
5133 ;; cargo-build-system checks packages[0] from `cargo metadata` when
5134 ;; deciding whether to run `cargo install`. This workspace lists the
5135 ;; library-only test_harness package first, so force installing the root
5136 ;; package that provides the ngit and git-remote-nostr binaries.
5137 #:cargo-install-paths ''(".")
5138 #:phases
5139 #~(modify-phases %standard-phases
5140 ;; Replace the bare "git" command names (and the self-referential
5141 ;; "ngit" one) with absolute store references so that ngit never
5142 ;; resolves these executables through the ambient $PATH.
5143 (add-after 'unpack 'hardcode-executable-paths
5144 (lambda* (#:key inputs outputs #:allow-other-keys)
5145 (let ((git (search-input-file inputs "bin/git"))
5146 (ngit (string-append (assoc-ref outputs "out")
5147 "/bin/ngit")))
5148 (substitute* '("src/bin/ngit/sub_commands/apply.rs"
5149 "src/bin/ngit/sub_commands/list.rs"
5150 "src/bin/ngit/sub_commands/pr_merge.rs")
5151 (("Command::new\\(\"git\"\\)")
5152 (string-append "Command::new(\"" git "\")")))
5153 (substitute* "src/bin/ngit/sub_commands/init.rs"
5154 (("let command = \"git\";")
5155 (string-append "let command = \"" git "\";"))
5156 (("let command = \"ngit\";")
5157 (string-append "let command = \"" ngit "\";"))))))
5158 ;; The invocation sites above use absolute store paths, but two
5159 ;; lookups still go by name:
5160 ;; - git finds the `git-remote-nostr' remote helper on $PATH;
5161 ;; - the credentials callback that ngit's shared library
5162 ;; installs (src/lib/fetch.rs, push.rs, list.rs) makes git2
5163 ;; run `sh -c "git credential-<name> get"'. That command is
5164 ;; built in the git2 crate, not in ngit, so the substitution
5165 ;; above cannot reach it.
5166 ;; Prepend the directories that provide those programs.
5167 (add-after 'install 'wrap-programs
5168 (lambda* (#:key inputs outputs #:allow-other-keys)
5169 (let* ((out (assoc-ref outputs "out"))
5170 (bin (string-append out "/bin"))
5171 (git (dirname (search-input-file inputs "bin/git")))
5172 (bash (dirname (search-input-file inputs "bin/bash"))))
5173 ;; ngit-cli's bin provides git-remote-nostr, git's bin
5174 ;; provides `git', and bash's bin provides `sh'. Prepend
5175 ;; (not replace) so the caller's PATH stays: git invokes
5176 ;; user-configured programs by name (credential helpers,
5177 ;; askpass, hooks, editors, filters)--which replacing PATH
5178 ;; would break.
5179 (wrap-program (string-append bin "/ngit")
5180 `("PATH" ":" prefix (,bin ,git ,bash)))
5181 ;; git-remote-nostr gets no entry for ngit-cli's bin: git
5182 ;; already found it, and it never looks up itself or a
5183 ;; sibling. git's and bash's bins are here for the `git'
5184 ;; and `sh' that the credential invocation needs.
5185 (wrap-program (string-append bin "/git-remote-nostr")
5186 `("PATH" ":" prefix (,git ,bash)))))))))
5187 (inputs
5188 (cons* bash-minimal git-minimal libgit2-1.9 libsecp256k1 libssh2
5189 openssl zlib
5190 (cargo-inputs 'ngit-cli)))
5191 (native-inputs
5192 (list pkg-config))
5193 (synopsis "Put Git and collaboration metadata on Nostr")
5194 (description
5195 "This package provides a way to store git metadata on Nostr
5196(including collaboration stuff like PRs, issues, statuses, ...).")
5197 (home-page "https://gitworkshop.dev/danconwaydev.com/ngit")
5198 (license license:expat)))
5199
5200(define-public git-quick-stats
5201 (package
5202 (name "git-quick-stats")
5203 (version "2.11.0")
5204 (source
5205 (origin
5206 (method git-fetch)
5207 (uri (git-reference
5208 (url "https://github.com/git-quick-stats/git-quick-stats")
5209 (commit version)))
5210 (file-name (git-file-name name version))
5211 (sha256
5212 (base32 "1sx6idfl0s88xx5wd39cg1540hzkh7p6yad0l56qnf9v2i38hra1"))))
5213 (build-system gnu-build-system)
5214 (arguments
5215 (list
5216 #:test-target "test"
5217 #:tests? #f ;Tests require interactive terminal
5218 #:make-flags #~(list (string-append "PREFIX=" #$output))
5219 #:phases
5220 #~(modify-phases %standard-phases
5221 (delete 'configure)
5222 (add-after 'install 'wrap-program
5223 (lambda _
5224 (wrap-program (string-append #$output "/bin/git-quick-stats")
5225 '("PATH" ":" prefix
5226 #$(map (lambda (x)
5227 (file-append (cadr x) "/bin"))
5228 (package-inputs this-package)))))))))
5229 (native-inputs (list which))
5230 (inputs (list bash-minimal
5231 coreutils-minimal
5232 gawk
5233 git-minimal/pinned
5234 grep
5235 ncurses
5236 util-linux))
5237 (home-page "https://git-quick-stats.sh")
5238 (synopsis "Access various statistics in git repositories")
5239 (description
5240 "Any git repository may contain tons of information about commits,
5241contributors, and files. Extracting this information is not always trivial,
5242mostly because there are a gazillion options to a gazillion git commands.
5243This package provides a cleaner interface to access this information.")
5244 (license license:expat)))
5245
5246(define-public hut
5247 (package
5248 (name "hut")
5249 (version "0.8.0")
5250 (source
5251 (origin
5252 (method git-fetch)
5253 (uri (git-reference
5254 (url "https://git.sr.ht/~xenrox/hut")
5255 (commit (string-append "v" version))))
5256 (file-name (git-file-name name version))
5257 (sha256
5258 (base32 "0q8g43szgj16jhhzj1y362a85cxmrf6kmy0czrgjhlp5xirnmcbm"))))
5259 (build-system go-build-system)
5260 (arguments
5261 (list
5262 #:import-path "git.sr.ht/~xenrox/hut"
5263 #:phases
5264 #~(modify-phases %standard-phases
5265 (replace 'build
5266 (lambda* (#:key import-path #:allow-other-keys)
5267 (with-directory-excursion (string-append "src/" import-path)
5268 ;; The flags are copied from (guix build go-build-system).
5269 (setenv "CGO_LDFLAGS" "-s -w")
5270 (invoke "make" "all" "GOFLAGS=-v -x"))))
5271 (replace 'install
5272 (lambda* (#:key import-path #:allow-other-keys)
5273 (with-directory-excursion (string-append "src/" import-path)
5274 (invoke "make" "install"
5275 (string-append "PREFIX=" #$output))))))
5276 #:test-flags #~(list "-vet=off")))
5277 (native-inputs
5278 (list scdoc))
5279 (inputs
5280 (list go-codeberg-org-emersion-go-scfg
5281 go-git-sr-ht-emersion-gqlclient
5282 go-github-com-dustin-go-humanize
5283 go-github-com-google-shlex
5284 go-github-com-juju-ansiterm
5285 go-github-com-spf13-cobra
5286 go-golang-org-x-term))
5287 (home-page "https://git.sr.ht/~xenrox/hut")
5288 (synopsis "CLI tool for sr.ht")
5289 (description "@command{hut} is a CLI tool for
5290@uref{https://sr.ht/~sircmpwn/sourcehut/, sr.ht}. It helps you interact with
5291sr.ht's public services:
5292@table @asis
5293@item builds
5294submit and manage build jobs
5295@item git
5296create, and manage git repositories and artifacts
5297@item hg
5298list Mercurial repositories
5299@item lists
5300manage mailing lists and patches
5301@item meta
5302manage PGP, and SSH keys
5303@item pages
5304publish and manage hosted websites
5305@item paste
5306create and manage pastes
5307@item todo
5308create and manage trackers, tickets
5309@item graphql
5310interact with GraphQL APIs directly
5311@end table")
5312 (license license:agpl3)))
5313
5314(define-public commit-patch
5315 (package
5316 (name "commit-patch")
5317 (version "2.6.2")
5318 (source (origin
5319 (method url-fetch)
5320 (uri (string-append
5321 "https://github.com/caldwell/commit-patch/releases/download/"
5322 version "/commit-patch-" version ".tar.gz"))
5323 (sha256
5324 (base32
5325 "0v11vjyisk243zi0ym90bnqb229j7iaqx1lwqdkszxzn1yxwq4ck"))))
5326 (build-system copy-build-system)
5327 (arguments
5328 (list #:phases #~(modify-phases %standard-phases
5329 (add-after 'unpack 'fix-paths
5330 (lambda* (#:key inputs #:allow-other-keys)
5331 (patch-shebang "commit-patch"))))
5332 #:install-plan ''(("commit-patch" "bin/")
5333 ("commit-patch-buffer.el"
5334 "share/emacs/site-lisp/"))))
5335 (inputs (list perl))
5336 (propagated-inputs (list patchutils))
5337 (synopsis "Commit parts of changes to VCS repositories")
5338 (description
5339 "commit-patch is a utility that lets you check in select portions of a
5340file into Darcs, Git, Mercurial, Bazaar, Subversion, or CVS repositories. It
5341comes as a command line app and also an Emacs interface.")
5342 (home-page "https://porkrind.org/commit-patch/")
5343 (license license:gpl2+)))
5344
5345(define-public git-sizer
5346 (package
5347 (name "git-sizer")
5348 (version "1.5.0")
5349 (source
5350 (origin
5351 (method git-fetch)
5352 (uri (git-reference
5353 (url "https://github.com/github/git-sizer")
5354 (commit (string-append "v" version))))
5355 (file-name (git-file-name name version))
5356 (sha256
5357 (base32 "1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis"))))
5358 (build-system go-build-system)
5359 (arguments
5360 (list
5361 #:install-source? #f
5362 #:import-path "github.com/github/git-sizer"
5363 #:test-flags
5364 ;; TestExec and TestSubmodule require a copy of the Git repository.
5365 #~(list "-skip" "TestExec|TestSubmodule")
5366 #:phases
5367 #~(modify-phases %standard-phases
5368 (add-after 'unpack 'fix-paths
5369 (lambda* (#:key inputs #:allow-other-keys)
5370 (substitute* '("src/github.com/github/git-sizer/git/git.go")
5371 (("gitBin, err := findGitBin\\(\\)")
5372 (string-append "gitBin := \""
5373 (search-input-file inputs "bin/git")
5374 "\"\n\tvar err error")))
5375 (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
5376 (("bin/git-sizer")
5377 (string-append #$output "/bin/git-sizer"))))))))
5378 (inputs
5379 (list git-minimal))
5380 (native-inputs
5381 (list go-github-com-cli-safeexec
5382 go-github-com-pmezard-go-difflib
5383 go-github-com-spf13-pflag
5384 go-github-com-stretchr-testify
5385 go-go-uber-org-goleak
5386 go-golang-org-x-sync
5387 go-gopkg-in-yaml-v3))
5388 (home-page "https://github.com/github/git-sizer")
5389 (synopsis "Analyze size of a Git repo")
5390 (description "Compute various size metrics for a Git repository, flagging
5391those that might cause problems or inconvenience.")
5392 (license license:expat)))
5393
5394;;;
5395;;; Avoid adding new packages to the end of this file. To reduce the chances
5396;;; of a merge conflict, place them above by existing packages with similar
5397;;; functionality or similar names.
5398;;;