mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
30 lines
752 B
Nix
30 lines
752 B
Nix
{ lib, stdenvNoCC, fetchurl }:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "clash-geoip";
|
|
version = "20221212";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
|
|
sha256 = "sha256-pApPPRIvG8qak5chupTN2u1IUKANXtkcEMlSAPedjH4=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/etc/clash
|
|
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = with lib; {
|
|
description = "A GeoLite2 data created by MaxMind";
|
|
homepage = "https://github.com/Dreamacro/maxmind-geoip";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ candyc1oud ];
|
|
};
|
|
}
|