Skip to content

Commit

Permalink
git: Properly wrap Git commands that are implemented in Perl. (#30001)
Browse files Browse the repository at this point in the history
Some Git commands are implemented as Perl scripts. Some of these
scripts use Perl modules from CPAN. Without wrapping these programs to
set `GITPERLLIB`, these programs would not be fully functional because
some Perl libraries are found to be missing at runtime.

Fixes #29996

(cherry picked from commit f795d78)
  • Loading branch information
mboes authored and zimbatm committed Oct 2, 2017
1 parent 5acac62 commit 07ca7b6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkgs/applications/version-management/git-and-tools/git/default.nix
Expand Up @@ -145,6 +145,22 @@ stdenv.mkDerivation {
# Also put git-http-backend into $PATH, so that we can use smart
# HTTP(s) transports for pushing
ln -s $out/libexec/git-core/git-http-backend $out/bin/git-http-backend
# wrap perl commands
gitperllib=$out/lib/perl5/site_perl
for i in ${builtins.toString perlLibs}; do
gitperllib=$gitperllib:$i/lib/perl5/site_perl
done
wrapProgram $out/libexec/git-core/git-cvsimport \
--set GITPERLLIB "$gitperllib"
wrapProgram $out/libexec/git-core/git-add--interactive \
--set GITPERLLIB "$gitperllib"
wrapProgram $out/libexec/git-core/git-archimport \
--set GITPERLLIB "$gitperllib"
wrapProgram $out/libexec/git-core/git-instaweb \
--set GITPERLLIB "$gitperllib"
wrapProgram $out/libexec/git-core/git-cvsexportcommit \
--set GITPERLLIB "$gitperllib"
''

+ (if svnSupport then
Expand Down

0 comments on commit 07ca7b6

Please sign in to comment.