nixpkgs/pkgs/data/misc/clash-geoip/default.nix
2022-12-16 09:17:01 +00:00

30 lines
752 B
Nix

{ lib, stdenvNoCC, fetchurl }:
stdenvNoCC.mkDerivation rec {
pname = "clash-geoip";
version = "20221212";
src = fetchurl {
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
sha256 = "sha256-pApPPRIvG8qak5chupTN2u1IUKANXtkcEMlSAPedjH4=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/etc/clash
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "A GeoLite2 data created by MaxMind";
homepage = "https://github.com/Dreamacro/maxmind-geoip";
license = licenses.unfree;
maintainers = with maintainers; [ candyc1oud ];
};
}