Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 40 lines 1.2 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub 2, isPy3k, attrs, coverage, enum34 3, doCheck ? true, pytest, pytest_xdist, flaky, mock 4}: 5buildPythonPackage rec { 6 # https://hypothesis.readthedocs.org/en/latest/packaging.html 7 8 # Hypothesis has optional dependencies on the following libraries 9 # pytz fake_factory django numpy pytest 10 # If you need these, you can just add them to your environment. 11 12 version = "4.7.3"; 13 pname = "hypothesis"; 14 15 # Use github tarballs that includes tests 16 src = fetchFromGitHub { 17 owner = "HypothesisWorks"; 18 repo = "hypothesis-python"; 19 rev = "hypothesis-python-${version}"; 20 sha256 = "03l4hp0p7i2k04arnqkav0ygc23ml46dy3cfrlwviasrj7yzk5hc"; 21 }; 22 23 postUnpack = "sourceRoot=$sourceRoot/hypothesis-python"; 24 25 propagatedBuildInputs = [ attrs coverage ] ++ lib.optional (!isPy3k) [ enum34 ]; 26 27 checkInputs = [ pytest pytest_xdist flaky mock ]; 28 inherit doCheck; 29 30 checkPhase = '' 31 rm tox.ini # This file changes how py.test runs and breaks it 32 py.test tests/cover 33 ''; 34 35 meta = with lib; { 36 description = "A Python library for property based testing"; 37 homepage = https://github.com/HypothesisWorks/hypothesis; 38 license = licenses.mpl20; 39 }; 40}