dbip-{asn,city}-lite: init at 2024-10 (#349963)

This commit is contained in:
Nick Cao
2024-10-20 09:23:22 -04:00
committed by GitHub
4 changed files with 78 additions and 10 deletions
+35
View 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;
};
})
@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-city-lite";
version = "2024-10";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-city-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-sPjtO0WRdMxGiTySFO3vA1mL3RHxDnhLFzQ1fq2LNUw=";
};
dontUnpack = true;
installPhase = ''
runHook preBuild
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";
meta = {
description = "Free IP to City Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-city-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = lib.platforms.all;
};
})
@@ -1,8 +1,8 @@
{ lib
, stdenvNoCC
, fetchurl
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-country-lite";
version = "2024-10";
@@ -25,11 +25,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
meta = with lib; {
meta = {
description = "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;
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ nickcao ];
platforms = lib.platforms.all;
};
})
-2
View File
@@ -528,8 +528,6 @@ with pkgs;
databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { };
dbip-country-lite = callPackage ../data/misc/dbip-country-lite { };
dcgm = callPackage ../os-specific/linux/dcgm { };
deck = callPackage ../by-name/de/deck/package.nix {