2022-12-28 21:21:41 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, nix-update-script }:
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-10-06 18:32:54 +00:00
|
|
|
pname = "clash-geoip";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "20230612";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
src = fetchurl {
|
2022-10-06 18:32:54 +00:00
|
|
|
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-uD+UzMjpQvuNMcIxm4iHLnJwhxXstE3W+0xCuf9j/i8=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/etc/clash
|
2022-12-28 21:21:41 +00:00
|
|
|
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
|
2022-10-06 18:32:54 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A GeoLite2 data created by MaxMind";
|
|
|
|
homepage = "https://github.com/Dreamacro/maxmind-geoip";
|
|
|
|
license = licenses.unfree;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = [];
|
2023-05-24 13:37:59 +00:00
|
|
|
platforms = platforms.all;
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
}
|