Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / returns / default.nix
blob2e0275bd804086b8c3bb763d21addbe661e4b2af
1 { lib
2 , anyio
3 , buildPythonPackage
4 , curio
5 , fetchFromGitHub
6 , httpx
7 , hypothesis
8 , poetry-core
9 , pytest-aio
10 , pytest-subtests
11 , pytestCheckHook
12 , pythonOlder
13 , setuptools
14 , trio
15 , typing-extensions
18 buildPythonPackage rec {
19   pname = "returns";
20   version = "0.22.0";
21   format = "pyproject";
23   disabled = pythonOlder "3.7";
25   src = fetchFromGitHub {
26     owner = "dry-python";
27     repo = "returns";
28     rev = "refs/tags/${version}";
29     hash = "sha256-0eFirhBsj8SWfoAPWEMuFa+EvBgHKpNeKVj3qJ4L6hE=";
30   };
32   postPatch = ''
33     sed -i setup.cfg \
34       -e '/--cov.*/d' \
35       -e '/--mypy.*/d'
36   '';
38   nativeBuildInputs = [
39     poetry-core
40   ];
42   propagatedBuildInputs = [
43     typing-extensions
44   ];
46   nativeCheckInputs = [
47     anyio
48     curio
49     httpx
50     hypothesis
51     pytestCheckHook
52     pytest-aio
53     pytest-subtests
54     setuptools
55     trio
56   ];
58   preCheck = ''
59     rm -rf returns/contrib/mypy
60   '';
62   pythonImportsCheck = [
63     "returns"
64   ];
66   pytestFlagsArray = [
67     "--ignore=typesafety"
68   ];
70   meta = with lib; {
71     description = "Make your functions return something meaningful, typed, and safe!";
72     homepage = "https://github.com/dry-python/returns";
73     changelog = "https://github.com/dry-python/returns/blob/${version}/CHANGELOG.md";
74     license = licenses.bsd2;
75     maintainers = with maintainers; [ jessemoore ];
76   };