@@ -1,4 +1,6 @@
1−{ stdenv, fetchurl, geoip, geolite-legacy, getopt, openssl, perl }:
1+{ stdenv, fetchurl, getopt, ip2location-c, openssl, perl
2+, geoip ? null, geolite-legacy ? null
3+, ip2location-database ? null }:
24
35let version = "0.99.1"; in
46stdenv.mkDerivation rec {
@@ -9,7 +11,7 @@ stdenv.mkDerivation rec {
911 sha256 = "0a0xpai14y969hp6l10r2wcd16sqf3v40fq5h97m4a69hcpmvg5h";
1012 };
1113
12− buildInputs = [ geoip geolite-legacy getopt openssl ];
14+ buildInputs = [ geoip geolite-legacy getopt ip2location-c openssl ];
1315 nativeBuildInputs = [ perl ];
1416
1517 patchPhase = ''
@@ -30,6 +32,8 @@ stdenv.mkDerivation rec {
3032 "--enable-geoip"
3133 ] ++ stdenv.lib.optional (geolite-legacy != null) [
3234 "--with-geoip-db=${geolite-legacy}/share/GeoIP"
35+ ] ++ stdenv.lib.optional (ip2location-c != null ) [
36+ "--enable-ip2location"
3337 ];
3438
3539 enableParallelBuilding = true;