nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

27 lines
666 B
Nix

{stdenv, fetchurl, jdk, unzip}:
stdenv.mkDerivation {
name = "GeoIPJava-1.2.3";
src = fetchurl {
url = http://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-1.2.3.zip;
sha256 = "0l8vxan2xh0mp1vjxh39q05jyfw8gk5y77b7i8s1aw7ssyzd05vs";
};
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 = "LGPL2.1+";
maintainers = [ stdenv.lib.maintainers.sander ];
};
}