X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/23744435613aa040beacc61a0825cc72280da80a..7bf82f5ede57c9c5344ddb1d4dcfe694eb306bef:/gnu/packages/version-control.scm diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 2ee8247071..e7fa6e6777 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -6,15 +6,15 @@ ;;; Copyright © 2015, 2016 Mathieu Lirzin ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2014, 2016, 2019 Eric Bavier -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner -;;; Copyright © 2015, 2018 Kyle Meyer +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner +;;; Copyright © 2015, 2018, 2020, 2021 Kyle Meyer ;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016, 2017, 2018 Nikita -;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Vasile Dumitrascu ;;; Copyright © 2017 Clément Lassieur -;;; Copyright © 2017 André +;;; Copyright © 2017, 2020 EuAndreh ;;; Copyright © 2017, 2018, 2020 Marius Bakke ;;; Copyright © 2017 Stefan Reichör ;;; Copyright © 2017, 2020 Oleg Pykhalov @@ -31,6 +31,13 @@ ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Tanguy Le Carrour +;;; Copyright © 2020 Michael Rohleder +;;; Copyright © 2021 Greg Hogan +;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Léo Le Bouter +;;; Copyright © 2021 LibreMiami +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +62,7 @@ #:use-module (guix git-download) #:use-module (guix hg-download) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -74,8 +82,11 @@ #:use-module (gnu packages ed) #:use-module (gnu packages file) #:use-module (gnu packages flex) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages golang) #:use-module (gnu packages groff) #:use-module (gnu packages guile) @@ -93,6 +104,8 @@ #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) @@ -159,14 +172,14 @@ as well as the classic centralized workflow.") (define-public git (package (name "git") - (version "2.28.0") + (version "2.31.1") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/software/scm/git/git-" version ".tar.xz")) (sha256 (base32 - "17a311vzimqn1glc9d7x82rhb1mb81m5rr4g8xji8idaafid39fz")))) + "10367n5sv4nsgaxy486pbp7nscx34vjk8vrb06jm9ffm8ix42qcz")))) (build-system gnu-build-system) (native-inputs `(("native-perl" ,perl) @@ -183,11 +196,12 @@ as well as the classic centralized workflow.") version ".tar.xz")) (sha256 (base32 - "1dvwq0py8a2ywmgc5pzdlsj3608s7r9wyba292728fcs3yj7ynk6")))) + "00n7vbfmd3ywgjksgwrszwj0l2niba64qkaq07ra4p8mawy483ax")))) ;; For subtree documentation. ("asciidoc" ,asciidoc-py3) ("docbook-xsl" ,docbook-xsl) - ("xmlto" ,xmlto))) + ("xmlto" ,xmlto) + ("pkg-config" ,pkg-config))) (inputs `(("curl" ,curl) ("expat" ,expat) @@ -213,11 +227,16 @@ as well as the classic centralized workflow.") ;; For 'git gui', 'gitk', and 'git citool'. ("tcl" ,tcl) - ("tk" ,tk))) + ("tk" ,tk) + + ;; For 'git-credential-libsecret' + ("glib" ,glib) + ("libsecret" ,libsecret))) (outputs '("out" ; the core "send-email" ; for git-send-email "svn" ; git-svn "credential-netrc" ; git-credential-netrc + "credential-libsecret" ; git-credential-libsecret "subtree" ; git-subtree "gui")) ; gitk, git gui (arguments @@ -255,6 +274,7 @@ as well as the classic centralized workflow.") #:modules ((srfi srfi-1) (srfi srfi-26) + ((guix build gnu-build-system) #:prefix gnu:) ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases @@ -382,6 +402,14 @@ as well as the classic centralized workflow.") `("PERL5LIB" ":" prefix (,(string-append (assoc-ref outputs "out") "/share/perl5")))) #t))) + (add-after 'install 'install-credential-libsecret + (lambda* (#:key outputs #:allow-other-keys) + (let* ((libsecret (assoc-ref outputs "credential-libsecret"))) + (with-directory-excursion "contrib/credential/libsecret" + ((assoc-ref gnu:%standard-phases 'build)) + (install-file "git-credential-libsecret" + (string-append libsecret "/bin")) + #t)))) (add-after 'install 'install-subtree (lambda* (#:key outputs #:allow-other-keys) (let ((subtree (assoc-ref outputs "subtree"))) @@ -390,6 +418,16 @@ as well as the classic centralized workflow.") (install-file "contrib/subtree/git-subtree.1" (string-append subtree "/share/man/man1")) #t))) + (add-after 'install 'restore-sample-hooks-shebang + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dir (string-append out "/share/git-core/templates/hooks"))) + (for-each (lambda (file) + (format #t "restoring shebang on `~a'~%" file) + (substitute* file + (("^#!.*/bin/sh") "#!/bin/sh"))) + (find-files dir ".*")) + #t))) (add-after 'install 'split (lambda* (#:key inputs outputs #:allow-other-keys) ;; Split the binaries to the various outputs. @@ -518,11 +556,7 @@ everything from small to very large projects with speed and efficiency.") (delete 'install-man-pages) (delete 'install-subtree) (delete 'install-credential-netrc) - (add-before 'check 'delete-svn-test - (lambda _ - ;; This test cannot run since we are not building 'git-svn'. - (delete-file "t/t9020-remote-svn.sh") - #t)) + (delete 'install-credential-libsecret) (add-after 'install 'remove-unusable-perl-commands (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -567,6 +601,31 @@ everything from small to very large projects with speed and efficiency.") ("perl" ,perl) ("zlib" ,zlib))))) +(define-public git2cl + (let ((commit "1d74d4c0d933fc69ed5cec838c73502584dead05")) + (package + (name "git2cl") + (version (string-append "20120919." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.nongnu.org/git/git2cl.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wnnbm2sjvfj0qrksj89jlnl69miwl0vk3wrrvgvpclgys3na2g1")))) + (build-system copy-build-system) + (inputs + `(("perl" ,perl))) + (arguments + `(#:install-plan '(("git2cl" "bin/git2cl")))) + (home-page "https://savannah.nongnu.org/projects/git2cl") + (synopsis "Convert Git logs to GNU ChangeLog format") + (description "@code{git2cl} is a command line tool for converting Git +logs to GNU ChangeLog format.") + (license license:gpl2+)))) + (define-public gitless (package (name "gitless") @@ -659,7 +718,7 @@ to GitHub contributions calendar.") (define-public libgit2 (package (name "libgit2") - (version "1.0.1") + (version "1.1.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/libgit2/libgit2/" @@ -667,7 +726,7 @@ to GitHub contributions calendar.") "/libgit2-" version ".tar.gz")) (sha256 (base32 - "0nlg35pxhh548nn7aa3y1m81mf81nkbzz86i2psps4f474n497v8")) + "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd")) (patches (search-patches "libgit2-mtime-0.patch")) (snippet '(begin (delete-file-recursively "deps") #t)) @@ -1205,7 +1264,7 @@ lot easier.") (define-public stgit (package (name "stgit") - (version "0.21") + (version "1.0") (source (origin (method git-fetch) @@ -1214,7 +1273,7 @@ lot easier.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc")))) + (base32 "0dixgvjlsk3xisj8blzdhh0nphm5zqkjbj081wgsba52z4zq1y0q")))) (build-system python-build-system) (native-inputs `(("perl" ,perl))) @@ -1244,7 +1303,7 @@ lot easier.") "PERL_PATH=perl" (string-append "SHELL_PATH=" (which "bash")) "test")))))) - (home-page "http://procode.org/stgit/") + (home-page "https://stacked-git.github.io/") (synopsis "Stacked Git") (description "StGit is a command-line application that provides functionality similar @@ -1446,7 +1505,7 @@ control to Git repositories.") (define-public pre-commit (package (name "pre-commit") - (version "2.7.1") + (version "2.8.1") (source (origin ;; No tests in the PyPI tarball. @@ -1456,7 +1515,7 @@ control to Git repositories.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0n7qby5a4yz3s02nqcp5js6jg9wrd0x7msblxwb1883ds4b2b71a")))) + (base32 "0b3ks6viccq3n4p8i8zgfd40vp1k5nkhmmlz7p4nxcdizw8zxgn8")))) (build-system python-build-system) (arguments `(#:phases @@ -1497,6 +1556,12 @@ control to Git repositories.") " and not test_additional_rust_lib_dependencies_installed" " and not test_local_rust_additional_dependencies" " and not test_rust_hook" + ;; Disable dotnet tests. + " and not test_dotnet_hook" + ;; Disable nodejs tests. + " and not test_unhealthy_if_system_node_goes_missing" + " and not test_installs_without_links_outside_env" + " and not test_healthy_system_node" ;; Disable python2 test. " and not test_switch_language_versions_doesnt_clobber" ;; These tests try to open a network socket. @@ -1539,8 +1604,10 @@ control to Git repositories.") #t)))))) (native-inputs `(("git" ,git-minimal) - ("python-pytest" ,python-pytest))) - (inputs + ("python-pytest" ,python-pytest) + ("python-re-assert" ,python-re-assert))) + ;; Propagate because pre-commit is also used as a module. + (propagated-inputs `(("python-cfgv" ,python-cfgv) ("python-identify" ,python-identify) ("python-nodeenv" ,python-nodeenv) @@ -1558,14 +1625,14 @@ execution of any hook written in any language before every commit.") (define-public mercurial (package (name "mercurial") - (version "5.5.1") + (version "5.6.1") (source (origin (method url-fetch) (uri (string-append "https://www.mercurial-scm.org/" "release/mercurial-" version ".tar.gz")) (sha256 (base32 - "0x08yjs26j88kh1bvl2g3r24lnfc023ry3i1cxfq6haray6sv5ag")))) + "1bgz8f1a7lnmh6lzcvwg6q1yx6i7yibhwy06l4k55i04957jap75")))) (build-system python-build-system) (arguments `(#:phases @@ -1578,8 +1645,7 @@ execution of any hook written in any language before every commit.") "tests/test-run-tests.t" "tests/test-transplant.t") (("/bin/sh") - (which "sh"))) - #t)) + (which "sh"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (with-directory-excursion "tests" @@ -1590,9 +1656,10 @@ execution of any hook written in any language before every commit.") ;; PATH from before (that's why we are building it!)? "test-hghave.t" - ;; FIXME: Why does this fail in the build container, but - ;; not in 'guix environment -C' (even without /bin/sh)? + ;; These tests fail because the program is not + ;; connected to a TTY in the build container. "test-nointerrupt.t" + "test-transaction-rollback-on-sigpipe.t" ;; FIXME: This gets killed but does not receive an interrupt. "test-commandserver.t" @@ -1621,8 +1688,7 @@ execution of any hook written in any language before every commit.") "--slowtimeout" "86400" ;; The test suite takes a long time and produces little ;; output by default. Prevent timeouts due to silence. - "-v")) - #t)))))) + "-v")))))))) ;; The following inputs are only needed to run the tests. (native-inputs `(("python-nose" ,python-nose) @@ -1665,14 +1731,14 @@ history. It implements the changeset evolution concept for Mercurial.") (define-public neon (package (name "neon") - (version "0.30.2") + (version "0.31.2") (source (origin (method url-fetch) - (uri (string-append "http://www.webdav.org/neon/neon-" + (uri (string-append "https://notroj.github.io/neon/neon-" version ".tar.gz")) (sha256 (base32 - "1jpvczcx658vimqm7c8my2q41fnmjaf1j03g7bsli6rjxk6xh2yv")))) + "0y46dbhiblcvg8k41bdydr3fivghwk73z040ki5825d24ynf67ng")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) @@ -1686,11 +1752,12 @@ history. It implements the changeset evolution concept for Mercurial.") ;; https://sourceware.org/bugzilla/show_bug.cgi?id=16475 #:tests? #f #:configure-flags '("--enable-shared" + "--disable-static" ;; requires libgnutils-config, deprecated ;; in gnutls 2.8. ; "--with-ssl=gnutls"))) "--with-ssl=openssl"))) - (home-page "http://www.webdav.org/neon/") + (home-page "https://notroj.github.io/neon/") (synopsis "HTTP and WebDAV client library") (description "Neon is an HTTP and WebDAV client library, with a C interface and the @@ -1716,14 +1783,14 @@ following features: (define-public subversion (package (name "subversion") - (version "1.14.0") + (version "1.14.1") (source (origin (method url-fetch) (uri (string-append "mirror://apache/subversion/" "subversion-" version ".tar.bz2")) (sha256 (base32 - "00i1f88snlpcnsycpn6r315h6792l5nkr2p5k6kq6yprz4cf5a3b")))) + "1ag1hvcm9q92kgalzbbgcsq9clxnzmbj9nciz9lmabjx4lyajp9c")))) (build-system gnu-build-system) (arguments '(#:parallel-tests? #f ; TODO Seems to cause test failures on @@ -1799,26 +1866,17 @@ projects, from individuals to large-scale enterprise operations.") (define-public rcs (package (name "rcs") - (version "5.9.4") + (version "5.10.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/rcs/rcs-" version ".tar.xz")) (sha256 (base32 - "1zsx7bb0rgvvvisiy4zlixf56ay8wbd9qqqcp1a1g0m1gl6mlg86")) - (patches (search-patches "rcs-5.9.4-noreturn.patch")))) + "1if5pa4iip2p70gljm54nggfdnsfjxa4cqz8fpj07lvsijary39s")) + (patches (search-patches "rcs-5.10.0-no-stdin.patch")))) (build-system gnu-build-system) (native-inputs `(("ed" ,ed))) - (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-t810 - ;; See https://savannah.gnu.org/bugs/index.php?52288 - ;; Back-porting the fix is non-trivial, so disable for now. - (lambda _ - (substitute* "tests/Makefile" - ((" t810 \\\\\n") "")) - #t))))) (home-page "https://www.gnu.org/software/rcs/") (synopsis "Per-file local revision control system") (description @@ -1901,14 +1959,14 @@ masters from remote CVS hosts.") (define-public vc-dwim (package (name "vc-dwim") - (version "1.9") + (version "1.10") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/vc-dwim/vc-dwim-" version ".tar.xz")) (sha256 (base32 - "0mf1dd7wdqxsm4fcfinfd7iadzarmzvg747pbsbi32qpavpk8gdf")))) + "0am6axxdvkm2vwgg0gjrd930yv4dlsdbf0rdv0zh5bhy1ir64rph")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) (native-inputs @@ -1928,7 +1986,7 @@ standards-compliant ChangeLog entries based on the changes that it detects.") (define-public diffstat (package (name "diffstat") - (version "1.63") + (version "1.64") (source (origin (method url-fetch) (uri @@ -1939,7 +1997,7 @@ standards-compliant ChangeLog entries based on the changes that it detects.") "diffstat-" version ".tgz"))) (sha256 (base32 - "0vyw200s5dv1257pmrh6c6fdkmw3slyz5szpqfx916xr04sdbpby")))) + "1z7pwcv48fjnhxrjcsjdy83x8b9ckl582mbbds90a79fkn6y7bmq")))) (build-system gnu-build-system) (home-page "https://invisible-island.net/diffstat/") (synopsis "Make histograms from the output of @command{diff}") @@ -2165,7 +2223,7 @@ from Subversion to any supported Distributed Version Control System (DVCS).") (define-public tig (package (name "tig") - (version "2.5.1") + (version "2.5.3") (source (origin (method url-fetch) (uri (string-append @@ -2173,7 +2231,7 @@ from Subversion to any supported Distributed Version Control System (DVCS).") version "/tig-" version ".tar.gz")) (sha256 (base32 - "0r4y9hyvpkplaxrzslws3asz652d83qh3bjwvmp8assga8s5s3ah")))) + "1p1575yh4daxjifywxkd0hgyfwciylqcm2qakawvwn6mk620ca75")))) (build-system gnu-build-system) (native-inputs `(("asciidoc" ,asciidoc) @@ -2269,6 +2327,83 @@ supports a large number of version control systems: Git, Subversion, Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.") (license license:gpl2+))) +(define-public grokmirror + (package + (name "grokmirror") + (version "2.0.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://git.kernel.org/pub/scm/" + "utils/grokmirror/grokmirror.git")) + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 "0zfiwjw02df3mzpawp9jx61iwp0nhcf6y03cs8022l0hkvc7blbr")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; no test suite + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-manpages + (lambda* (#:key outputs #:allow-other-keys) + (let* ((man (string-append (assoc-ref outputs "out") + "/man/man1/"))) + (mkdir-p man) + (for-each (lambda (file) (install-file file man)) + (find-files "." "\\.1$"))) + #t))))) + (propagated-inputs + `(("python-packaging" ,python-packaging) + ("python-requests" ,python-requests))) + (home-page + "https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git") + (synopsis "Framework to smartly mirror git repositories") + (description "Grokmirror enables replicating large git repository +collections efficiently. Mirrors decide to clone and update repositories +based on a manifest file published by servers.") + (license license:gpl3+))) + +(define-public b4 + (package + (name "b4") + (version "0.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "b4" version)) + (sha256 + (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fixes issue with dependency requirements being too strict. See upstream commit: + ;; https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=31348a14afdb1d39e7faf9576eaddea1ced76e19 + (substitute* "setup.py" + (("~=") ">=")) + #t)))) + (build-system python-build-system) + (arguments '(#:tests? #f)) ; No tests. + (inputs + `(("python-dkimpy" ,python-dkimpy) + ("python-dnspython" ,python-dnspython) + ("python-requests" ,python-requests))) + (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git") + (synopsis "Tool for working with patches in public-inbox archives") + (description + "The @code{b4} command is designed to make it easier to participate in +patch-based workflows for projects that have public-inbox archives. + +Features include: +@itemize +@item downloading a thread's mbox given a message ID +@item processing an mbox so that is ready to be fed to @code{git-am} +@item creating templated replies for processed patches and pull requests +@item submitting cryptographic attestation for patches. +@end itemize") + (license license:gpl2+))) + (define-public git-annex-remote-rclone (package (name "git-annex-remote-rclone") @@ -2587,7 +2722,7 @@ interrupted, published, and collaborated on while in progress.") (define-public git-lfs (package (name "git-lfs") - (version "2.11.0") + (version "2.13.3") (source (origin (method git-fetch) (uri (git-reference @@ -2596,7 +2731,7 @@ interrupted, published, and collaborated on while in progress.") (file-name (git-file-name name version)) (sha256 (base32 - "05qd96bn2cl7gn5qarbcv6scdpj28qiwdfzalamqk5jjiidpmng5")))) + "0r7dmqhkhz91d3n7qfpny483x8f1n88yya22j2fvx75rgg33z2sg")))) (build-system go-build-system) (arguments `(#:import-path "github.com/git-lfs/git-lfs" @@ -2633,6 +2768,40 @@ videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server.") (license license:expat))) +(define-public git-open + (package + (name "git-open") + (version "2.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/paulirish/git-open") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0")))) + (build-system copy-build-system) + (inputs + `(("xdg-utils" ,xdg-utils))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (xdg-utils (assoc-ref inputs "xdg-utils"))) + (wrap-program (string-append out "/bin/git-open") + `("PATH" ":" prefix (,(string-append xdg-utils "/bin")))))))) + #:install-plan + '(("git-open" "bin/git-open")))) + (home-page "https://github.com/paulirish/git-open") + (synopsis "Open a Git repository's homepage from the command-line") + (description + "@code{git open} opens the repository's website from the command-line, +guessing the URL pattern from the @code{origin} remote.") + (license license:expat))) + (define-public tla (package (name "gnu-arch") @@ -2690,6 +2859,53 @@ for historians.") (home-page "https://www.gnu.org/software/gnu-arch/") (license license:gpl2))) ;version 2 only +(define-public diff-so-fancy + (package + (name "diff-so-fancy") + (version "1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/so-fancy/diff-so-fancy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl")))) + (inputs + `(("perl" ,perl) + ("ncurses" ,ncurses))) + (build-system copy-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-lib-path + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (substitute* "diff-so-fancy" + (("use lib.*$") + (string-append "use lib '" lib "';\n"))) + #t))) + (add-after 'install 'symlink-executable + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (ncurses (assoc-ref inputs "ncurses")) + (perl (assoc-ref inputs "perl"))) + (wrap-program (string-append out "/bin/diff-so-fancy") + `("PATH" ":" prefix (,(string-append ncurses "/bin") + ,(string-append perl "/bin")))) + #t)))) + #:install-plan + '(("lib" "lib") + ("diff-so-fancy" "bin/")))) + (home-page "https://github.com/so-fancy/diff-so-fancy") + (synopsis "Makes diffs more human friendly and readable") + (description + "@code{diff-so-fancy} strives to make your diffs human readable instead +of machine readable. This helps improve code quality and helps you spot +defects faster.") + (license license:expat))) + (define-public go-github-go-git (package (name "go-github-go-git") @@ -2743,3 +2959,115 @@ for historians.") (synopsis "Git implementation library") (description "This package provides a Git implementation library.") (license license:asl2.0))) + +(define-public gita + (let ((commit "e41b504dca90a25e9be27f296da7ce22e5782893") + (revision "1")) + (package + (name "gita") + (version (git-version "0.12.9" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nosarthur/gita") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1k03zgcbhl91cgyh4k7ywyjp00y63q4bqbimncqh5b3lni8l8j5l")))) + (build-system python-build-system) + (native-inputs + `(("git" ,git) ;for tests + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-pyyaml" ,python-pyyaml))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "tests/test_main.py" + (("'gita\\\\n'") "'source\\n'") + (("'gita'") "'source'")) + (invoke (string-append (assoc-ref inputs "git") "/bin/git") + "init") + (add-installed-pythonpath inputs outputs) + (invoke (string-append (assoc-ref inputs "python-pytest") + "/bin/pytest") + "-vv" "tests"))) + (add-after 'install 'install-shell-completions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash-completion (string-append out "/etc/bash_completion.d")) + (zsh-completion (string-append out "/etc/zsh/site-functions"))) + (mkdir-p bash-completion) + (copy-file ".gita-completion.bash" + (string-append bash-completion "/gita")) + (mkdir-p zsh-completion) + (copy-file ".gita-completion.zsh" + (string-append zsh-completion "/_gita")))))))) + (home-page "https://github.com/nosarthur/gita") + (synopsis "Command-line tool to manage multiple Git repos") + (description "This package provides a command-line tool to manage +multiple Git repos. + +This tool does two things: +@itemize +@item display the status of multiple Git repos such as branch, modification, +commit message side by side +@item (batch) delegate Git commands/aliases from any working directory +@end itemize + +If several repos are related, it helps to see their status together.") + (license license:expat)))) + +(define-public ghq + (package + (name "ghq") + (version "1.1.5") + (home-page "https://github.com/x-motemen/ghq") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "098fik155viylq07az7crzbgswcvhpx0hr68xpvyx0rpri792jbq")))) + (build-system go-build-system) + (arguments + '(#:install-source? #f + #:import-path "github.com/x-motemen/ghq" + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-completions + (lambda* (#:key outputs import-path #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash-completion (string-append out "/etc/bash_completion.d")) + (zsh-completion (string-append out "/share/zsh/site-functions"))) + (with-directory-excursion (string-append "src/" import-path) + (mkdir-p bash-completion) + (copy-file "misc/bash/_ghq" + (string-append bash-completion "/ghq")) + (mkdir-p zsh-completion) + (copy-file "misc/zsh/_ghq" + (string-append zsh-completion "/_ghq")))) + #t))))) + (native-inputs + `(("git" ,git-minimal))) + (inputs + `(("github.com/songmu/gitconfig" ,go-github-com-songmu-gitconfig) + ("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty) + ("github.com/motemen/go-colorine" ,go-github-com-motemen-go-colorine) + ("github.com/saracen/walker" ,go-github-com-saracen-walker) + ("github.com/urfave/cli/v2" ,go-github-com-urfave-cli-v2) + ("golang.org/x/net/html" ,go-golang-org-x-net-html) + ("golang.org/x/sync/errgroup" ,go-golang.org-x-sync-errgroup))) + (synopsis "Manage remote repository clones") + (description + "@code{ghq} provides a way to organize remote repository clones, like +@code{go get} does. When you clone a remote repository by @code{ghq get}, ghq +makes a directory under a specific root directory (by default @file{~/ghq}) +using the remote repository URL's host and path.") + (license license:expat)))