3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/data/misc/geolite-legacy/default.nix
Tobias Geerinckx-Rice de56b74775
geolite-legacy 2016-02-29 -> 2016-04-19
Should fix the bug of Kansas farmers getting SWATted.

http://fusion.net/story/287592/internet-mapping-glitch-kansas-farm/
2016-04-19 12:30:12 +02:00

42 lines
1.3 KiB
Nix

{ stdenv, fetchurl }:
let
fetchDB = src: name: sha256: fetchurl {
inherit name sha256;
url = "https://geolite.maxmind.com/download/geoip/database/${src}";
};
in
stdenv.mkDerivation rec {
name = "geolite-legacy-${version}";
version = "2016-04-19";
srcGeoIP = fetchDB
"GeoLiteCountry/GeoIP.dat.gz" "GeoIP.dat.gz"
"0g34nwilhim73f0qp0yq3lfx54c42wy70ra4dkmwlfddyq3ln0xd";
srcGeoIPv6 = fetchDB
"GeoIPv6.dat.gz" "GeoIPv6.dat.gz"
"12k4nmfblm9c7kj4v7cyl6sgfgdfv2jdx4fl7nxfzpk1km7yc5na";
srcGeoLiteCity = fetchDB
"GeoLiteCity.dat.xz" "GeoIPCity.dat.xz"
"1l6pnlapc9ky3k6wznlhi013i7r3i68x3b5bmkgbvnxadjjdwszw";
srcGeoLiteCityv6 = fetchDB
"GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz" "GeoIPCityv6.dat.gz"
"11igx6r0fypih5i3f0mrcv044pivnl45mq6pkq81i81cv28hfcn8";
srcGeoIPASNum = fetchDB
"asnum/GeoIPASNum.dat.gz" "GeoIPASNum.dat.gz"
"0xf5ciqclk9pb82kz9zkv15wb8vm32i456jcwkf6rjv18h3wjl74";
srcGeoIPASNumv6 = fetchDB
"asnum/GeoIPASNumv6.dat.gz" "GeoIPASNumv6.dat.gz"
"0bgxw4xdkvpwhg7fdillnk8qk14hgld4icvp81d15pz4j0b9jwq9";
meta = with stdenv.lib; {
description = "GeoLite Legacy IP geolocation databases";
homepage = https://geolite.maxmind.com/download/geoip;
license = licenses.cc-by-sa-30;
platforms = platforms.all;
maintainers = with maintainers; [ nckx ];
};
builder = ./builder.sh;
}