mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
dbip-asn-lite: init at 2024-10
This commit is contained in:
parent
04a6c3b456
commit
6ed7376021
35
pkgs/by-name/db/dbip-asn-lite/package.nix
Normal file
35
pkgs/by-name/db/dbip-asn-lite/package.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "dbip-asn-lite";
|
||||
version = "2024-10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.db-ip.com/free/dbip-asn-lite-${finalAttrs.version}.mmdb.gz";
|
||||
hash = "sha256-zfBRxZ6xwIrOC6MrmtbfKrIK7jxMD/1EMOgQDON6nPw=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
gzip -c -d "$src" > dbip-asn-lite.mmdb
|
||||
install -Dm444 dbip-asn-lite.mmdb "$out/share/dbip/dbip-asn-lite.mmdb"
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-asn-lite.mmdb";
|
||||
|
||||
meta = {
|
||||
description = "Free IP to ASN Lite database by DB-IP";
|
||||
homepage = "https://db-ip.com/db/download/ip-to-asn-lite";
|
||||
license = lib.licenses.cc-by-40;
|
||||
maintainers = with lib.maintainers; [ Guanran928 ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user