From b97a0eb54e8ee55fd80a1022f96655afca04e94e Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 6 May 2010 13:58:27 +0000 Subject: [PATCH] Added GeoIP Java API library svn path=/nixpkgs/trunk/; revision=21626 --- .../libraries/java/geoipjava/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/libraries/java/geoipjava/default.nix diff --git a/pkgs/development/libraries/java/geoipjava/default.nix b/pkgs/development/libraries/java/geoipjava/default.nix new file mode 100644 index 000000000000..f713ef2f645a --- /dev/null +++ b/pkgs/development/libraries/java/geoipjava/default.nix @@ -0,0 +1,26 @@ +{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 = + '' + ensureDir $out/share/java + cp maxmindgeoip.jar $out/share/java + ''; + meta = { + description = "GeoIP Java API"; + license = "LGPL2.1+"; + maintainers = [ stdenv.lib.maintainers.sander ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22d3139835b1..b3346b9165a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3794,6 +3794,10 @@ let inherit zlib; }; + geoipjava = import ../development/libraries/java/geoipjava { + inherit stdenv fetchurl jdk unzip; + }; + geos = import ../development/libraries/geos { inherit fetchurl fetchsvn stdenv autoconf automake libtool swig which lib composableDerivation python ruby;