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