Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenvNoCC, fetchurl, nix-update-script }: 2 3stdenvNoCC.mkDerivation rec { 4 pname = "clash-geoip"; 5 version = "20230512"; 6 7 src = fetchurl { 8 url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb"; 9 sha256 = "sha256-/QIii+f7pOzXXlhDQV6XGHpyjAlCS/OONalbPSnmArE="; 10 }; 11 12 dontUnpack = true; 13 14 installPhase = '' 15 runHook preInstall 16 mkdir -p $out/etc/clash 17 install -Dm 0644 $src -D $out/etc/clash/Country.mmdb 18 runHook postInstall 19 ''; 20 21 passthru = { 22 updateScript = nix-update-script { }; 23 }; 24 25 meta = with lib; { 26 description = "A GeoLite2 data created by MaxMind"; 27 homepage = "https://github.com/Dreamacro/maxmind-geoip"; 28 license = licenses.unfree; 29 maintainers = []; 30 platforms = platforms.all; 31 }; 32}