depot/third_party/nixpkgs/pkgs/data/misc/clash-geoip/default.nix
Default email 0d9fc34957 Project import generated by Copybara.
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
2023-01-20 11:41:00 +01:00

31 lines
794 B
Nix

{ lib, stdenvNoCC, fetchurl, nix-update-script }:
stdenvNoCC.mkDerivation rec {
pname = "clash-geoip";
version = "20230112";
src = fetchurl {
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
sha256 = "sha256-mMu+U3gtoZmi6LrTMTqsNZKZ+w4J6LZ16Aorneyy7P8=";
};
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 = with maintainers; [ candyc1oud ];
};
}