gnu: git: Remove labels and use gexps.
* gnu/packages/version-control.scm (git) [native-inputs, inputs]: Remove labels. [arguments]: Use gexps. Use gexp variables input searching procedures where it makes sense. Reviewed-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Change-Id: I1c5d0bb5eb9639342c11af94dca2ae2174496459
This commit is contained in:
parent
1de0e8540b
commit
f288604428
@ -242,358 +242,373 @@ Python 3.3 and later, rather than on Python 2.")
|
|||||||
|
|
||||||
(define-public git
|
(define-public git
|
||||||
(package
|
(package
|
||||||
(name "git")
|
(name "git")
|
||||||
(version "2.45.2")
|
(version "2.45.2")
|
||||||
(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
|
||||||
"1nws1vjgj54sv32wxl1h3n1jkcpabqv7a605hhafsby0n5zfigsi"))))
|
"1nws1vjgj54sv32wxl1h3n1jkcpabqv7a605hhafsby0n5zfigsi"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("native-perl" ,perl)
|
(list 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-minimal
|
||||||
("bash-for-tests" ,bash)
|
bash
|
||||||
("gettext" ,gettext-minimal)
|
gettext-minimal
|
||||||
;; To build the man pages from the git sources, we would need a dependency
|
;; For subtree documentation.
|
||||||
;; on a full XML tool chain, and building it actually takes ages. So we
|
asciidoc
|
||||||
;; use this lazy approach and use released tarball.
|
docbook2x
|
||||||
("git-manpages"
|
docbook-xsl
|
||||||
,(origin
|
libxslt
|
||||||
(method url-fetch)
|
pkg-config
|
||||||
(uri (string-append
|
texinfo
|
||||||
"mirror://kernel.org/software/scm/git/git-manpages-"
|
xmlto))
|
||||||
version ".tar.xz"))
|
(inputs
|
||||||
(sha256
|
(list curl
|
||||||
(base32
|
expat
|
||||||
"1pqrp46kwbxycqld39027ph1cvkq9am156y3sswn6w2khsg30f09"))))
|
openssl
|
||||||
;; For subtree documentation.
|
perl
|
||||||
("asciidoc" ,asciidoc)
|
python ;for git-p4
|
||||||
("docbook2x" ,docbook2x)
|
zlib
|
||||||
("docbook-xsl" ,docbook-xsl)
|
|
||||||
("libxslt" ,libxslt)
|
|
||||||
("pkg-config" ,pkg-config)
|
|
||||||
("texinfo" ,texinfo)
|
|
||||||
("xmlto" ,xmlto)))
|
|
||||||
(inputs
|
|
||||||
`(("curl" ,curl)
|
|
||||||
("expat" ,expat)
|
|
||||||
("openssl" ,openssl)
|
|
||||||
("perl" ,perl)
|
|
||||||
("python" ,python) ; for git-p4
|
|
||||||
("zlib" ,zlib)
|
|
||||||
|
|
||||||
;; For PCRE support in git grep (USE_LIBPCRE2).
|
;; For PCRE support in git grep (USE_LIBPCRE2).
|
||||||
("pcre" ,pcre2)
|
pcre2
|
||||||
|
|
||||||
;; For 'gitweb.cgi'.
|
;; For 'gitweb.cgi'.
|
||||||
("perl-cgi" ,perl-cgi)
|
perl-cgi
|
||||||
|
|
||||||
;; For 'git-svn'.
|
;; For 'git-svn'.
|
||||||
("subversion" ,subversion)
|
subversion
|
||||||
("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-net-smtp-ssl" ,perl-net-smtp-ssl)
|
perl-net-smtp-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
|
||||||
("tk" ,tk)
|
tk
|
||||||
|
|
||||||
;; For 'git-credential-libsecret'
|
;; For 'git-credential-libsecret'
|
||||||
("glib" ,glib)
|
glib
|
||||||
("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
|
(list
|
||||||
|
#:make-flags
|
||||||
|
#~(list "V=1" ;more verbose compilation
|
||||||
|
(string-append "SHELL_PATH="
|
||||||
|
#$(this-package-native-input "bash-minimal")
|
||||||
|
"/bin/sh")
|
||||||
|
|
||||||
,(string-append "SHELL_PATH="
|
;; Tests require a bash with completion support.
|
||||||
(assoc-ref %build-inputs "bash")
|
(string-append "TEST_SHELL_PATH="
|
||||||
"/bin/sh")
|
#$(this-package-native-input "bash")
|
||||||
|
"/bin/bash")
|
||||||
|
|
||||||
;; Tests require a bash with completion support.
|
"USE_LIBPCRE2=yes"
|
||||||
,(string-append "TEST_SHELL_PATH="
|
|
||||||
(assoc-ref %build-inputs "bash-for-tests")
|
|
||||||
"/bin/bash")
|
|
||||||
|
|
||||||
"USE_LIBPCRE2=yes"
|
;; By default 'make install' creates hard links for
|
||||||
|
;; things in 'libexec/git-core', which leads to huge
|
||||||
|
;; nars; see <https://bugs.gnu.org/21949>.
|
||||||
|
"NO_INSTALL_HARDLINKS=indeed")
|
||||||
|
|
||||||
;; By default 'make install' creates hard links for
|
;; Make sure the full bash does not end up in the final closure.
|
||||||
;; things in 'libexec/git-core', which leads to huge
|
#:disallowed-references (list bash)
|
||||||
;; nars; see <https://bugs.gnu.org/21949>.
|
|
||||||
"NO_INSTALL_HARDLINKS=indeed")
|
|
||||||
|
|
||||||
;; Make sure the full bash does not end up in the final closure.
|
#:test-target "test"
|
||||||
#:disallowed-references (,bash)
|
|
||||||
|
|
||||||
#:test-target "test"
|
;; The explicit --with-tcltk forces the build system to hardcode the
|
||||||
|
;; absolute file name to 'wish'.
|
||||||
|
#:configure-flags
|
||||||
|
#~(list (string-append "--with-tcltk="
|
||||||
|
(search-input-file %build-inputs
|
||||||
|
"bin/wish8.6"))
|
||||||
|
#$@(if (%current-target-system)
|
||||||
|
git-cross-configure-flags
|
||||||
|
#~()))
|
||||||
|
|
||||||
;; The explicit --with-tcltk forces the build system to hardcode the
|
#:modules `((srfi srfi-1)
|
||||||
;; absolute file name to 'wish'.
|
|
||||||
#:configure-flags (list (string-append "--with-tcltk="
|
|
||||||
(assoc-ref %build-inputs "tk")
|
|
||||||
"/bin/wish8.6") ; XXX
|
|
||||||
,@(if (%current-target-system)
|
|
||||||
git-cross-configure-flags
|
|
||||||
'()))
|
|
||||||
|
|
||||||
#: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 a full bash 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 #$(this-package-native-input "bash")))
|
||||||
;; Drop the test bash from PATH so that (which "sh") and
|
;; Drop the test bash from PATH so that (which "sh")
|
||||||
;; similar does the right thing.
|
;; and similar does the right thing.
|
||||||
(setenv "PATH" (string-join
|
(setenv "PATH"
|
||||||
(remove (cut string-prefix? bash-full <>) path)
|
(string-join
|
||||||
":")))))))
|
(remove (cut string-prefix? bash-full <>)
|
||||||
;; Add cross curl-config script to PATH when cross-compiling.
|
path)
|
||||||
,@(if (%current-target-system)
|
":")))))))
|
||||||
'((add-before 'configure 'add-cross-curl-config
|
;; Add cross curl-config script to PATH when cross-compiling.
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
#$@(if (%current-target-system)
|
||||||
(setenv "PATH"
|
#~((add-before 'configure 'add-cross-curl-config
|
||||||
(string-append (assoc-ref inputs "curl") "/bin:"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(getenv "PATH"))))))
|
(setenv "PATH"
|
||||||
'())
|
(string-append
|
||||||
(add-after 'configure 'patch-makefiles
|
(dirname (search-input-file
|
||||||
(lambda _
|
inputs "bin/curl-config"))
|
||||||
(substitute* "Makefile"
|
":" (getenv "PATH"))))))
|
||||||
(("/usr/bin/perl") (which "perl"))
|
#~())
|
||||||
(("/usr/bin/python") (which "python3")))))
|
(add-after 'configure 'patch-makefiles
|
||||||
(add-after 'configure 'add-PM.stamp
|
(lambda _
|
||||||
(lambda _
|
(substitute* "Makefile"
|
||||||
;; Add the "PM.stamp" to avoid "no rule to make target".
|
(("/usr/bin/perl") (which "perl"))
|
||||||
(call-with-output-file "perl/PM.stamp" (const #t))))
|
(("/usr/bin/python") (which "python3")))))
|
||||||
(add-after 'build 'build-subtree
|
(add-after 'configure 'add-PM.stamp
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
(with-directory-excursion "contrib/subtree"
|
;; Add the "PM.stamp" to avoid "no rule to make target".
|
||||||
(substitute* "Makefile"
|
(call-with-output-file "perl/PM.stamp" (const #t))))
|
||||||
;; Apparently `xmlto' does not bother to looks up the stylesheets
|
(add-after 'build 'build-subtree
|
||||||
;; specified in the XML, unlike the above substitution. Instead it
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
||||||
;; uses a hard-coded URL. Work around it here, but if this is
|
(with-directory-excursion "contrib/subtree"
|
||||||
;; common perhaps we should hardcode this path in xmlto itself.
|
(substitute* "Makefile"
|
||||||
(("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
|
;; Apparently `xmlto' does not bother to looks up the
|
||||||
(string-append "$(XMLTO) -x "
|
;; stylesheets specified in the XML, unlike the above
|
||||||
(string-append (assoc-ref inputs "docbook-xsl")
|
;; substitution. Instead it uses a hard-coded URL. Work
|
||||||
"/xml/xsl/docbook-xsl-"
|
;; around it here, but if this is common perhaps we should
|
||||||
,(package-version docbook-xsl))
|
;; hardcode this path in xmlto itself.
|
||||||
"/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
|
(("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
|
||||||
(invoke "make")
|
(string-append "$(XMLTO) -x "
|
||||||
(invoke "make" "install")
|
(search-input-directory
|
||||||
(invoke "make" "install-doc")
|
(or native-inputs inputs)
|
||||||
(substitute* "git-subtree"
|
(string-append
|
||||||
(("/bin/sh") (which "sh"))))))
|
"xml/xsl/docbook-xsl-"
|
||||||
(add-before 'check 'patch-tests
|
#$(package-version docbook-xsl)))
|
||||||
(lambda _
|
"/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
|
||||||
(let ((store-directory (%store-directory)))
|
(invoke "make")
|
||||||
;; These files contain some funny bytes that Guile is unable
|
(invoke "make" "install")
|
||||||
;; to decode for shebang patching. Just delete them.
|
(invoke "make" "install-doc")
|
||||||
(for-each delete-file '("t/t4201-shortlog.sh"
|
(substitute* "git-subtree"
|
||||||
"t/t7813-grep-icase-iso.sh"))
|
(("/bin/sh") (which "sh"))))))
|
||||||
;; Many tests contain inline shell scripts (hooks etc).
|
(add-before 'check 'patch-tests
|
||||||
(substitute* (find-files "t" "\\.sh$")
|
(lambda _
|
||||||
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
(let ((store-directory (%store-directory)))
|
||||||
;; Un-do shebang patching here to prevent checksum mismatch.
|
;; These files contain some funny bytes that Guile is unable
|
||||||
(substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
|
;; to decode for shebang patching. Just delete them.
|
||||||
(("^#!.*/bin/perl") "#!/usr/bin/perl"))
|
(for-each delete-file '("t/t4201-shortlog.sh"
|
||||||
(substitute* "t/t5003-archive-zip.sh"
|
"t/t7813-grep-icase-iso.sh"))
|
||||||
(("cp /bin/sh") (string-append "cp " (which "sh"))))
|
;; Many tests contain inline shell scripts (hooks etc).
|
||||||
(substitute* "t/t6030-bisect-porcelain.sh"
|
(substitute* (find-files "t" "\\.sh$")
|
||||||
(("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
|
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
||||||
;; FIXME: This test runs `git commit` with a bogus EDITOR
|
;; Un-do shebang patching here to prevent checksum mismatch.
|
||||||
;; and empty commit message, but does not fail the way it's
|
(substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
|
||||||
;; expected to. The test passes when invoked interactively.
|
(("^#!.*/bin/perl") "#!/usr/bin/perl"))
|
||||||
(substitute* "t/t7508-status.sh"
|
(substitute* "t/t5003-archive-zip.sh"
|
||||||
(("\tcommit_template_commented") "\ttrue"))
|
(("cp /bin/sh") (string-append "cp " (which "sh"))))
|
||||||
;; More checksum mismatches due to odd shebangs.
|
(substitute* "t/t6030-bisect-porcelain.sh"
|
||||||
(substitute* "t/t9100-git-svn-basic.sh"
|
(("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
|
||||||
(((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
|
;; FIXME: This test runs `git commit` with a bogus EDITOR
|
||||||
(substitute* "t/t9300-fast-import.sh"
|
;; and empty commit message, but does not fail the way it's
|
||||||
(((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
|
;; expected to. The test passes when invoked interactively.
|
||||||
(((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
|
(substitute* "t/t7508-status.sh"
|
||||||
;; FIXME: Some hooks fail with "basename: command not found".
|
(("\tcommit_template_commented") "\ttrue"))
|
||||||
;; See 't/trash directory.t9164.../svn-hook.log'.
|
;; More checksum mismatches due to odd shebangs.
|
||||||
(delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
|
(substitute* "t/t9100-git-svn-basic.sh"
|
||||||
|
(((string-append "\"#!" store-directory ".*/bin/sh"))
|
||||||
|
"\"#!/bin/sh") )
|
||||||
|
(substitute* "t/t9300-fast-import.sh"
|
||||||
|
(((string-append "\t#!" store-directory ".*/bin/sh"))
|
||||||
|
"\t#!/bin/sh")
|
||||||
|
(((string-append "'#!" store-directory ".*/bin/sh"))
|
||||||
|
"'#!/bin/sh"))
|
||||||
|
;; FIXME: Some hooks fail with "basename: command not found".
|
||||||
|
;; See 't/trash directory.t9164.../svn-hook.log'.
|
||||||
|
(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 _
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((completions (string-append #$output
|
||||||
(completions (string-append out "/etc/bash_completion.d")))
|
"/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
|
||||||
(mkdir-p completions)
|
;; place.
|
||||||
(copy-file "contrib/completion/git-completion.bash"
|
(mkdir-p completions)
|
||||||
(string-append completions "/git")))))
|
(copy-file "contrib/completion/git-completion.bash"
|
||||||
(add-after 'install 'install-credential-netrc
|
(string-append completions "/git")))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'install-credential-netrc
|
||||||
(let* ((netrc (assoc-ref outputs "credential-netrc")))
|
(lambda _
|
||||||
(install-file "contrib/credential/netrc/git-credential-netrc.perl"
|
(install-file "contrib/credential/netrc/git-credential-netrc.perl"
|
||||||
(string-append netrc "/bin"))
|
(string-append #$output:credential-netrc "/bin"))
|
||||||
(rename-file (string-append netrc "/bin/git-credential-netrc.perl")
|
(rename-file (string-append #$output:credential-netrc
|
||||||
(string-append netrc "/bin/git-credential-netrc"))
|
"/bin/git-credential-netrc.perl")
|
||||||
;; Previously, Git.pm was automatically found by netrc.
|
(string-append #$output:credential-netrc
|
||||||
;; Perl 5.26 changed how it locates modules so that @INC no
|
"/bin/git-credential-netrc"))
|
||||||
;; longer includes the current working directory (the Perl
|
;; Previously, Git.pm was automatically found by netrc.
|
||||||
;; community calls this "dotless @INC").
|
;; Perl 5.26 changed how it locates modules so that @INC no
|
||||||
(wrap-program (string-append netrc "/bin/git-credential-netrc")
|
;; longer includes the current working directory (the Perl
|
||||||
`("PERL5LIB" ":" prefix
|
;; community calls this "dotless @INC").
|
||||||
(,(string-append (assoc-ref outputs "out") "/share/perl5")))))))
|
(wrap-program (string-append #$output:credential-netrc
|
||||||
(add-after 'install 'install-credential-libsecret
|
"/bin/git-credential-netrc")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
`("PERL5LIB" ":" prefix
|
||||||
(let* ((libsecret (assoc-ref outputs "credential-libsecret")))
|
(,(string-append #$output "/share/perl5"))))))
|
||||||
(with-directory-excursion "contrib/credential/libsecret"
|
(add-after 'install 'install-credential-libsecret
|
||||||
((assoc-ref gnu:%standard-phases 'build))
|
(lambda _
|
||||||
(install-file "git-credential-libsecret"
|
(with-directory-excursion "contrib/credential/libsecret"
|
||||||
(string-append libsecret "/bin"))))))
|
((assoc-ref gnu:%standard-phases 'build))
|
||||||
(add-after 'install 'install-subtree
|
(install-file "git-credential-libsecret"
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(string-append #$output:credential-libsecret
|
||||||
(let ((subtree (assoc-ref outputs "subtree")))
|
"/bin")))))
|
||||||
(install-file "contrib/subtree/git-subtree"
|
(add-after 'install 'install-subtree
|
||||||
(string-append subtree "/bin"))
|
(lambda _
|
||||||
(install-file "contrib/subtree/git-subtree.1"
|
(install-file "contrib/subtree/git-subtree"
|
||||||
(string-append subtree "/share/man/man1")))))
|
(string-append #$output:subtree "/bin"))
|
||||||
(add-after 'install 'restore-sample-hooks-shebang
|
(install-file "contrib/subtree/git-subtree.1"
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(string-append #$output:subtree
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
"/share/man/man1"))))
|
||||||
(dir (string-append out "/share/git-core/templates/hooks")))
|
(add-after 'install 'restore-sample-hooks-shebang
|
||||||
(for-each (lambda (file)
|
(lambda _
|
||||||
(format #t "restoring shebang on `~a'~%" file)
|
(let* ((dir (string-append #$output
|
||||||
(substitute* file
|
"/share/git-core/templates/hooks")))
|
||||||
(("^#!.*/bin/sh") "#!/bin/sh")))
|
(for-each (lambda (file)
|
||||||
(find-files dir ".*")))))
|
(format #t "restoring shebang on `~a'~%" file)
|
||||||
(add-after 'install 'split
|
(substitute* file
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(("^#!.*/bin/sh") "#!/bin/sh")))
|
||||||
;; Split the binaries to the various outputs.
|
(find-files dir ".*")))))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(add-after 'install 'split
|
||||||
(se (assoc-ref outputs "send-email"))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(svn (assoc-ref outputs "svn"))
|
;; Split the binaries to the various outputs.
|
||||||
(gui (assoc-ref outputs "gui"))
|
(let* ((out #$output)
|
||||||
(gitk (string-append out "/bin/gitk"))
|
(se #$output:send-email)
|
||||||
(gitk* (string-append gui "/bin/gitk"))
|
(svn #$output:svn)
|
||||||
(git-gui (string-append out "/libexec/git-core/git-gui"))
|
(gui #$output:gui)
|
||||||
(git-gui* (string-append gui "/libexec/git-core/git-gui"))
|
(gitk (string-append out "/bin/gitk"))
|
||||||
(git-cit (string-append out "/libexec/git-core/git-citool"))
|
(gitk* (string-append gui "/bin/gitk"))
|
||||||
(git-cit* (string-append gui "/libexec/git-core/git-citool"))
|
(git-gui (string-append
|
||||||
(git-se (string-append out "/libexec/git-core/git-send-email"))
|
out "/libexec/git-core/git-gui"))
|
||||||
(git-se* (string-append se "/libexec/git-core/git-send-email"))
|
(git-gui* (string-append gui "/libexec/git-core/git-gui"))
|
||||||
(git-svn (string-append out "/libexec/git-core/git-svn"))
|
(git-cit (string-append
|
||||||
(git-svn* (string-append svn "/libexec/git-core/git-svn"))
|
out "/libexec/git-core/git-citool"))
|
||||||
(git-sm (string-append out
|
(git-cit* (string-append
|
||||||
"/libexec/git-core/git-submodule")))
|
gui "/libexec/git-core/git-citool"))
|
||||||
(mkdir-p (string-append gui "/bin"))
|
(git-se (string-append
|
||||||
(mkdir-p (string-append gui "/libexec/git-core"))
|
out "/libexec/git-core/git-send-email"))
|
||||||
(mkdir-p (string-append se "/libexec/git-core"))
|
(git-se* (string-append
|
||||||
(mkdir-p (string-append svn "/libexec/git-core"))
|
se "/libexec/git-core/git-send-email"))
|
||||||
|
(git-svn (string-append out "/libexec/git-core/git-svn"))
|
||||||
|
(git-svn* (string-append svn "/libexec/git-core/git-svn"))
|
||||||
|
(git-sm (string-append
|
||||||
|
out "/libexec/git-core/git-submodule")))
|
||||||
|
(mkdir-p (string-append gui "/bin"))
|
||||||
|
(mkdir-p (string-append gui "/libexec/git-core"))
|
||||||
|
(mkdir-p (string-append se "/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*
|
|
||||||
`("PATH" ":" prefix
|
|
||||||
(,(string-append (assoc-ref inputs "subversion")
|
|
||||||
"/bin")))
|
|
||||||
`("PERL5LIB" ":" prefix
|
|
||||||
,(map (lambda (i) (string-append (assoc-ref inputs i)
|
|
||||||
"/lib/perl5/site_perl"))
|
|
||||||
'("subversion" "perl-term-readkey")))
|
|
||||||
|
|
||||||
;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
|
;; FIXME: Old school 'assoc-ref' is used to retrieve
|
||||||
;; help it find 'libsvn_client-1.so'.
|
;; subversion here, as #$(this-package-input "subversion")
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
;; causes a dependency cycle for unknown reasons.
|
||||||
(,(string-append (assoc-ref inputs "subversion")
|
(wrap-program git-svn*
|
||||||
"/lib"))))
|
`("PATH" ":" prefix
|
||||||
|
(,(dirname (search-input-file inputs "bin/perl"))))
|
||||||
|
`("PERL5LIB" ":" prefix
|
||||||
|
,(search-path-as-list
|
||||||
|
'("lib/perl5/site_perl")
|
||||||
|
(list (assoc-ref inputs "subversion")
|
||||||
|
#$(this-package-input "perl-term-readkey"))))
|
||||||
|
|
||||||
;; Tell 'git-send-email' where perl modules are.
|
;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
|
||||||
(wrap-program git-se*
|
;; help it find 'libsvn_client-1.so'.
|
||||||
`("PERL5LIB" ":" prefix
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
|
(,(string-append (assoc-ref inputs "subversion")
|
||||||
(list
|
"/lib"))))
|
||||||
,@(transitive-input-references
|
|
||||||
'inputs
|
|
||||||
(map (lambda (l)
|
|
||||||
(assoc l (package-inputs this-package)))
|
|
||||||
'("perl-authen-sasl"
|
|
||||||
"perl-net-smtp-ssl"
|
|
||||||
"perl-io-socket-ssl")))))))
|
|
||||||
|
|
||||||
;; Tell 'gitweb.cgi' where perl modules are.
|
;; Tell 'git-send-email' where perl modules are.
|
||||||
(wrap-program (string-append out "/share/gitweb/gitweb.cgi")
|
(wrap-program git-se*
|
||||||
`("PERL5LIB" ":" prefix
|
`("PERL5LIB" ":" prefix
|
||||||
,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
|
,(search-path-as-list
|
||||||
(list
|
'("lib/perl5/site_perl")
|
||||||
,@(transitive-input-references
|
'#$(delete-duplicates
|
||||||
'inputs
|
(append-map
|
||||||
(map (lambda (l)
|
(compose last package-transitive-propagated-inputs)
|
||||||
(assoc l (package-inputs this-package)))
|
(list (this-package-input "perl-authen-sasl")
|
||||||
'("perl-cgi")))))))
|
(this-package-input "perl-net-smtp-ssl")
|
||||||
|
(this-package-input "perl-io-socket-ssl")))))))
|
||||||
|
;; Tell 'gitweb.cgi' where perl modules are.
|
||||||
|
(wrap-program (string-append out "/share/gitweb/gitweb.cgi")
|
||||||
|
`("PERL5LIB" ":" prefix
|
||||||
|
,(search-path-as-list
|
||||||
|
'("lib/perl5/site_perl")
|
||||||
|
'#$(delete-duplicates
|
||||||
|
(append-map
|
||||||
|
(compose last package-transitive-propagated-inputs)
|
||||||
|
(list (this-package-input "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")
|
(,(dirname (search-input-file inputs "bin/perl"))))))))
|
||||||
"/bin")))))))
|
(add-after 'split 'install-man-pages
|
||||||
(add-after 'split 'install-man-pages
|
(lambda _
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(let ((man (string-append #$output "/share/man")))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(mkdir-p man)
|
||||||
(man (string-append out "/share/man"))
|
(with-directory-excursion man
|
||||||
(manpages (assoc-ref inputs "git-manpages")))
|
(invoke
|
||||||
(mkdir-p man)
|
"tar" "xvf"
|
||||||
(with-directory-excursion man
|
#$(origin
|
||||||
(invoke "tar" "xvf" manpages)))))
|
(method url-fetch)
|
||||||
,@(if (system-hurd?)
|
(uri (string-append
|
||||||
'((add-after 'unpack 'delete-tests/hurd
|
"mirror://kernel.org/software/scm/git/"
|
||||||
(lambda _
|
"git-manpages-" version ".tar.xz"))
|
||||||
(delete-file "t/t0052-simple-ipc.sh")
|
(sha256
|
||||||
(delete-file "t/t5562-http-backend-content-length.sh")
|
(base32
|
||||||
(delete-file "t/t9902-completion.sh"))))
|
"1w6r2liifafsxydmc48p578z7z70ys0spm6qp5ygdd0l26mxf8p6"))))))))
|
||||||
'()))))
|
#$@(if (system-hurd?)
|
||||||
|
#~((add-after 'unpack 'delete-tests/hurd
|
||||||
|
(lambda _
|
||||||
|
(delete-file "t/t0052-simple-ipc.sh")
|
||||||
|
(delete-file "t/t5562-http-backend-content-length.sh")
|
||||||
|
(delete-file "t/t9902-completion.sh"))))
|
||||||
|
#~()))))
|
||||||
|
|
||||||
(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
|
||||||
@ -653,9 +668,8 @@ everything from small to very large projects with speed and efficiency.")
|
|||||||
(delete 'install-credential-libsecret)
|
(delete 'install-credential-libsecret)
|
||||||
(add-after 'install 'remove-unusable-perl-commands
|
(add-after 'install 'remove-unusable-perl-commands
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((bin (string-append #$output "/bin"))
|
||||||
(bin (string-append out "/bin"))
|
(libexec (string-append #$output "/libexec")))
|
||||||
(libexec (string-append out "/libexec")))
|
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(delete-file (string-append libexec
|
(delete-file (string-append libexec
|
||||||
"/git-core/" file)))
|
"/git-core/" file)))
|
||||||
@ -675,11 +689,11 @@ everything from small to very large projects with speed and efficiency.")
|
|||||||
|
|
||||||
;; These templates typically depend on Perl. Remove them.
|
;; These templates typically depend on Perl. Remove them.
|
||||||
(delete-file-recursively
|
(delete-file-recursively
|
||||||
(string-append out "/share/git-core/templates/hooks"))
|
(string-append #$output "/share/git-core/templates/hooks"))
|
||||||
|
|
||||||
;; Gitweb depends on Perl as well.
|
;; Gitweb depends on Perl as well.
|
||||||
(delete-file-recursively
|
(delete-file-recursively
|
||||||
(string-append out "/share/gitweb")))))))
|
(string-append #$output "/share/gitweb")))))))
|
||||||
((#:make-flags flags)
|
((#:make-flags flags)
|
||||||
#~(delete "USE_LIBPCRE2=yes" #$flags))
|
#~(delete "USE_LIBPCRE2=yes" #$flags))
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user