From d29e6a52554718691c8b5b0f16d68fad20c3110b Mon Sep 17 00:00:00 2001 From: linsui Date: Tue, 6 Jun 2023 23:57:31 +0800 Subject: [PATCH] variety: fix script shell The scripts are copied to the user directory and they are not updated with the package. When the bash path is changed, the shebang will stop working. This patch change the code so that the bash is called directly instead of relying on the shebang. --- pkgs/applications/misc/variety/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/variety/default.nix b/pkgs/applications/misc/variety/default.nix index 5d9965c0d14a..da6d7b48696a 100644 --- a/pkgs/applications/misc/variety/default.nix +++ b/pkgs/applications/misc/variety/default.nix @@ -75,10 +75,9 @@ python3.pkgs.buildPythonApplication rec { substituteInPlace variety_lib/varietyconfig.py \ --replace "__variety_data_directory__ = \"../data\"" \ "__variety_data_directory__ = \"$out/share/variety\"" - substituteInPlace data/scripts/set_wallpaper \ - --replace /bin/bash ${runtimeShell} - substituteInPlace data/scripts/get_wallpaper \ - --replace /bin/bash ${runtimeShell} + substituteInPlace variety/VarietyWindow.py \ + --replace '[script,' '["${runtimeShell}", script,' \ + --replace 'check_output(script)' 'check_output(["${runtimeShell}", script])' ''; meta = with lib; {