From 2a5e15c6e1c2ea0847e720df92df9570087673cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 15 Jan 2014 13:06:50 +0100 Subject: [PATCH] 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. --- gnu/packages/version-control.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 8c371c780b..3d69eee5cd 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2013 Cyril Roelandt -;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; ;;; 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