depot/third_party/nixpkgs/pkgs/data/misc/clash-geoip/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

32 lines
794 B
Nix

{ lib, stdenvNoCC, fetchurl, nix-update-script }:
stdenvNoCC.mkDerivation rec {
pname = "clash-geoip";
version = "20240712";
src = fetchurl {
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
sha256 = "sha256-qCa1Udu3qcXggDcVRYqTs7Jvisudh0ZMb48oKVYCG+k=";
};
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 = "GeoLite2 data created by MaxMind";
homepage = "https://github.com/Dreamacro/maxmind-geoip";
license = licenses.unfree;
maintainers = [ ];
platforms = platforms.all;
};
}