coolercontrol.coolercontrold: Hardcode a shell

So we don't need to add bash to the service's PATH
This commit is contained in:
OPNA2608 2024-04-13 11:17:18 +02:00 committed by Guy Boldon
parent 5bb6726e84
commit bbc0a5ee52
No known key found for this signature in database
GPG key ID: CF7BBB5BC7561BD3

View file

@ -2,6 +2,7 @@
, buildNpmPackage , buildNpmPackage
, testers , testers
, coolercontrol , coolercontrol
, runtimeShell
}: }:
{ version { version
@ -16,11 +17,15 @@ rustPlatform.buildRustPackage {
cargoHash = "sha256-qXZ/LXbKkLvnEQibGyMvkkYhz2eEGUHsYxVF3EbCpFc="; cargoHash = "sha256-qXZ/LXbKkLvnEQibGyMvkkYhz2eEGUHsYxVF3EbCpFc=";
# copy the frontend static resources to a directory for embedding
postPatch = '' postPatch = ''
# copy the frontend static resources to a directory for embedding
mkdir -p ui-build mkdir -p ui-build
cp -R ${coolercontrol.coolercontrol-ui-data}/* ui-build/ cp -R ${coolercontrol.coolercontrol-ui-data}/* ui-build/
substituteInPlace build.rs --replace '"./resources/app"' '"./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 = '' postInstall = ''