Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / plumbum / default.nix
blobe6ffa43b32935e10dab2b63c53bf225365d876d4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , hatchling
5 , hatch-vcs
6 , openssh
7 , ps
8 , psutil
9 , pytest-mock
10 , pytest-timeout
11 , pytestCheckHook
14 buildPythonPackage rec {
15   pname = "plumbum";
16   version = "1.8.2";
17   format = "pyproject";
19   src = fetchFromGitHub {
20     owner = "tomerfiliba";
21     repo = "plumbum";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-b8JcGRHiZSv/ViyEogpLgGXOMHHSC+cjWT0FqhkolcA=";
24   };
26   postPatch = ''
27     substituteInPlace pyproject.toml \
28       --replace '"--cov-config=setup.cfg", ' ""
29   '';
31   SETUPTOOLS_SCM_PRETEND_VERSION = version;
33   nativeBuildInputs = [
34     hatchling
35     hatch-vcs
36   ];
38   nativeCheckInputs = [
39     openssh
40     ps
41     psutil
42     pytest-mock
43     pytest-timeout
44     pytestCheckHook
45   ];
47   preCheck = ''
48     export HOME=$TMP
49   '';
51   disabledTests = [
52     # broken in nix env
53     "test_change_env"
54     "test_dictlike"
55     "test_local"
56     # incompatible with pytest 7
57     "test_incorrect_login"
58   ];
60   disabledTestPaths = [
61     # incompatible with pytest7
62     # https://github.com/tomerfiliba/plumbum/issues/594
63     "tests/test_remote.py"
64   ];
66   meta = with lib; {
67     changelog = "https://github.com/tomerfiliba/plumbum/releases/tag/v${version}";
68     description = " Plumbum: Shell Combinators ";
69     homepage = " https://github.com/tomerfiliba/plumbum ";
70     license = licenses.mit;
71     maintainers = with maintainers; [ ];
72   };