mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
Merge pull request #205275 from candyc1oud/clash-geoip
clash-geoip: 20220912 -> 20221212
This commit is contained in:
commit
7b046f255c
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user