add clash-updater
This commit is contained in:
parent
137633587b
commit
1d8fbd2cdd
@ -49,6 +49,20 @@ stdenv.mkDerivation {
|
||||
fi
|
||||
'';
|
||||
|
||||
makeUpdater = { subscription, name }: stdenv.mkDerivation {
|
||||
name = "clash-updater-${name}";
|
||||
src = ./updater.sh;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontPatchELF = true;
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
makeWrapper $src $out/bin/clash-updater-${name} --set SUBSCRIPTION_URL "${subscription}"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "close-sourced pre-built Clash binary with TUN support and more";
|
||||
homepage = "https://github.com/Dreamacro/clash/releases/premium";
|
||||
@ -59,4 +73,5 @@ stdenv.mkDerivation {
|
||||
"aarch64-linux"
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
8
pkgs/network/proxy/clash-premium/updater.sh
Normal file
8
pkgs/network/proxy/clash-premium/updater.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
env
|
||||
|
||||
sleep 10000
|
Loading…
x
Reference in New Issue
Block a user