mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
32 lines
794 B
Nix
32 lines
794 B
Nix
{ lib, stdenvNoCC, fetchurl, nix-update-script }:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "clash-geoip";
|
|
version = "20240812";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
|
|
sha256 = "sha256-wX5qBZIwdGFzOlk42SDs8T4QhDovEJ6twyghX/JRgjY=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|