nixpkgs/pkgs/data/misc/clash-geoip/default.nix
2023-08-19 06:47:40 +00:00

33 lines
795 B
Nix

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