mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
gnu: git: Add "svn" output for 'git-svn'.
* gnu/packages/version-control.scm (git): Add SUBVERSION as an input. Add 'split' phase.
This commit is contained in:
parent
8b2fe7853d
commit
ed5f49ff0c
1 changed files with 41 additions and 2 deletions
|
@ -90,7 +90,11 @@ (define-public git
|
|||
("openssl" ,openssl)
|
||||
("perl" ,perl)
|
||||
("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
|
||||
("zlib" ,zlib)))
|
||||
("zlib" ,zlib)
|
||||
|
||||
;; For 'git-svn'.
|
||||
("subversion" ,subversion)))
|
||||
(outputs '("out" "svn"))
|
||||
(arguments
|
||||
`(#:make-flags `("V=1") ; more verbose compilation
|
||||
#:test-target "test"
|
||||
|
@ -105,7 +109,42 @@ (define-public git
|
|||
(("/bin/sh") (which "sh"))
|
||||
(("/usr/bin/perl") (which "perl"))
|
||||
(("/usr/bin/python") (which "python"))))))
|
||||
%standard-phases)))
|
||||
(alist-cons-after
|
||||
'install 'split
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(svn (assoc-ref outputs "svn"))
|
||||
(git-svn (string-append out "/libexec/git-core/git-svn"))
|
||||
(git-svn* (string-append svn "/libexec/git-core/git-svn")))
|
||||
(mkdir-p (string-append svn "/libexec/git-core"))
|
||||
(copy-file git-svn git-svn*)
|
||||
(delete-file git-svn)
|
||||
(chmod git-svn* #o555)
|
||||
|
||||
;; Tell 'git-svn' where Subversion is.
|
||||
(wrap-program git-svn*
|
||||
`("PATH" ":" prefix
|
||||
(,(string-append (assoc-ref inputs "subversion")
|
||||
"/bin"))))
|
||||
|
||||
;; Tell 'git' to look for core programs in the user's profile.
|
||||
;; This allows user to install other outputs of this package and
|
||||
;; have them transparently taken into account. There's a
|
||||
;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
|
||||
;; specify a single directory, not a search path.
|
||||
(wrap-program (string-append out "/bin/git")
|
||||
`("PATH" ":" prefix
|
||||
("$HOME/.guix-profile/libexec/git-core"))
|
||||
`("PERL5LIB" ":" prefix
|
||||
(,(string-append (assoc-ref inputs "subversion")
|
||||
"/lib/perl5/site_perl")))
|
||||
|
||||
;; 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"))))))
|
||||
%standard-phases))))
|
||||
(synopsis "Distributed version control system")
|
||||
(description
|
||||
"Git is a free distributed version control system designed to handle
|
||||
|
|
Loading…
Reference in a new issue