nixpkgs/pkgs/by-name/db/dbip-country-lite/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
897 B
Nix
Raw Normal View History

2024-10-20 08:01:55 +00:00
{
lib,
stdenvNoCC,
fetchurl,
2023-06-03 14:36:35 +00:00
}:
2023-08-01 06:34:17 +00:00
stdenvNoCC.mkDerivation (finalAttrs: {
2023-06-03 14:36:35 +00:00
pname = "dbip-country-lite";
2024-11-01 15:30:12 +00:00
version = "2024-11";
2023-06-03 14:36:35 +00:00
src = fetchurl {
2023-08-01 06:34:17 +00:00
url = "https://download.db-ip.com/free/dbip-country-lite-${finalAttrs.version}.mmdb.gz";
2024-11-01 15:30:12 +00:00
hash = "sha256-Ua4hm0duKHAD/cgtOaDqAYT/4lWsuoIdPnM7K0Lqecw=";
2023-06-03 14:36:35 +00:00
};
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
'';
2023-08-01 06:34:17 +00:00
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
2023-06-03 14:36:35 +00:00
2024-10-20 08:01:55 +00:00
meta = {
2023-06-03 14:36:35 +00:00
description = "Free IP to Country Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-country-lite";
2024-10-20 08:01:55 +00:00
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ nickcao ];
platforms = lib.platforms.all;
2023-06-03 14:36:35 +00:00
};
2023-08-01 06:34:17 +00:00
})