depot/third_party/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

28 lines
742 B
Nix

{lib, 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";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ jdk ];
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 = lib.licenses.lgpl21Plus;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.unix;
};
}