diff --git a/pkgs/development/python-modules/swagger-spec-validator/default.nix b/pkgs/development/python-modules/swagger-spec-validator/default.nix index ce67e6689ace..ec15516b16b6 100644 --- a/pkgs/development/python-modules/swagger-spec-validator/default.nix +++ b/pkgs/development/python-modules/swagger-spec-validator/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytest, mock }: +{ lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytestCheckHook, mock }: buildPythonPackage rec { pname = "swagger-spec-validator"; @@ -7,25 +7,23 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "Yelp"; repo = "swagger_spec_validator"; - rev = "v" + version; + rev = "v${version}"; sha256 = "sha256-7+kFmtzeze0QlGf6z/M4J4F7z771a5NWewB1S3+bxn4="; }; - checkInputs = [ - pytest - mock - ]; - - checkPhase = '' - pytest tests - ''; - propagatedBuildInputs = [ pyyaml jsonschema six ]; + checkInputs = [ + pytestCheckHook + mock + ]; + + pythonImportsCheck = [ "swagger_spec_validator" ]; + meta = with lib; { homepage = "https://github.com/Yelp/swagger_spec_validator"; license = licenses.asl20; @@ -33,5 +31,3 @@ buildPythonPackage rec { maintainers = with maintainers; [ vanschelven ]; }; } - -