nixpkgs-suyu/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
Moritz Ulrich b4f93af3c9
Update git and related tools to latest releases.
Git     -> 1.8.5.1
stgit   -> 0.16
svn2git -> 2.2.2

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-09 00:15:25 +00:00

40 lines
956 B
Nix

{ stdenv, fetchurl, ruby, makeWrapper, git }:
let
version = "2.2.2";
in
stdenv.mkDerivation {
name = "svn2git-${version}";
src = fetchurl {
url = "https://github.com/nirvdrum/svn2git/archive/v${version}.tar.gz";
sha256 = "14zinkpgybz15jvbfw0sb432w6f5w4sa5pdqycjwva8v8lxqn9mh";
};
buildInputs = [ ruby makeWrapper ];
buildPhase = "true";
installPhase =
''
mkdir -p $out
cp -r lib $out/
mkdir -p $out/bin
substituteInPlace bin/svn2git --replace '/usr/bin/env ruby' ${ruby}/bin/ruby
cp bin/svn2git $out/bin/
chmod +x $out/bin/svn2git
wrapProgram $out/bin/svn2git \
--set RUBYLIB $out/lib \
--prefix PATH : ${git}/bin
'';
meta = {
homepage = https://github.com/nirvdrum/svn2git;
description = "Ruby tool for importing existing svn projects into git";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.the-kenny ];
};
}