depot/third_party/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

27 lines
732 B
Nix

{stdenv, fetchurl, jdk, unzip}:
stdenv.mkDerivation {
name = "GeoIPJava-1.2.5";
src = fetchurl {
url = "https://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-1.2.5.zip";
sha256 = "1gb2d0qvvq7xankz7l7ymbr3qprwk9bifpy4hlgw0sq4i6a55ypd";
};
buildInputs = [ jdk unzip ];
buildPhase =
''
cd source
javac $(find . -name \*.java)
jar cfv maxmindgeoip.jar $(find . -name \*.class)
'';
installPhase =
''
mkdir -p $out/share/java
cp maxmindgeoip.jar $out/share/java
'';
meta = {
description = "GeoIP Java API";
license = stdenv.lib.licenses.lgpl21Plus;
maintainers = [ stdenv.lib.maintainers.sander ];
platforms = stdenv.lib.platforms.unix;
};
}