add clash-updater
This commit is contained in:
parent
137633587b
commit
1d8fbd2cdd
@ -49,6 +49,20 @@ stdenv.mkDerivation {
|
|||||||
fi
|
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 = {
|
meta = {
|
||||||
description = "close-sourced pre-built Clash binary with TUN support and more";
|
description = "close-sourced pre-built Clash binary with TUN support and more";
|
||||||
homepage = "https://github.com/Dreamacro/clash/releases/premium";
|
homepage = "https://github.com/Dreamacro/clash/releases/premium";
|
||||||
@ -60,3 +74,4 @@ stdenv.mkDerivation {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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