2022-07-18 15:52:59 +08:00

21 lines
451 B
Nix

{ subscription, name }: with import <nixpkgs> {}; stdenv.mkDerivation {
name = "clash-updater-${name}";
src = ./updater.sh;
buildInputs = [
makeWrapper
];
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontUnpack = true;
checkPhase = ''
patchShebangs bin
'';
installPhase = ''
makeWrapper $src $out/bin/clash-updater --set SUBSCRIPTION_URL "${subscription}"
'';
}