nixpkgs/pkgs/data/misc/clash-geoip/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
794 B
Nix
Raw Normal View History

2022-12-17 10:23:52 +01:00
{ lib, stdenvNoCC, fetchurl, nix-update-script }:
2022-10-02 07:30:51 +02:00
2022-12-09 11:09:06 +01:00
stdenvNoCC.mkDerivation rec {
2022-10-02 07:30:51 +02:00
pname = "clash-geoip";
2023-02-19 12:53:28 +01:00
version = "20230212";
2022-10-02 07:30:51 +02:00
2022-12-09 11:09:06 +01:00
src = fetchurl {
2022-10-02 07:30:51 +02:00
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
2023-02-19 12:53:28 +01:00
sha256 = "sha256-Tnma6tpET4Vrm5G8KmLpsVnpD2JIKts56kZQsBIbRZ8=";
2022-10-02 07:30:51 +02:00
};
2022-12-09 11:09:06 +01:00
dontUnpack = true;
2022-10-02 07:30:51 +02:00
installPhase = ''
runHook preInstall
mkdir -p $out/etc/clash
2022-12-09 11:09:06 +01:00
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
2022-10-02 07:30:51 +02:00
runHook postInstall
'';
2022-12-17 10:23:52 +01:00
passthru = {
updateScript = nix-update-script { };
2022-12-17 10:23:52 +01:00
};
2022-12-09 11:18:18 +01:00
2022-10-02 07:30:51 +02:00
meta = with lib; {
description = "A GeoLite2 data created by MaxMind";
homepage = "https://github.com/Dreamacro/maxmind-geoip";
license = licenses.unfree;
maintainers = with maintainers; [ candyc1oud ];
};
}