1 { lib, stdenv, fetchurl, jre, makeWrapper }:
3 stdenv.mkDerivation rec {
4 pname = "bfg-repo-cleaner";
7 jarName = "bfg-${version}.jar";
10 url = "mirror://maven/com/madgag/bfg/${version}/${jarName}";
11 sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
14 nativeBuildInputs = [ makeWrapper ];
15 buildInputs = [ jre ];
20 mkdir -p $out/share/java
22 cp $src $out/share/java/$jarName
23 makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
27 homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
28 # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
29 description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
31 The BFG is a simpler, faster alternative to git-filter-branch for
32 cleansing bad data out of your Git repository history, in particular removing
33 crazy big files and removing passwords, credentials, and other private data.
35 The git-filter-branch command is enormously powerful and can do things
36 that the BFG can't - but the BFG is much better for the tasks above, because
37 it's faster (10-720x), simpler (dedicated to just removing things), and
38 beautiful (can use Scala instead of bash to script customizations).
40 sourceProvenance = with sourceTypes; [ binaryBytecode ];
41 license = licenses.gpl3;
42 maintainers = [ maintainers.changlinli ];
44 platforms = platforms.unix;
45 downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";