21 lines
522 B
Nix
Raw Normal View History

2022-07-18 15:12:35 +08:00
{ 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 = ''
2022-07-18 16:04:10 +08:00
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}"
2022-07-18 15:12:35 +08:00
'';
}