Loading pkgs/data/misc/dbip-country-lite/default.nix 0 → 100644 +36 −0 Original line number Diff line number Diff line { 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; }; } pkgs/data/misc/sing-geoip/default.nix +5 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ , stdenvNoCC , buildGoModule , fetchFromGitHub , clash-geoip , dbip-country-lite }: let Loading Loading @@ -34,7 +34,7 @@ let in stdenvNoCC.mkDerivation rec { inherit (generator) pname; inherit (clash-geoip) version; inherit (dbip-country-lite) version; dontUnpack = true; Loading @@ -43,8 +43,8 @@ stdenvNoCC.mkDerivation rec { buildPhase = '' runHook preBuild ${pname} ${clash-geoip}/etc/clash/Country.mmdb geoip.db ${pname} ${clash-geoip}/etc/clash/Country.mmdb geoip-cn.db cn ${pname} ${dbip-country-lite.mmdb} geoip.db ${pname} ${dbip-country-lite.mmdb} geoip-cn.db cn runHook postBuild ''; Loading @@ -61,6 +61,6 @@ stdenvNoCC.mkDerivation rec { passthru = { inherit generator; }; meta = generator.meta // { inherit (clash-geoip.meta) license; inherit (dbip-country-lite.meta) license; }; } pkgs/top-level/all-packages.nix +5 −1 Original line number Diff line number Diff line Loading @@ -519,6 +519,8 @@ with pkgs; databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { }; dbip-country-lite = callPackage ../data/misc/dbip-country-lite { }; dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { }; dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { }; Loading Loading @@ -12442,7 +12444,9 @@ with pkgs; sing-geosite = callPackage ../data/misc/sing-geosite { }; sing-geoip = callPackage ../data/misc/sing-geoip { }; sing-geoip = callPackage ../data/misc/sing-geoip { buildGoModule = buildGo119Module; }; sipcalc = callPackage ../tools/networking/sipcalc { }; Loading
pkgs/data/misc/dbip-country-lite/default.nix 0 → 100644 +36 −0 Original line number Diff line number Diff line { 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; }; }
pkgs/data/misc/sing-geoip/default.nix +5 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ , stdenvNoCC , buildGoModule , fetchFromGitHub , clash-geoip , dbip-country-lite }: let Loading Loading @@ -34,7 +34,7 @@ let in stdenvNoCC.mkDerivation rec { inherit (generator) pname; inherit (clash-geoip) version; inherit (dbip-country-lite) version; dontUnpack = true; Loading @@ -43,8 +43,8 @@ stdenvNoCC.mkDerivation rec { buildPhase = '' runHook preBuild ${pname} ${clash-geoip}/etc/clash/Country.mmdb geoip.db ${pname} ${clash-geoip}/etc/clash/Country.mmdb geoip-cn.db cn ${pname} ${dbip-country-lite.mmdb} geoip.db ${pname} ${dbip-country-lite.mmdb} geoip-cn.db cn runHook postBuild ''; Loading @@ -61,6 +61,6 @@ stdenvNoCC.mkDerivation rec { passthru = { inherit generator; }; meta = generator.meta // { inherit (clash-geoip.meta) license; inherit (dbip-country-lite.meta) license; }; }
pkgs/top-level/all-packages.nix +5 −1 Original line number Diff line number Diff line Loading @@ -519,6 +519,8 @@ with pkgs; databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { }; dbip-country-lite = callPackage ../data/misc/dbip-country-lite { }; dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { }; dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { }; Loading Loading @@ -12442,7 +12444,9 @@ with pkgs; sing-geosite = callPackage ../data/misc/sing-geosite { }; sing-geoip = callPackage ../data/misc/sing-geoip { }; sing-geoip = callPackage ../data/misc/sing-geoip { buildGoModule = buildGo119Module; }; sipcalc = callPackage ../tools/networking/sipcalc { };