Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 jdk, 6 unzip, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "GeoIPJava"; 11 version = "1.2.5"; 12 13 src = fetchurl { 14 url = "https://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-${version}.zip"; 15 sha256 = "1gb2d0qvvq7xankz7l7ymbr3qprwk9bifpy4hlgw0sq4i6a55ypd"; 16 }; 17 nativeBuildInputs = [ unzip ]; 18 buildInputs = [ jdk ]; 19 buildPhase = '' 20 cd source 21 javac $(find . -name \*.java) 22 jar cfv maxmindgeoip.jar $(find . -name \*.class) 23 ''; 24 installPhase = '' 25 mkdir -p $out/share/java 26 cp maxmindgeoip.jar $out/share/java 27 ''; 28 meta = { 29 description = "GeoIP Java API"; 30 license = lib.licenses.lgpl21Plus; 31 maintainers = [ lib.maintainers.sander ]; 32 platforms = lib.platforms.unix; 33 }; 34}