Merge pull request #205275 from candyc1oud/clash-geoip

clash-geoip: 20220912 -> 20221212
This commit is contained in:
Jörg Thalheim 2022-12-18 08:45:10 +00:00 committed by GitHub
commit 7b046f255c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +1,29 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenvNoCC, fetchurl, nix-update-script }:
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation rec {
pname = "clash-geoip";
version = "20220912";
version = "20221212";
src = ./.;
data = fetchurl {
src = fetchurl {
url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb";
sha256 = "sha256-YIQjuWbizheEE9kgL+hBS1GAGf2PbpaW5mu/lim9Q9A";
sha256 = "sha256-pApPPRIvG8qak5chupTN2u1IUKANXtkcEMlSAPedjH4=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/etc/clash
install -Dm 0644 $data -D $out/etc/clash/Country.mmdb
install -Dm 0644 $src -D $out/etc/clash/Country.mmdb
runHook postInstall
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "A GeoLite2 data created by MaxMind";
homepage = "https://github.com/Dreamacro/maxmind-geoip";