From bbc0a5ee52707169d9ffb9f6eb840c4a9c426e1d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 13 Apr 2024 11:17:18 +0200 Subject: [PATCH] coolercontrol.coolercontrold: Hardcode a shell So we don't need to add bash to the service's PATH --- pkgs/applications/system/coolercontrol/coolercontrold.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/system/coolercontrol/coolercontrold.nix b/pkgs/applications/system/coolercontrol/coolercontrold.nix index 609cf6d789aa..96ca8613de25 100644 --- a/pkgs/applications/system/coolercontrol/coolercontrold.nix +++ b/pkgs/applications/system/coolercontrol/coolercontrold.nix @@ -2,6 +2,7 @@ , buildNpmPackage , testers , coolercontrol +, runtimeShell }: { version @@ -16,11 +17,15 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-qXZ/LXbKkLvnEQibGyMvkkYhz2eEGUHsYxVF3EbCpFc="; - # copy the frontend static resources to a directory for embedding postPatch = '' + # copy the frontend static resources to a directory for embedding mkdir -p ui-build cp -R ${coolercontrol.coolercontrol-ui-data}/* ui-build/ substituteInPlace build.rs --replace '"./resources/app"' '"./ui-build"' + + # Hardcode a shell + substituteInPlace src/repositories/utils.rs \ + --replace-fail 'Command::new("sh")' 'Command::new("${runtimeShell}")' ''; postInstall = ''