Merge pull request #257850 from nagy/nagy/espup
espup: simplify version tester
This commit is contained in:
commit
1cd052a79a
1 changed files with 4 additions and 10 deletions
|
@ -9,7 +9,7 @@
|
||||||
, zstd
|
, zstd
|
||||||
, stdenv
|
, stdenv
|
||||||
, darwin
|
, darwin
|
||||||
, runCommand
|
, testers
|
||||||
, espup
|
, espup
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -62,15 +62,8 @@ rustPlatform.buildRustPackage rec {
|
||||||
--zsh <($out/bin/espup completions zsh)
|
--zsh <($out/bin/espup completions zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests.version = testers.testVersion {
|
||||||
simple = runCommand "${pname}-test" { } ''
|
package = espup;
|
||||||
if [[ `${espup}/bin/espup --version` != *"${version}"* ]]; then
|
|
||||||
echo "Error: program version does not match package version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
touch $out
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -78,5 +71,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
homepage = "https://github.com/esp-rs/espup/";
|
homepage = "https://github.com/esp-rs/espup/";
|
||||||
license = with licenses; [ mit asl20 ];
|
license = with licenses; [ mit asl20 ];
|
||||||
maintainers = with maintainers; [ knightpp ];
|
maintainers = with maintainers; [ knightpp ];
|
||||||
|
mainProgram = "espup";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue