From f6dd263d4244b832a761c808597cf00b2688f4af Mon Sep 17 00:00:00 2001 From: Changlin Li Date: Sun, 12 Feb 2017 01:00:29 -0500 Subject: [PATCH] bfg-repo-cleaner: init at 1.12.15 --- lib/maintainers.nix | 1 + .../bfg-repo-cleaner/default.nix | 49 +++++++++++++++++++ .../git-and-tools/default.nix | 2 + 3 files changed, 52 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 8c778921fac2..151674087862 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -87,6 +87,7 @@ cfouche = "Chaddaï Fouché "; chaoflow = "Florian Friesdorf "; chattered = "Phil Scott "; + changlinli = "Changlin Li "; choochootrain = "Hurshal Patel "; chris-martin = "Chris Martin "; chrisjefferson = "Christopher Jefferson "; diff --git a/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix b/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix new file mode 100644 index 000000000000..b2324581244a --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, jre, makeWrapper }: + +let + version = "1.12.15"; + jarName = "bfg-${version}.jar"; + mavenUrl = "http://central.maven.org/maven2/com/madgag/bfg/${version}/${jarName}"; +in + stdenv.mkDerivation { + inherit version jarName; + + name = "bfg-repo-cleaner"; + + src = fetchurl { + url = mavenUrl; + sha256 = "17dh25jambkk55khknlhy8wa9s1i1xmh9hdgj72j1lzyl0ag42ik"; + }; + + buildInputs = [ jre makeWrapper ]; + + phases = "installPhase"; + + installPhase = '' + mkdir -p $out/share/java + mkdir -p $out/bin + cp $src $out/share/java/$jarName + makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main" + ''; + + meta = with stdenv.lib; { + homepage = "https://rtyley.github.io/bfg-repo-cleaner/"; + # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner + description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster"; + longDescription = '' + The BFG is a simpler, faster alternative to git-filter-branch for + cleansing bad data out of your Git repository history, in particular removing + crazy big files and removing passwords, credentials, and other private data. + + The git-filter-branch command is enormously powerful and can do things + that the BFG can't - but the BFG is much better for the tasks above, because + it's faster (10-720x), simpler (dedicated to just removing things), and + beautiful (can use Scala instead of bash to script customizations). + ''; + license = licenses.gpl3; + maintainers = [ maintainers.changlinli ]; + platforms = platforms.unix; + downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}"; + }; + + } diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index 975c83c6e979..d68b1e41c8d5 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -22,6 +22,8 @@ in rec { # Try to keep this generally alphabetized + bfg-repo-cleaner = callPackage ./bfg-repo-cleaner { }; + bitbucket-server-cli = callPackage ./bitbucket-server-cli { }; darcsToGit = callPackage ./darcs-to-git { };