Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / expiringdict / default.nix
blobe4e6dd8b7824da26dc23e5d48d481011a803e937
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , dill
5 , coverage
6 , coveralls
7 , mock
8 , nose
9 }:
11 buildPythonPackage rec {
12   pname = "expiringdict";
13   version = "1.2.2";
14   format = "setuptools";
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   };
25   nativeCheckInputs = [
26     dill
27     coverage
28     coveralls
29     mock
30     nose
31   ];
33   checkPhase = ''
34     runHook preCheck
35     nosetests -v --with-coverage --cover-package=expiringdict
36     runHook postCheck
37   '';
39   pythonImportsCheck = [
40     "expiringdict"
41   ];
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   };