2021-01-21 17:00:13 +00:00
|
|
|
{lib, stdenv, fetchurl, jdk, unzip}:
|
2010-05-06 14:58:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-02-14 13:47:27 +00:00
|
|
|
name = "GeoIPJava-1.2.5";
|
2010-05-06 14:58:27 +01:00
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-1.2.5.zip";
|
2012-02-14 13:47:27 +00:00
|
|
|
sha256 = "1gb2d0qvvq7xankz7l7ymbr3qprwk9bifpy4hlgw0sq4i6a55ypd";
|
2010-05-06 14:58:27 +01:00
|
|
|
};
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
buildInputs = [ jdk ];
|
2021-01-19 21:20:11 +00:00
|
|
|
buildPhase =
|
2010-05-06 14:58:27 +01:00
|
|
|
''
|
|
|
|
cd source
|
|
|
|
javac $(find . -name \*.java)
|
|
|
|
jar cfv maxmindgeoip.jar $(find . -name \*.class)
|
|
|
|
'';
|
|
|
|
installPhase =
|
|
|
|
''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/java
|
2010-05-06 14:58:27 +01:00
|
|
|
cp maxmindgeoip.jar $out/share/java
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
description = "GeoIP Java API";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
maintainers = [ lib.maintainers.sander ];
|
|
|
|
platforms = lib.platforms.unix;
|
2010-05-06 14:58:27 +01:00
|
|
|
};
|
|
|
|
}
|