21 lines
451 B
Nix
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}"
|
|
'';
|
|
}
|