diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-07 03:33:58 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-07 03:33:58 +0200 |
commit | de2bba6d8c2701fceb8c2904a4270559f77beedf (patch) | |
tree | 4b5211b37162a77f0e1e118b9f0dfad00c54548a /pkgs/tools/networking/ipv6calc | |
parent | be10d389f1d8247a1284b16aa86a8a5563b0e528 (diff) |
ipv6calc: add optional ip2location support
This only links to the C library. The database must be downloaded manually.
Diffstat (limited to 'pkgs/tools/networking/ipv6calc')
-rw-r--r-- | pkgs/tools/networking/ipv6calc/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/tools/networking/ipv6calc/default.nix b/pkgs/tools/networking/ipv6calc/default.nix index 08a13a9f9ac6e..a7c844932c964 100644 --- a/pkgs/tools/networking/ipv6calc/default.nix +++ b/pkgs/tools/networking/ipv6calc/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, geoip, geolite-legacy, getopt, openssl, perl }: +{ stdenv, fetchurl, getopt, ip2location-c, openssl, perl +, geoip ? null, geolite-legacy ? null +, ip2location-database ? null }: let version = "0.99.1"; in stdenv.mkDerivation rec { @@ -9,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0a0xpai14y969hp6l10r2wcd16sqf3v40fq5h97m4a69hcpmvg5h"; }; - buildInputs = [ geoip geolite-legacy getopt openssl ]; + buildInputs = [ geoip geolite-legacy getopt ip2location-c openssl ]; nativeBuildInputs = [ perl ]; patchPhase = '' @@ -30,6 +32,8 @@ stdenv.mkDerivation rec { "--enable-geoip" ] ++ stdenv.lib.optional (geolite-legacy != null) [ "--with-geoip-db=${geolite-legacy}/share/GeoIP" + ] ++ stdenv.lib.optional (ip2location-c != null ) [ + "--enable-ip2location" ]; enableParallelBuilding = true; |