gnu: git: 'git-submodule' works even if Perl is not in $PATH.

* gnu/packages/version-control.scm (git): Add 'native-inputs' field;
  move Gettext there from 'inputs'.  In 'split' phase, wrap the
  'git-submodule' script.
This commit is contained in:
Ludovic Courtès 2014-01-15 13:06:50 +01:00
parent da923d11d2
commit 2a5e15c6e1
1 changed files with 13 additions and 3 deletions

View File

@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
@ -83,10 +83,12 @@ as well as the classic centralized workflow.")
(base32
"156bwqqgaw65rsvbb4wih5jfg94bxyf6p16mdwf0ky3f4ln55s2i"))))
(build-system gnu-build-system)
(native-inputs
`(("native-perl" ,perl)
("gettext" ,gnu-gettext)))
(inputs
`(("curl" ,curl)
("expat" ,expat)
("gettext" ,gnu-gettext)
("openssl" ,openssl)
("perl" ,perl)
("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
@ -136,7 +138,9 @@ as well as the classic centralized workflow.")
(git-cit (string-append out "/libexec/git-core/git-citool"))
(git-cit* (string-append gui "/libexec/git-core/git-citool"))
(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
"/libexec/git-core/git-submodule")))
(mkdir-p (string-append gui "/bin"))
(mkdir-p (string-append gui "/libexec/git-core"))
(mkdir-p (string-append svn "/libexec/git-core"))
@ -163,6 +167,12 @@ as well as the classic centralized workflow.")
(,(string-append (assoc-ref inputs "subversion")
"/lib"))))
;; Tell 'git-submodule' where Perl is.
(wrap-program git-sm
`("PATH" ":" prefix
(,(string-append (assoc-ref inputs "perl")
"/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