2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ruby, makeWrapper, git }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "svn2git";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nirvdrum";
|
|
|
|
repo = "svn2git";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-w649l/WO68vYYxZOBKzI8XhGFkaSwWx/O3oVOtnGg6w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ ruby makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "svn2git";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|