1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, dill 5, coverage 6, coveralls 7, mock 8, nose 9}: 10 11buildPythonPackage rec { 12 pname = "expiringdict"; 13 version = "1.2.2"; 14 format = "setuptools"; 15 16 # use fetchFromGitHub instead of fetchPypi because the test suite of 17 # the package is not included into the PyPI tarball 18 src = fetchFromGitHub { 19 owner = "mailgun"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I="; 23 }; 24 25 nativeCheckInputs = [ 26 dill 27 coverage 28 coveralls 29 mock 30 nose 31 ]; 32 33 checkPhase = '' 34 runHook preCheck 35 nosetests -v --with-coverage --cover-package=expiringdict 36 runHook postCheck 37 ''; 38 39 pythonImportsCheck = [ 40 "expiringdict" 41 ]; 42 43 meta = with lib; { 44 description = "Dictionary with auto-expiring values for caching purposes"; 45 homepage = "https://github.com/mailgun/expiringdict"; 46 license = licenses.asl20; 47 maintainers = with maintainers; [ gravndal ]; 48 }; 49}