cargo-vendor-normalise: add a small install check

This commit is contained in:
Symphorien Gibol 2018-09-11 23:40:35 +02:00
parent 33dab23255
commit a3e1da17cb

View File

@ -4,6 +4,13 @@ let cargo-vendor-normalise = stdenv.mkDerivation {
src = ./cargo-vendor-normalise.py;
unpackPhase = ":";
installPhase = "install -D $src $out/bin/cargo-vendor-normalise";
doInstallCheck = true;
installCheckPhase = ''
# check that ./fetchcargo-default-config.toml is a fix point
reference=${./fetchcargo-default-config.toml}
< $reference $out/bin/cargo-vendor-normalise > test;
cmp test $reference
'';
buildInputs = [ (python3.withPackages(ps: [ ps.toml ])) ];
preferLocalBuild = true;
};