From 7270a94cdeb2da02b9363af761115cd54fc2178b Mon Sep 17 00:00:00 2001 From: guochao Date: Fri, 15 Jul 2022 13:07:06 +0800 Subject: [PATCH] fix clash-updater --- pkgs/network/proxy/clash-premium/default.nix | 7 +++++++ pkgs/network/proxy/clash-premium/updater.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) mode change 100644 => 100755 pkgs/network/proxy/clash-premium/updater.sh diff --git a/pkgs/network/proxy/clash-premium/default.nix b/pkgs/network/proxy/clash-premium/default.nix index 0c45724..3258199 100644 --- a/pkgs/network/proxy/clash-premium/default.nix +++ b/pkgs/network/proxy/clash-premium/default.nix @@ -52,12 +52,19 @@ stdenv.mkDerivation { makeUpdater = { subscription, name }: 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-${name} --set SUBSCRIPTION_URL "${subscription}" ''; diff --git a/pkgs/network/proxy/clash-premium/updater.sh b/pkgs/network/proxy/clash-premium/updater.sh old mode 100644 new mode 100755 index bb26473..40f94a7 --- a/pkgs/network/proxy/clash-premium/updater.sh +++ b/pkgs/network/proxy/clash-premium/updater.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t'