Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

python.pkgs.semver: run tests

+8 -6
+8 -6
pkgs/development/python-modules/semver/default.nix
··· 1 - { stdenv, fetchPypi, buildPythonPackage }: 1 + { stdenv, fetchFromGitHub, buildPythonPackage, pytest }: 2 2 3 3 buildPythonPackage rec { 4 4 name = "${pname}-${version}"; 5 5 pname = "semver"; 6 6 version = "2.7.9"; 7 7 8 - src = fetchPypi { 9 - inherit pname version; 10 - sha256 = "1ffb55fb86a076cf7c161e6b5931f7da59f15abe217e0f24cea96cc8eec50f42"; 8 + src = fetchFromGitHub { 9 + owner = "k-bx"; 10 + repo = "python-semver"; 11 + rev = "2001c62d1a0361c44acc7076d8ce91e1d1c66141"; # not tagged in repository 12 + sha256 = "01c05sv97dyr672sa0nr3fnh2aqbmvkfw19d6rkaj16h2sdsyg0i"; 11 13 }; 12 14 13 - # No tests in archive 14 - doCheck = false; 15 + checkInputs = [ pytest ]; 16 + checkPhase = "pytest -v tests.py"; 15 17 16 18 meta = with stdenv.lib; { 17 19 description = "Python package to work with Semantic Versioning (http://semver.org/)";