guix-packages/git: Delete since git:credential-netrc has been merged

master
Pierre Neidhardt 2018-06-23 23:23:39 +02:00
parent 54c8872bbe
commit bf0213f305
1 changed files with 0 additions and 310 deletions

View File

@ -1,310 +0,0 @@
(define-module (git)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system haskell)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages apr)
#:use-module (gnu packages autotools)
#:use-module (gnu packages documentation)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages cook)
#:use-module (gnu packages curl)
#:use-module (gnu packages docbook)
#:use-module (gnu packages ed)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages groff)
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-crypto)
#:use-module (gnu packages haskell-web)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages linux)
#:use-module (gnu packages maths)
#:use-module (gnu packages nano)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ssh)
#:use-module (gnu packages web)
#:use-module (gnu packages openstack)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages readline)
#:use-module (gnu packages databases)
#:use-module (gnu packages admin)
#:use-module (gnu packages xml)
#:use-module (gnu packages emacs)
#:use-module (gnu packages compression)
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages tcl)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
(define-public git
(package
(name "git")
;; XXX When updating Git, check if the special 'git:src' input to cgit needs
;; to be updated as well.
(version "2.17.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/software/scm/git/git-"
version ".tar.xz"))
(sha256
(base32
"0pm6bdnrrm165k3krnazxcxadifk2gqi30awlbcf9fism1x6w4vr"))))
(build-system gnu-build-system)
(native-inputs
`(("native-perl" ,perl)
("gettext" ,gettext-minimal)
("git-manpages"
,(origin
(method url-fetch)
(uri (string-append
"mirror://kernel.org/software/scm/git/git-manpages-"
version ".tar.xz"))
(sha256
(base32
"0m7grrwsqaihdgcgaicxiy4rlqjpa75n5wl6hi2qhi33xa34gmc3"))))))
(inputs
`(("curl" ,curl)
("expat" ,expat)
("openssl" ,openssl)
("perl" ,perl)
("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
("zlib" ,zlib)
;; For 'gitweb.cgi'
("perl-cgi" ,perl-cgi)
;; For 'git-svn'.
("subversion" ,subversion)
("perl-term-readkey" ,perl-term-readkey)
;; For 'git-send-email'
("perl-authen-sasl" ,perl-authen-sasl)
("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
("perl-io-socket-ssl" ,perl-io-socket-ssl)
;; For 'git gui', 'gitk', and 'git citool'.
("tcl" ,tcl)
("tk" ,tk)))
(outputs '("out" ; the core
"send-email" ; for git-send-email
"svn" ; git-svn
"credential-netrc" ; git-credential-netrc
"gui")) ; gitk, git gui
(arguments
`(#:make-flags `("V=1" ;more verbose compilation
;; 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")
#:test-target "test"
;; Tests fail randomly when parallel: <https://bugs.gnu.org/29512>.
#:parallel-tests? #f
;; The explicit --with-tcltk forces the build system to hardcode the
;; absolute file name to 'wish'.
#:configure-flags (list (string-append "--with-tcltk="
(assoc-ref %build-inputs "tk")
"/bin/wish8.6")) ; XXX
#:modules ((srfi srfi-1)
,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
(add-after 'configure 'patch-makefiles
(lambda _
(substitute* "Makefile"
(("/bin/sh") (which "sh"))
(("/usr/bin/perl") (which "perl"))
(("/usr/bin/python") (which "python")))
#t))
(add-after 'configure 'add-PM.stamp
(lambda _
;; Add the "PM.stamp" to avoid "no rule to make target".
(call-with-output-file "perl/PM.stamp" (const #t))
#t))
(add-before 'check 'patch-tests
(lambda _
(let ((store-directory (%store-directory)))
;; These files contain some funny bytes that Guile is unable
;; to decode for shebang patching. Just delete them.
(for-each delete-file '("t/t4201-shortlog.sh"
"t/t7813-grep-icase-iso.sh"))
;; Many tests contain inline shell scripts (hooks etc).
(substitute* (find-files "t" "\\.sh$")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
;; Un-do shebang patching here to prevent checksum mismatch.
(substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
(("^#!.*/bin/perl") "#!/usr/bin/perl"))
(substitute* "t/t5003-archive-zip.sh"
(("cp /bin/sh") (string-append "cp " (which "sh"))))
(substitute* "t/t6030-bisect-porcelain.sh"
(("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
;; FIXME: This test runs `git commit` with a bogus EDITOR
;; and empty commit message, but does not fail the way it's
;; expected to. The test passes when invoked interactively.
(substitute* "t/t7508-status.sh"
(("\tcommit_template_commented") "\ttrue"))
;; More checksum mismatches due to odd shebangs.
(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:
;; <https://bugs.gnu.org/29546>.
(for-each delete-file
'("t/t9128-git-svn-cmd-branch.sh"
"t/t9167-git-svn-cmd-branch-subproject.sh"
"t/t9141-git-svn-multiple-branches.sh"))
#t)))
(add-after 'install 'install-shell-completion
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(completions (string-append out "/etc/bash_completion.d")))
;; TODO: Install the tcsh and zsh completions in the right place.
(mkdir-p completions)
(copy-file "contrib/completion/git-completion.bash"
(string-append completions "/git"))
#t)))
(add-after 'install 'install-credential-netrc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((netrc (assoc-ref outputs "credential-netrc")))
(install-file "contrib/credential/netrc/git-credential-netrc"
(string-append netrc "/bin"))
#t)))
(add-after 'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Split the binaries to the various outputs.
(let* ((out (assoc-ref outputs "out"))
(se (assoc-ref outputs "send-email"))
(svn (assoc-ref outputs "svn"))
(gui (assoc-ref outputs "gui"))
(gitk (string-append out "/bin/gitk"))
(gitk* (string-append gui "/bin/gitk"))
(git-gui (string-append out "/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 gui "/libexec/git-core/git-citool"))
(git-se (string-append out "/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 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)
(copy-file old new)
(delete-file old)
(chmod new #o555))
(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.
(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
;; help it find 'libsvn_client-1.so'.
`("LD_LIBRARY_PATH" ":" prefix
(,(string-append (assoc-ref inputs "subversion")
"/lib"))))
;; Tell 'git-send-email' where perl modules are.
(wrap-program git-se*
`("PERL5LIB" ":" prefix
,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
(list
,@(transitive-input-references
'inputs
(map (lambda (l)
(assoc l (inputs)))
'("perl-authen-sasl"
"perl-net-smtp-ssl"
"perl-io-socket-ssl")))))))
;; Tell 'gitweb.cgi' where perl modules are.
(wrap-program (string-append out "/share/gitweb/gitweb.cgi")
`("PERL5LIB" ":" prefix
,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
(list
,@(transitive-input-references
'inputs
(map (lambda (l)
(assoc l (inputs)))
'("perl-cgi")))))))
;; Tell 'git-submodule' where Perl is.
(wrap-program git-sm
`("PATH" ":" prefix
(,(string-append (assoc-ref inputs "perl")
"/bin")))))))
(add-after 'split 'install-man-pages
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man"))
(manpages (assoc-ref inputs "git-manpages")))
(mkdir-p man)
(with-directory-excursion man
(zero? (system* "tar" "xvf" manpages)))))))))
(native-search-paths
;; For HTTPS access, Git needs a single-file certificate bundle, specified
;; with $GIT_SSL_CAINFO.
(list (search-path-specification
(variable "GIT_SSL_CAINFO")
(file-type 'regular)
(separator #f) ;single entry
(files '("etc/ssl/certs/ca-certificates.crt")))
(search-path-specification
(variable "GIT_EXEC_PATH")
(separator #f) ;single entry
(files '("libexec/git-core")))))
(synopsis "Distributed version control system")
(description
"Git is a free distributed version control system designed to handle
everything from small to very large projects with speed and efficiency.")
(license license:gpl2)
(home-page "https://git-scm.com/")))