Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest 5, freezegun 6}: 7 8buildPythonPackage rec { 9 pname = "cached-property"; 10 version = "1.5.1"; 11 12 # conftest.py is missing in PyPI tarball 13 src = fetchFromGitHub { 14 owner = "pydanny"; 15 repo = pname; 16 rev = version; 17 sha256 = "0xh0pwmiikx0il9nnfyf034ydmlw6992s0d209agd9j5d3s2k5q6"; 18 }; 19 20 checkInputs = [ pytest freezegun ]; 21 22 # https://github.com/pydanny/cached-property/issues/131 23 checkPhase = '' 24 py.test -k "not test_threads_ttl_expiry" 25 ''; 26 27 meta = { 28 description = "A decorator for caching properties in classes"; 29 homepage = "https://github.com/pydanny/cached-property"; 30 license = lib.licenses.bsd3; 31 platforms = lib.platforms.unix; 32 maintainers = with lib.maintainers; [ ericsagnes ]; 33 }; 34}