fix clash-updater

This commit is contained in:
guochao 2022-07-15 13:07:06 +08:00
parent 1d8fbd2cdd
commit 7270a94cde
2 changed files with 8 additions and 1 deletions

View File

@ -52,12 +52,19 @@ stdenv.mkDerivation {
makeUpdater = { subscription, name }: stdenv.mkDerivation { makeUpdater = { subscription, name }: stdenv.mkDerivation {
name = "clash-updater-${name}"; name = "clash-updater-${name}";
src = ./updater.sh; src = ./updater.sh;
buildInputs = [
makeWrapper
];
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
dontPatchELF = true; dontPatchELF = true;
dontUnpack = true; dontUnpack = true;
checkPhase = ''
patchShebangs bin
'';
installPhase = '' installPhase = ''
makeWrapper $src $out/bin/clash-updater-${name} --set SUBSCRIPTION_URL "${subscription}" makeWrapper $src $out/bin/clash-updater-${name} --set SUBSCRIPTION_URL "${subscription}"
''; '';

2
pkgs/network/proxy/clash-premium/updater.sh Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'