1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
9 sha256 = "06b46fz4nid7qvm36r66zw01fr87y4jyz21ixw27b8hkqah0s3p8";
13 substituteInPlace bin/findbugs --replace /bin/pwd pwd
17 d=$out/libexec/findbugs
18 mkdir -p $d $out/bin $out/nix-support
20 cp -prd bin lib plugin doc $d/
23 if [ -f $i ]; then ln -s $i $out/bin/; fi
26 # Get rid of unnecessary JARs.
29 # Make some JARs findable.
30 mkdir -p $out/share/java
31 ln -s $d/lib/{findbugs.jar,findbugs-ant.jar} $out/share/java/
33 cat <<EOF > $out/nix-support/setup-hook
34 export FINDBUGS_HOME=$d
39 description = "A static analysis tool to find bugs in Java programs automatically";
40 homepage = "https://findbugs.sourceforge.net/";
41 maintainers = with maintainers; [ pSub ];
42 platforms = with platforms; unix;
43 sourceProvenance = with sourceTypes; [ binaryBytecode ];
44 license = licenses.lgpl3;