nixpkgs/pkgs/applications/version-management/svn2git/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
906 B
Nix
Raw Normal View History

2021-11-02 13:23:43 +00:00
{ lib, stdenv, fetchFromGitHub, ruby, makeWrapper, git }:
2021-11-02 13:23:43 +00:00
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "svn2git";
2021-11-02 13:23:43 +00:00
version = "2.4.0";
2021-11-02 13:23:43 +00:00
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";
2015-08-05 10:03:01 +00:00
description = "Tool for importing Subversion repositories into git";
2021-01-15 13:21:58 +00:00
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}