diff options
author | Nick Cao <nickcao@nichi.co> | 2023-06-03 22:36:35 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-06-03 23:11:03 +0800 |
commit | 8b00d7f098eac0e1bb5eb52dad65146c251cdb13 (patch) | |
tree | a4a931d27fc39101223f061607d921d089084b9e /pkgs/data/misc | |
parent | 743be076c0bc6f1004882df414f6c1ef60bac09c (diff) | |
download | nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar.gz nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar.bz2 nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar.lz nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar.xz nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.tar.zst nixpkgs-8b00d7f098eac0e1bb5eb52dad65146c251cdb13.zip |
dbip-country-lite: init at 2023-06
Diffstat (limited to 'pkgs/data/misc')
-rw-r--r-- | pkgs/data/misc/dbip-country-lite/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/data/misc/dbip-country-lite/default.nix b/pkgs/data/misc/dbip-country-lite/default.nix new file mode 100644 index 00000000000..ffa2ec24974 --- /dev/null +++ b/pkgs/data/misc/dbip-country-lite/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenvNoCC +, fetchurl +, dbip-country-lite +}: + +stdenvNoCC.mkDerivation rec { + pname = "dbip-country-lite"; + version = "2023-06"; + + src = fetchurl { + url = "https://download.db-ip.com/free/dbip-country-lite-${version}.mmdb.gz"; + hash = "sha256-H+f7OhI03qhgpldF05Nc5ohPIPNhyVRCwiVqeWkvIbc="; + }; + + dontUnpack = true; + + installPhase = '' + runHook preBuild + + gzip -c -d "$src" > dbip-country-lite.mmdb + install -Dm444 dbip-country-lite.mmdb "$out/share/dbip/dbip-country-lite.mmdb" + + runHook postBuild + ''; + + passthru.mmdb = "${dbip-country-lite}/share/dbip/dbip-country-lite.mmdb"; + + meta = with lib; { + description = "The free IP to Country Lite database by DB-IP"; + homepage = "https://db-ip.com/db/download/ip-to-country-lite"; + license = licenses.cc-by-40; + maintainers = with maintainers; [ nickcao ]; + platforms = platforms.all; + }; +} |