about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix')
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix b/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
new file mode 100644
index 000000000000..af21296cffa4
--- /dev/null
+++ b/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "git-filter-repo";
+  version = "2.25.0";
+
+  src = fetchurl {
+    url = "https://github.com/newren/git-filter-repo/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "1772if8ajaw80dsdw4ic6vjw24dq0b9w87qlkn0iw4b8r9yxp37a";
+  };
+
+  buildInputs = [ pythonPackages.python ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -Dm755 -t $out/bin git-filter-repo
+    install -Dm644 -t $out/share/man/man1 Documentation/man1/git-filter-repo.1
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/newren/git-filter-repo";
+    description = "Quickly rewrite git repository history (filter-branch replacement)";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}