m1n1: enable tests
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
imagemagick,
|
||||
source-code-pro,
|
||||
python3Packages,
|
||||
nix-update-script,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -47,6 +48,25 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
pytest
|
||||
];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
construct
|
||||
pyserial
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
pytest
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user