mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
tmuxai
This commit is contained in:
parent
1ff9234499
commit
013b916c6e
1 changed files with 25 additions and 12 deletions
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = srcFetching;
|
src = srcFetching;
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = "."; # The binary is directly in the archive after extraction
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
|
|
@ -51,23 +51,36 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
dontCheck = true; # No Go tests to run on a pre-compiled binary
|
dontCheck = true;
|
||||||
doCheck = false; # No Go tests to run on a pre-compiled binary
|
doCheck = false;
|
||||||
|
|
||||||
# Test phase: check if the binary runs and prints version
|
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
echo "Checking installed tmuxai version..."
|
echo "--- Starting installCheckPhase ---"
|
||||||
# Create a temporary, writable HOME directory for the check phase
|
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
echo "Set temporary HOME to $HOME for install check"
|
echo "Set temporary HOME to $HOME for install check."
|
||||||
$out/bin/tmuxai version | grep "tmuxai version: v${version}"
|
|
||||||
if [ $? -ne 0 ]; then
|
echo "Attempting to run: $out/bin/tmuxai version"
|
||||||
echo "Version check failed!"
|
# Try to capture output and exit code separately
|
||||||
$out/bin/tmuxai version # Print actual output for debugging
|
VERSION_OUTPUT=$($out/bin/tmuxai version 2>&1)
|
||||||
|
EXIT_CODE=$?
|
||||||
|
echo "EXIT_CODE of 'tmuxai version': $EXIT_CODE"
|
||||||
|
echo "OUTPUT of 'tmuxai version':"
|
||||||
|
echo "$VERSION_OUTPUT"
|
||||||
|
echo "--- End of 'tmuxai version' output ---"
|
||||||
|
|
||||||
|
if [ "$EXIT_CODE" -ne 0 ]; then
|
||||||
|
echo "Error: 'tmuxai version' exited with code $EXIT_CODE."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Version check passed."
|
|
||||||
|
echo "$VERSION_OUTPUT" | grep "tmuxai version: v${version}"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error: Version string 'tmuxai version: v${version}' not found in output."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Install check passed."
|
||||||
runHook postInstallCheck
|
runHook postInstallCheck
|
||||||
'';
|
'';
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue