depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

38 lines
906 B
Nix

{ lib, stdenv, fetchFromGitHub, ruby, makeWrapper, git }:
stdenv.mkDerivation rec {
pname = "svn2git";
version = "2.4.0";
src = fetchFromGitHub {
owner = "nirvdrum";
repo = "svn2git";
rev = "v${version}";
sha256 = "sha256-w649l/WO68vYYxZOBKzI8XhGFkaSwWx/O3oVOtnGg6w=";
};
nativeBuildInputs = [ ruby makeWrapper ];
dontBuild = 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 = "Tool for importing Subversion repositories into git";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}