1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, pytest-cov 7, pytest-xdist 8, pytest-django 9, mock 10}: 11 12buildPythonPackage rec { 13 pname = "diskcache"; 14 version = "5.2.1"; 15 16 src = fetchFromGitHub { 17 owner = "grantjenks"; 18 repo = "python-diskcache"; 19 rev = "v${version}"; 20 sha256 = "sha256-dWtEyyWpg0rxEwyhBdPyApzgS9o60HVGbtY76ELHvX8="; 21 }; 22 23 checkInputs = [ 24 pytestCheckHook 25 pytest-cov 26 pytest-xdist 27 pytest-django 28 mock 29 ]; 30 31 # Darwin sandbox causes most tests to fail. 32 doCheck = !stdenv.isDarwin; 33 pythonImportsCheck = [ "diskcache" ]; 34 35 disabledTests = [ 36 # very time sensitive, can fail on over subscribed machines 37 "test_incr_update_keyerror" 38 ]; 39 40 pytestFlagsArray = [ 41 "-n $NIX_BUILD_CORES" 42 ]; 43 44 meta = with lib; { 45 description = "Disk and file backed persistent cache"; 46 homepage = "http://www.grantjenks.com/docs/diskcache/"; 47 license = licenses.asl20; 48 maintainers = [ maintainers.costrouc ]; 49 }; 50}