2022-07-18 16:23:12 +08:00

21 lines
522 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;
installPhase = ''
mkdir -pv $out/bin
cp -v $src $out/bin/updater.sh
patchShebangs $out/bin/updater.sh
makeWrapper $out/bin/updater.sh $out/bin/clash-updater --set SUBSCRIPTION_URL "${subscription}"
'';
}