From b742a09c439ec76ab99a2a709eccca6895fe028b Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Tue, 2 Sep 2025 10:38:54 +0100 Subject: [PATCH] fix: move the fixing of the path to the package and not teh module --- applications/itd/splunk/module.nix | 7 ------- applications/itd/splunk/package.nix | 9 +++++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/applications/itd/splunk/module.nix b/applications/itd/splunk/module.nix index e186929..3c841fb 100644 --- a/applications/itd/splunk/module.nix +++ b/applications/itd/splunk/module.nix @@ -115,13 +115,6 @@ in { mkdir -p $SPLUNK_HOME/etc/apps/000_ul_umbrio_essentials/local/ cp ${deployment_client} $SPLUNK_HOME/etc/apps/000_ul_umbrio_essentials/local/deploymentclient.conf - - # Splunk is doing a crime by deciding what teh path is, need to comment out this line - # in /bin/pid_check.sh - # PATH=/usr/xpg4/bin:/usr/bin:/bin - # PATH= - sed -i -e 's/PATH=/#PATH=/g' ${cfg.user.home}/bin/pid_check.sh - # make sure user permissions are correct chmod 771 -R ${cfg.user.home} chown ${cfg.user.user}:${cfg.user.group} -R ${cfg.user.home} diff --git a/applications/itd/splunk/package.nix b/applications/itd/splunk/package.nix index aa5db9c..c5a21ef 100644 --- a/applications/itd/splunk/package.nix +++ b/applications/itd/splunk/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - #, alsa-lib + gnused, openssl, zlib, autoPatchelfHook, @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { # alsaLib openssl zlib + gnused ]; sourceRoot = "."; @@ -30,8 +31,12 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall # gets unzipped and we just pop it all into teh output - # might add the patching of the path vars in the scripts to be here cp -R ./splunkforwarder $out + + # Splunk is doing a crime by deciding what teh path is, need to comment out this line in /bin/pid_check.sh + # PATH=/usr/xpg4/bin:/usr/bin:/bin + find $out -type f -name "*.sh" -print0 | xargs -0 sed -i -e 's/PATH=/#PATH=/g' + runHook postInstall '';