gnu: git: Fix indentation.

* gnu/packages/version-control.scm (git): Fix indentation.
This commit is contained in:
Maxim Cournoyer 2022-07-11 17:37:32 -04:00
parent fc61ff1d79
commit 3e0902cbcc
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -220,258 +220,258 @@ Python 3.3 and later, rather than on Python 2.")
(define-public git (define-public git
(package (package
(name "git") (name "git")
(version "2.36.1") (version "2.36.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://kernel.org/software/scm/git/git-" (uri (string-append "mirror://kernel.org/software/scm/git/git-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0")))) "0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("native-perl" ,perl) `(("native-perl" ,perl)
;; Add bash-minimal explicitly to ensure it comes before bash-for-tests, ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
;; see <https://bugs.gnu.org/39513>. ;; see <https://bugs.gnu.org/39513>.
("bash" ,bash-minimal) ("bash" ,bash-minimal)
("bash-for-tests" ,bash) ("bash-for-tests" ,bash)
("gettext" ,gettext-minimal) ("gettext" ,gettext-minimal)
;; To build the man pages from the git sources, we would need a dependency ;; To build the man pages from the git sources, we would need a dependency
;; on a full XML tool chain, and building it actually takes ages. So we ;; on a full XML tool chain, and building it actually takes ages. So we
;; use this lazy approach and use released tarball. ;; use this lazy approach and use released tarball.
("git-manpages" ("git-manpages"
,(origin ,(origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://kernel.org/software/scm/git/git-manpages-" "mirror://kernel.org/software/scm/git/git-manpages-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0vsfjs6xg228yhqcpaiwkpncaqcghnm0pwdxmgibz0rj6d8ydrmi")))) "0vsfjs6xg228yhqcpaiwkpncaqcghnm0pwdxmgibz0rj6d8ydrmi"))))
;; For subtree documentation. ;; For subtree documentation.
("asciidoc" ,asciidoc) ("asciidoc" ,asciidoc)
("docbook2x" ,docbook2x) ("docbook2x" ,docbook2x)
("docbook-xsl" ,docbook-xsl) ("docbook-xsl" ,docbook-xsl)
("libxslt" ,libxslt) ("libxslt" ,libxslt)
("pkg-config" ,pkg-config) ("pkg-config" ,pkg-config)
("texinfo" ,texinfo) ("texinfo" ,texinfo)
("xmlto" ,xmlto))) ("xmlto" ,xmlto)))
(inputs (inputs
`(("curl" ,curl) `(("curl" ,curl)
("expat" ,expat) ("expat" ,expat)
("openssl" ,openssl) ("openssl" ,openssl)
("perl" ,perl) ("perl" ,perl)
("python" ,python) ; for git-p4 ("python" ,python) ; for git-p4
("zlib" ,zlib) ("zlib" ,zlib)
;; For PCRE support in git grep (USE_LIBPCRE2). ;; For PCRE support in git grep (USE_LIBPCRE2).
("pcre" ,pcre2) ("pcre" ,pcre2)
;; For 'gitweb.cgi'. ;; For 'gitweb.cgi'.
("perl-cgi" ,perl-cgi) ("perl-cgi" ,perl-cgi)
;; For 'git-svn'. ;; For 'git-svn'.
("subversion" ,subversion) ("subversion" ,subversion)
("perl-term-readkey" ,perl-term-readkey) ("perl-term-readkey" ,perl-term-readkey)
;; For 'git-send-email'. ;; For 'git-send-email'.
("perl-authen-sasl" ,perl-authen-sasl) ("perl-authen-sasl" ,perl-authen-sasl)
("perl-net-smtp-ssl" ,perl-net-smtp-ssl) ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
("perl-io-socket-ssl" ,perl-io-socket-ssl) ("perl-io-socket-ssl" ,perl-io-socket-ssl)
;; For 'git gui', 'gitk', and 'git citool'. ;; For 'git gui', 'gitk', and 'git citool'.
("tcl" ,tcl) ("tcl" ,tcl)
("tk" ,tk) ("tk" ,tk)
;; For 'git-credential-libsecret' ;; For 'git-credential-libsecret'
("glib" ,glib) ("glib" ,glib)
("libsecret" ,libsecret))) ("libsecret" ,libsecret)))
(outputs '("out" ; the core (outputs '("out" ; the core
"send-email" ; for git-send-email "send-email" ; for git-send-email
"svn" ; git-svn "svn" ; git-svn
"credential-netrc" ; git-credential-netrc "credential-netrc" ; git-credential-netrc
"credential-libsecret" ; git-credential-libsecret "credential-libsecret" ; git-credential-libsecret
"subtree" ; git-subtree "subtree" ; git-subtree
"gui")) ; gitk, git gui "gui")) ; gitk, git gui
(arguments (arguments
`(#:make-flags `("V=1" ;more verbose compilation `(#:make-flags `("V=1" ;more verbose compilation
,(string-append "SHELL_PATH=" ,(string-append "SHELL_PATH="
(assoc-ref %build-inputs "bash") (assoc-ref %build-inputs "bash")
"/bin/sh") "/bin/sh")
;; Tests require a bash with completion support. ;; Tests require a bash with completion support.
,(string-append "TEST_SHELL_PATH=" ,(string-append "TEST_SHELL_PATH="
(assoc-ref %build-inputs "bash-for-tests") (assoc-ref %build-inputs "bash-for-tests")
"/bin/bash") "/bin/bash")
"USE_LIBPCRE2=yes" "USE_LIBPCRE2=yes"
;; By default 'make install' creates hard links for ;; By default 'make install' creates hard links for
;; things in 'libexec/git-core', which leads to huge ;; things in 'libexec/git-core', which leads to huge
;; nars; see <https://bugs.gnu.org/21949>. ;; nars; see <https://bugs.gnu.org/21949>.
"NO_INSTALL_HARDLINKS=indeed") "NO_INSTALL_HARDLINKS=indeed")
;; Make sure the full bash does not end up in the final closure. ;; Make sure the full bash does not end up in the final closure.
#:disallowed-references (,bash) #:disallowed-references (,bash)
#:test-target "test" #:test-target "test"
;; The explicit --with-tcltk forces the build system to hardcode the ;; The explicit --with-tcltk forces the build system to hardcode the
;; absolute file name to 'wish'. ;; absolute file name to 'wish'.
#:configure-flags (list (string-append "--with-tcltk=" #:configure-flags (list (string-append "--with-tcltk="
(assoc-ref %build-inputs "tk") (assoc-ref %build-inputs "tk")
"/bin/wish8.6") ; XXX "/bin/wish8.6") ; XXX
,@(if (%current-target-system) ,@(if (%current-target-system)
git-cross-configure-flags git-cross-configure-flags
'())) '()))
#:modules ((srfi srfi-1) #:modules ((srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
((guix build gnu-build-system) #:prefix gnu:) ((guix build gnu-build-system) #:prefix gnu:)
,@%gnu-build-system-modules) ,@%gnu-build-system-modules)
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
,@(if (%current-target-system) ,@(if (%current-target-system)
;; The git build system assumes build == host ;; The git build system assumes build == host
`((add-after 'unpack 'use-host-uname_S `((add-after 'unpack 'use-host-uname_S
(lambda _ (lambda _
(substitute* "config.mak.uname" (substitute* "config.mak.uname"
(("uname_S := .*" all) (("uname_S := .*" all)
(if (equal? ,(%current-target-system) "i586-pc-gnu") (if (equal? ,(%current-target-system) "i586-pc-gnu")
"uname_S := GNU\n" "uname_S := GNU\n"
all)))))) all))))))
;; We do not have bash-for-tests when cross-compiling. ;; We do not have bash-for-tests when cross-compiling.
`((add-after 'unpack 'modify-PATH `((add-after 'unpack 'modify-PATH
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((path (string-split (getenv "PATH") #\:)) (let ((path (string-split (getenv "PATH") #\:))
(bash-full (assoc-ref inputs "bash-for-tests"))) (bash-full (assoc-ref inputs "bash-for-tests")))
;; Drop the test bash from PATH so that (which "sh") and ;; Drop the test bash from PATH so that (which "sh") and
;; similar does the right thing. ;; similar does the right thing.
(setenv "PATH" (string-join (setenv "PATH" (string-join
(remove (cut string-prefix? bash-full <>) path) (remove (cut string-prefix? bash-full <>) path)
":"))))))) ":")))))))
;; Add cross curl-config script to PATH when cross-compiling. ;; Add cross curl-config script to PATH when cross-compiling.
,@(if (%current-target-system) ,@(if (%current-target-system)
'((add-before 'configure 'add-cross-curl-config '((add-before 'configure 'add-cross-curl-config
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(setenv "PATH" (setenv "PATH"
(string-append (assoc-ref inputs "curl") "/bin:" (string-append (assoc-ref inputs "curl") "/bin:"
(getenv "PATH")))))) (getenv "PATH"))))))
'()) '())
(add-after 'configure 'patch-makefiles (add-after 'configure 'patch-makefiles
(lambda _ (lambda _
(substitute* "Makefile" (substitute* "Makefile"
(("/usr/bin/perl") (which "perl")) (("/usr/bin/perl") (which "perl"))
(("/usr/bin/python") (which "python3"))))) (("/usr/bin/python") (which "python3")))))
(add-after 'configure 'add-PM.stamp (add-after 'configure 'add-PM.stamp
(lambda _ (lambda _
;; Add the "PM.stamp" to avoid "no rule to make target". ;; Add the "PM.stamp" to avoid "no rule to make target".
(call-with-output-file "perl/PM.stamp" (const #t)))) (call-with-output-file "perl/PM.stamp" (const #t))))
(add-after 'build 'build-subtree (add-after 'build 'build-subtree
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "contrib/subtree" (with-directory-excursion "contrib/subtree"
(substitute* "Makefile" (substitute* "Makefile"
;; Apparently `xmlto' does not bother to looks up the stylesheets ;; Apparently `xmlto' does not bother to looks up the stylesheets
;; specified in the XML, unlike the above substitution. Instead it ;; specified in the XML, unlike the above substitution. Instead it
;; uses a hard-coded URL. Work around it here, but if this is ;; uses a hard-coded URL. Work around it here, but if this is
;; common perhaps we should hardcode this path in xmlto itself. ;; common perhaps we should hardcode this path in xmlto itself.
(("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)") (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
(string-append "$(XMLTO) -x " (string-append "$(XMLTO) -x "
(string-append (assoc-ref inputs "docbook-xsl") (string-append (assoc-ref inputs "docbook-xsl")
"/xml/xsl/docbook-xsl-" "/xml/xsl/docbook-xsl-"
,(package-version docbook-xsl)) ,(package-version docbook-xsl))
"/manpages/docbook.xsl -m $(MANPAGE_XSL)"))) "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
(invoke "make") (invoke "make")
(invoke "make" "install") (invoke "make" "install")
(invoke "make" "install-doc") (invoke "make" "install-doc")
(substitute* "git-subtree" (substitute* "git-subtree"
(("/bin/sh") (which "sh")))))) (("/bin/sh") (which "sh"))))))
(add-before 'check 'patch-tests (add-before 'check 'patch-tests
(lambda _ (lambda _
(let ((store-directory (%store-directory))) (let ((store-directory (%store-directory)))
;; These files contain some funny bytes that Guile is unable ;; These files contain some funny bytes that Guile is unable
;; to decode for shebang patching. Just delete them. ;; to decode for shebang patching. Just delete them.
(for-each delete-file '("t/t4201-shortlog.sh" (for-each delete-file '("t/t4201-shortlog.sh"
"t/t7813-grep-icase-iso.sh")) "t/t7813-grep-icase-iso.sh"))
;; Many tests contain inline shell scripts (hooks etc). ;; Many tests contain inline shell scripts (hooks etc).
(substitute* (find-files "t" "\\.sh$") (substitute* (find-files "t" "\\.sh$")
(("#!/bin/sh") (string-append "#!" (which "sh")))) (("#!/bin/sh") (string-append "#!" (which "sh"))))
;; Un-do shebang patching here to prevent checksum mismatch. ;; Un-do shebang patching here to prevent checksum mismatch.
(substitute* '("t/t4034/perl/pre" "t/t4034/perl/post") (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
(("^#!.*/bin/perl") "#!/usr/bin/perl")) (("^#!.*/bin/perl") "#!/usr/bin/perl"))
(substitute* "t/t5003-archive-zip.sh" (substitute* "t/t5003-archive-zip.sh"
(("cp /bin/sh") (string-append "cp " (which "sh")))) (("cp /bin/sh") (string-append "cp " (which "sh"))))
(substitute* "t/t6030-bisect-porcelain.sh" (substitute* "t/t6030-bisect-porcelain.sh"
(("\"/bin/sh\"") (string-append "\"" (which "sh") "\""))) (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
;; FIXME: This test runs `git commit` with a bogus EDITOR ;; FIXME: This test runs `git commit` with a bogus EDITOR
;; and empty commit message, but does not fail the way it's ;; and empty commit message, but does not fail the way it's
;; expected to. The test passes when invoked interactively. ;; expected to. The test passes when invoked interactively.
(substitute* "t/t7508-status.sh" (substitute* "t/t7508-status.sh"
(("\tcommit_template_commented") "\ttrue")) (("\tcommit_template_commented") "\ttrue"))
;; More checksum mismatches due to odd shebangs. ;; More checksum mismatches due to odd shebangs.
(substitute* "t/t9100-git-svn-basic.sh" (substitute* "t/t9100-git-svn-basic.sh"
(((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") ) (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
(substitute* "t/t9300-fast-import.sh" (substitute* "t/t9300-fast-import.sh"
(((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh") (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
(((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh")) (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
;; FIXME: Some hooks fail with "basename: command not found". ;; FIXME: Some hooks fail with "basename: command not found".
;; See 't/trash directory.t9164.../svn-hook.log'. ;; See 't/trash directory.t9164.../svn-hook.log'.
(delete-file "t/t9164-git-svn-dcommit-concurrent.sh") (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
;; XXX: These tests fail intermittently for unknown reasons: ;; XXX: These tests fail intermittently for unknown reasons:
;; <https://bugs.gnu.org/29546>. ;; <https://bugs.gnu.org/29546>.
(for-each delete-file (for-each delete-file
'("t/t9128-git-svn-cmd-branch.sh" '("t/t9128-git-svn-cmd-branch.sh"
"t/t9167-git-svn-cmd-branch-subproject.sh" "t/t9167-git-svn-cmd-branch-subproject.sh"
"t/t9141-git-svn-multiple-branches.sh"))))) "t/t9141-git-svn-multiple-branches.sh")))))
(add-after 'install 'install-info-manual (add-after 'install 'install-info-manual
(lambda* (#:key parallel-build? #:allow-other-keys) (lambda* (#:key parallel-build? #:allow-other-keys)
(define job-count (if parallel-build? (define job-count (if parallel-build?
(number->string (parallel-job-count)) (number->string (parallel-job-count))
"1")) "1"))
(invoke "make" "-C" "Documentation" "install-info" (invoke "make" "-C" "Documentation" "install-info"
"-j" job-count "-j" job-count
;; The Makefile refer to 'docbook2x-texi', but our binary ;; The Makefile refer to 'docbook2x-texi', but our binary
;; is named 'docbook2texi'. ;; is named 'docbook2texi'.
"DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl"))) "DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl")))
(add-after 'install 'install-shell-completion (add-after 'install 'install-shell-completion
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(completions (string-append out "/etc/bash_completion.d"))) (completions (string-append out "/etc/bash_completion.d")))
;; TODO: Install the tcsh and zsh completions in the right place. ;; TODO: Install the tcsh and zsh completions in the right place.
(mkdir-p completions) (mkdir-p completions)
(copy-file "contrib/completion/git-completion.bash" (copy-file "contrib/completion/git-completion.bash"
(string-append completions "/git"))))) (string-append completions "/git")))))
(add-after 'install 'install-credential-netrc (add-after 'install 'install-credential-netrc
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((netrc (assoc-ref outputs "credential-netrc"))) (let* ((netrc (assoc-ref outputs "credential-netrc")))
(install-file "contrib/credential/netrc/git-credential-netrc.perl" (install-file "contrib/credential/netrc/git-credential-netrc.perl"
(string-append netrc "/bin")) (string-append netrc "/bin"))
(rename-file (string-append netrc "/bin/git-credential-netrc.perl") (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
(string-append netrc "/bin/git-credential-netrc")) (string-append netrc "/bin/git-credential-netrc"))
;; Previously, Git.pm was automatically found by netrc. ;; Previously, Git.pm was automatically found by netrc.
;; Perl 5.26 changed how it locates modules so that @INC no ;; Perl 5.26 changed how it locates modules so that @INC no
;; longer includes the current working directory (the Perl ;; longer includes the current working directory (the Perl
;; community calls this "dotless @INC"). ;; community calls this "dotless @INC").
(wrap-program (string-append netrc "/bin/git-credential-netrc") (wrap-program (string-append netrc "/bin/git-credential-netrc")
`("PERL5LIB" ":" prefix `("PERL5LIB" ":" prefix
(,(string-append (assoc-ref outputs "out") "/share/perl5"))))))) (,(string-append (assoc-ref outputs "out") "/share/perl5")))))))
(add-after 'install 'install-credential-libsecret (add-after 'install 'install-credential-libsecret
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((libsecret (assoc-ref outputs "credential-libsecret"))) (let* ((libsecret (assoc-ref outputs "credential-libsecret")))
(with-directory-excursion "contrib/credential/libsecret" (with-directory-excursion "contrib/credential/libsecret"
((assoc-ref gnu:%standard-phases 'build)) ((assoc-ref gnu:%standard-phases 'build))
(install-file "git-credential-libsecret" (install-file "git-credential-libsecret"
(string-append libsecret "/bin")))))) (string-append libsecret "/bin"))))))
(add-after 'install 'install-subtree (add-after 'install 'install-subtree
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((subtree (assoc-ref outputs "subtree"))) (let ((subtree (assoc-ref outputs "subtree")))
(install-file "contrib/subtree/git-subtree" (install-file "contrib/subtree/git-subtree"
(string-append subtree "/bin")) (string-append subtree "/bin"))
(install-file "contrib/subtree/git-subtree.1" (install-file "contrib/subtree/git-subtree.1"
(string-append subtree "/share/man/man1"))))) (string-append subtree "/share/man/man1")))))
(add-after 'install 'restore-sample-hooks-shebang (add-after 'install 'restore-sample-hooks-shebang
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
@ -481,117 +481,117 @@ Python 3.3 and later, rather than on Python 2.")
(substitute* file (substitute* file
(("^#!.*/bin/sh") "#!/bin/sh"))) (("^#!.*/bin/sh") "#!/bin/sh")))
(find-files dir ".*"))))) (find-files dir ".*")))))
(add-after 'install 'split (add-after 'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Split the binaries to the various outputs. ;; Split the binaries to the various outputs.
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(se (assoc-ref outputs "send-email")) (se (assoc-ref outputs "send-email"))
(svn (assoc-ref outputs "svn")) (svn (assoc-ref outputs "svn"))
(gui (assoc-ref outputs "gui")) (gui (assoc-ref outputs "gui"))
(gitk (string-append out "/bin/gitk")) (gitk (string-append out "/bin/gitk"))
(gitk* (string-append gui "/bin/gitk")) (gitk* (string-append gui "/bin/gitk"))
(git-gui (string-append out "/libexec/git-core/git-gui")) (git-gui (string-append out "/libexec/git-core/git-gui"))
(git-gui* (string-append gui "/libexec/git-core/git-gui")) (git-gui* (string-append gui "/libexec/git-core/git-gui"))
(git-cit (string-append out "/libexec/git-core/git-citool")) (git-cit (string-append out "/libexec/git-core/git-citool"))
(git-cit* (string-append gui "/libexec/git-core/git-citool")) (git-cit* (string-append gui "/libexec/git-core/git-citool"))
(git-se (string-append out "/libexec/git-core/git-send-email")) (git-se (string-append out "/libexec/git-core/git-send-email"))
(git-se* (string-append se "/libexec/git-core/git-send-email")) (git-se* (string-append se "/libexec/git-core/git-send-email"))
(git-svn (string-append out "/libexec/git-core/git-svn")) (git-svn (string-append out "/libexec/git-core/git-svn"))
(git-svn* (string-append svn "/libexec/git-core/git-svn")) (git-svn* (string-append svn "/libexec/git-core/git-svn"))
(git-sm (string-append out (git-sm (string-append out
"/libexec/git-core/git-submodule"))) "/libexec/git-core/git-submodule")))
(mkdir-p (string-append gui "/bin")) (mkdir-p (string-append gui "/bin"))
(mkdir-p (string-append gui "/libexec/git-core")) (mkdir-p (string-append gui "/libexec/git-core"))
(mkdir-p (string-append se "/libexec/git-core")) (mkdir-p (string-append se "/libexec/git-core"))
(mkdir-p (string-append svn "/libexec/git-core")) (mkdir-p (string-append svn "/libexec/git-core"))
(for-each (lambda (old new) (for-each (lambda (old new)
(copy-file old new) (copy-file old new)
(delete-file old) (delete-file old)
(chmod new #o555)) (chmod new #o555))
(list gitk git-gui git-cit git-se git-svn) (list gitk git-gui git-cit git-se git-svn)
(list gitk* git-gui* git-cit* git-se* git-svn*)) (list gitk* git-gui* git-cit* git-se* git-svn*))
;; Tell 'git-svn' where Subversion and perl-term-readkey are. ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
(wrap-program git-svn* (wrap-program git-svn*
`("PATH" ":" prefix `("PATH" ":" prefix
(,(string-append (assoc-ref inputs "subversion") (,(string-append (assoc-ref inputs "subversion")
"/bin"))) "/bin")))
`("PERL5LIB" ":" prefix `("PERL5LIB" ":" prefix
,(map (lambda (i) (string-append (assoc-ref inputs i) ,(map (lambda (i) (string-append (assoc-ref inputs i)
"/lib/perl5/site_perl")) "/lib/perl5/site_perl"))
'("subversion" "perl-term-readkey"))) '("subversion" "perl-term-readkey")))
;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
;; help it find 'libsvn_client-1.so'. ;; help it find 'libsvn_client-1.so'.
`("LD_LIBRARY_PATH" ":" prefix `("LD_LIBRARY_PATH" ":" prefix
(,(string-append (assoc-ref inputs "subversion") (,(string-append (assoc-ref inputs "subversion")
"/lib")))) "/lib"))))
;; Tell 'git-send-email' where perl modules are. ;; Tell 'git-send-email' where perl modules are.
(wrap-program git-se* (wrap-program git-se*
`("PERL5LIB" ":" prefix `("PERL5LIB" ":" prefix
,(map (lambda (o) (string-append o "/lib/perl5/site_perl")) ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
(list (list
,@(transitive-input-references ,@(transitive-input-references
'inputs 'inputs
(map (lambda (l) (map (lambda (l)
(assoc l (package-inputs this-package))) (assoc l (package-inputs this-package)))
'("perl-authen-sasl" '("perl-authen-sasl"
"perl-net-smtp-ssl" "perl-net-smtp-ssl"
"perl-io-socket-ssl"))))))) "perl-io-socket-ssl")))))))
;; Tell 'gitweb.cgi' where perl modules are. ;; Tell 'gitweb.cgi' where perl modules are.
(wrap-program (string-append out "/share/gitweb/gitweb.cgi") (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
`("PERL5LIB" ":" prefix `("PERL5LIB" ":" prefix
,(map (lambda (o) (string-append o "/lib/perl5/site_perl")) ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
(list (list
,@(transitive-input-references ,@(transitive-input-references
'inputs 'inputs
(map (lambda (l) (map (lambda (l)
(assoc l (package-inputs this-package))) (assoc l (package-inputs this-package)))
'("perl-cgi"))))))) '("perl-cgi")))))))
;; Tell 'git-submodule' where Perl is. ;; Tell 'git-submodule' where Perl is.
(wrap-program git-sm (wrap-program git-sm
`("PATH" ":" prefix `("PATH" ":" prefix
(,(string-append (assoc-ref inputs "perl") (,(string-append (assoc-ref inputs "perl")
"/bin"))))))) "/bin")))))))
(add-after 'split 'install-man-pages (add-after 'split 'install-man-pages
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man")) (man (string-append out "/share/man"))
(manpages (assoc-ref inputs "git-manpages"))) (manpages (assoc-ref inputs "git-manpages")))
(mkdir-p man) (mkdir-p man)
(with-directory-excursion man (with-directory-excursion man
(invoke "tar" "xvf" manpages)))))))) (invoke "tar" "xvf" manpages))))))))
(native-search-paths (native-search-paths
;; For HTTPS access, Git needs a single-file certificate bundle, specified ;; For HTTPS access, Git needs a single-file certificate bundle, specified
;; with $GIT_SSL_CAINFO. ;; with $GIT_SSL_CAINFO.
(list (search-path-specification (list (search-path-specification
(variable "GIT_SSL_CAINFO") (variable "GIT_SSL_CAINFO")
(file-type 'regular) (file-type 'regular)
(separator #f) ;single entry (separator #f) ;single entry
(files '("etc/ssl/certs/ca-certificates.crt"))) (files '("etc/ssl/certs/ca-certificates.crt")))
(search-path-specification (search-path-specification
(variable "GIT_EXEC_PATH") (variable "GIT_EXEC_PATH")
(separator #f) ;single entry (separator #f) ;single entry
(files '("libexec/git-core"))))) (files '("libexec/git-core")))))
(synopsis "Distributed version control system") (synopsis "Distributed version control system")
(description (description
"Git is a free distributed version control system designed to handle "Git is a free distributed version control system designed to handle
everything from small to very large projects with speed and efficiency.") everything from small to very large projects with speed and efficiency.")
;; XXX: Ignore this CVE to work around a name clash with the unrelated ;; XXX: Ignore this CVE to work around a name clash with the unrelated
;; "cpe:2.3:a:jenkins:git" package. The proper fix is for (guix cve) to ;; "cpe:2.3:a:jenkins:git" package. The proper fix is for (guix cve) to
;; account for "vendor names". ;; account for "vendor names".
(properties '((lint-hidden-cve . ("CVE-2018-1000182" (properties '((lint-hidden-cve . ("CVE-2018-1000182"
"CVE-2018-1000110" "CVE-2018-1000110"
"CVE-2019-1003010" "CVE-2019-1003010"
"CVE-2020-2136")))) "CVE-2020-2136"))))
(license license:gpl2) (license license:gpl2)
(home-page "https://git-scm.com/"))) (home-page "https://git-scm.com/")))
(define-public git-minimal (define-public git-minimal
;; The size of the closure of 'git-minimal' is two thirds that of 'git'. ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.