From 8bb4ccd1b5f492cdd6b12c3eefc3d83a672df336 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 29 Dec 2019 19:30:23 -0500 Subject: [PATCH] pythonPackages.diskcache: refactor fix broken build --- .../python-modules/diskcache/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index 6aec01ed738..a420fc037bb 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -1,22 +1,36 @@ { lib , buildPythonPackage -, fetchPypi -, tox +, fetchFromGitHub +, pytest +, pytestcov +, pytest_xdist +, pytest-django +, mock }: buildPythonPackage rec { pname = "diskcache"; version = "4.1.0"; - src = fetchPypi { - inherit pname version; - sha256 = "bcee5a59f9c264e2809e58d01be6569a3bbb1e36a1e0fb83f7ef9b2075f95ce0"; + src = fetchFromGitHub { + owner = "grantjenks"; + repo = "python-diskcache"; + rev = "v${version}"; + sha256 = "0xy2vpk4hixb4gg871d9sx9wxdz8pi0pmnfdwg4bf8jqfjg022w8"; }; checkInputs = [ - tox + pytest + pytestcov + pytest_xdist + pytest-django + mock ]; + checkPhase = '' + pytest + ''; + meta = with lib; { description = "Disk and file backed persistent cache"; homepage = "http://www.grantjenks.com/docs/diskcache/";