mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
Merge pull request #168703 from Artturin/testversion1
This commit is contained in:
commit
3886bcd30f
@ -814,7 +814,11 @@ rec {
|
||||
command ? "${package.meta.mainProgram or package.pname or package.name} --version",
|
||||
version ? package.version,
|
||||
}: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
|
||||
${command} |& grep -Fw ${version}
|
||||
touch $out
|
||||
if output=$(${command} 2>&1); then
|
||||
grep -Fw "${version}" - <<< "$output"
|
||||
touch $out
|
||||
else
|
||||
echo "$output" >&2 && exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user