2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, hatchling
|
|
|
|
, hatch-vcs
|
2022-02-10 20:34:41 +00:00
|
|
|
, openssh
|
|
|
|
, ps
|
|
|
|
, psutil
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plumbum";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.8.1";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomerfiliba";
|
|
|
|
repo = "plumbum";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-5nRI9y2Y7itkqDdLRSX4qWfh96WmhqdP1Eo7HLoRHaQ=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-01-20 10:41:00 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"--cov-config=setup.cfg", ' ""
|
2022-02-10 20:34:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
openssh
|
|
|
|
ps
|
|
|
|
psutil
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMP
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# broken in nix env
|
|
|
|
"test_change_env"
|
|
|
|
"test_dictlike"
|
|
|
|
"test_local"
|
2022-04-15 01:41:22 +00:00
|
|
|
# incompatible with pytest 7
|
|
|
|
"test_incorrect_login"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# incompatible with pytest7
|
|
|
|
# https://github.com/tomerfiliba/plumbum/issues/594
|
|
|
|
"tests/test_remote.py"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/tomerfiliba/plumbum/releases/tag/v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
description = " Plumbum: Shell Combinators ";
|
|
|
|
homepage = " https://github.com/tomerfiliba/plumbum ";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
}
|