diff --git a/pkgs/development/python-modules/cached-property/default.nix b/pkgs/development/python-modules/cached-property/default.nix new file mode 100644 index 000000000000..6ab5015a1e79 --- /dev/null +++ b/pkgs/development/python-modules/cached-property/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +, freezegun +}: + +buildPythonPackage rec { + pname = "cached-property"; + version = "1.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "6562f0be134957547421dda11640e8cadfa7c23238fc4e0821ab69efdb1095f3"; + }; + + checkInputs = [ freezegun ]; + + meta = { + description = "A decorator for caching properties in classes"; + homepage = https://github.com/pydanny/cached-property; + license = lib.licenses.bsd3; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ ericsagnes ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 26fe809436cf..8ad57395fdd9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1312,25 +1312,7 @@ in { propagatedBuildInputs = with self; [ boto crcmod psutil ]; }; - cached-property = buildPythonPackage rec { - version = "1.3.0"; - name = "cached-property-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/cached-property/${name}.tar.gz"; - sha256 = "10dwi3s6f154ag9dvqy5jiwp31fs57lbxjcjgn4cwvi8qyqpi3j5"; - }; - - buildInputs = with self; [ freezegun ]; - - meta = { - description = "A decorator for caching properties in classes"; - homepage = https://github.com/pydanny/cached-property; - license = licenses.bsd3; - platforms = platforms.unix; - maintainers = with maintainers; [ ericsagnes ]; - }; - }; + cached-property = callPackage ../development/python-modules/cached-property { }; caffe = pkgs.caffe.override { python = self.python;