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