clash-geoip: add update script
This commit is contained in:
parent
f4ef149e9c
commit
b32d7053fa
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,8 @@ stdenvNoCC.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A GeoLite2 data created by MaxMind";
|
||||
homepage = "https://github.com/Dreamacro/maxmind-geoip";
|
||||
|
|
6
pkgs/data/misc/clash-geoip/update.sh
Executable file
6
pkgs/data/misc/clash-geoip/update.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p common-updater-scripts curl jq
|
||||
set -euo pipefail
|
||||
|
||||
RELEASE=$(curl "https://api.github.com/repos/Dreamacro/maxmind-geoip/releases/latest")
|
||||
update-source-version clash-geoip "$(echo $RELEASE | jq -r .tag_name)"
|
Loading…
Reference in a new issue