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.
This commit is contained in:
linsui 2023-06-06 23:57:31 +08:00 committed by Anderson Torres
parent 779c32abc2
commit d29e6a5255

View file

@ -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; {