diff --git a/pkgs/applications/version-management/git/git-svn-wrapper.nix b/pkgs/applications/version-management/git/git-svn-wrapper.nix new file mode 100644 index 000000000000..d967e1afa197 --- /dev/null +++ b/pkgs/applications/version-management/git/git-svn-wrapper.nix @@ -0,0 +1,29 @@ +args: with args; +if (!args.subversion.perlBindings) then abort "svn perl bindings required to install gitsvnwrapper" +else args.stdenv.mkDerivation { + inherit git perlLibs subversion; + name = "git-svn-wrapper"; + phases = "buildPhase"; + buildPhase = " + gitperllib=\$git/lib/site_perl + for i in \$perlLibs; do + gitperllib=\$gitperllib:\$i/lib/site_perl + done + + ensureDir \$out/bin + for a in \$git/bin/*; do + target=\$out/bin/\$(basename $a) + target=\$out/bin/\$(basename $a) + echo \"#!/bin/sh + export GITPERLLIB=\$gitperllib + PATH=\\\$PATH:$subversion/bin + $a \\\"\\\$@\\\" + \" > \$target + chmod +x \$target + done + "; + + meta = { + description = "simple wrapper around git adding env variables so that git-svn works without extra work"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e039fe5e728b..2d92c4c9464b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5062,6 +5062,11 @@ let pkgs = rec { emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null; }; + gitsvnwrapper = import ../applications/version-management/git/git-svn-wrapper.nix { + inherit subversion git stdenv; + perlLibs = [ perlLWP perlURI perlTermReadKey subversion ]; + }; + gkrellm = import ../applications/misc/gkrellm { inherit fetchurl stdenv gettext pkgconfig; inherit (gtkLibs) glib gtk;