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.

33 lines
795 B
Nix
Raw Normal View History

2022-12-17 09:23:52 +00:00
{ lib, stdenvNoCC, fetchurl, nix-update-script }:
2022-10-02 05:30:51 +00:00
2022-12-09 10:09:06 +00:00
stdenvNoCC.mkDerivation rec {
2022-10-02 05:30:51 +00:00
pname = "clash-geoip";
2024-04-13 13:21:35 +00:00
version = "20240412";
2022-10-02 05:30:51 +00:00
2022-12-09 10:09:06 +00:00
src = fetchurl {
2022-10-02 05:30:51 +00:00
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
2024-04-13 13:21:35 +00:00
sha256 = "sha256-xc31FwO9wku1MzLIuCScOKEgzwLPn5NuXi2H4L3+M9s=";
2022-10-02 05:30:51 +00:00
};
2022-12-09 10:09:06 +00:00
dontUnpack = true;
2022-10-02 05:30:51 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/etc/clash
2022-12-09 10:09:06 +00:00
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
2022-10-02 05:30:51 +00:00
runHook postInstall
'';
2022-12-17 09:23:52 +00:00
passthru = {
updateScript = nix-update-script { };
2022-12-17 09:23:52 +00:00
};
2022-12-09 10:18:18 +00:00
2022-10-02 05:30:51 +00:00
meta = with lib; {
description = "A GeoLite2 data created by MaxMind";
homepage = "https://github.com/Dreamacro/maxmind-geoip";
license = licenses.unfree;
2023-04-05 00:29:57 +00:00
maintainers = [];
2023-05-24 11:46:54 +00:00
platforms = platforms.all;
2022-10-02 05:30:51 +00:00
};
}