2020-08-24 07:58:42 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, userpath
|
|
|
|
, argcomplete
|
|
|
|
, packaging
|
2021-01-16 13:52:28 +00:00
|
|
|
, importlib-metadata
|
2021-03-06 14:59:08 +00:00
|
|
|
, colorama
|
2020-08-24 07:58:42 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pipx";
|
2021-05-09 12:02:28 +00:00
|
|
|
version = "0.16.2.1";
|
2020-08-24 07:58:42 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
# no tests in the pypi tarball, so we directly fetch from github
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pipxproject";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-09 12:02:28 +00:00
|
|
|
sha256 = "1agdp8j4lw6z0lk2vv1m8d49r5vwfkpal3hdgq67vnjyp9904pf6";
|
2020-08-24 07:58:42 +00:00
|
|
|
};
|
|
|
|
|
2021-01-16 13:52:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
userpath
|
|
|
|
argcomplete
|
|
|
|
packaging
|
2021-03-06 14:59:08 +00:00
|
|
|
colorama
|
2021-01-16 13:52:28 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2020-08-24 07:58:42 +00:00
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# disable tests, which require internet connection
|
2021-01-16 13:52:28 +00:00
|
|
|
pytestFlagsArray = [ "--ignore=tests/test_install_all_packages.py" ];
|
2020-08-24 07:58:42 +00:00
|
|
|
disabledTests = [
|
|
|
|
"install"
|
|
|
|
"inject"
|
|
|
|
"ensure_null_pythonpath"
|
|
|
|
"missing_interpreter"
|
|
|
|
"cache"
|
|
|
|
"internet"
|
2021-01-16 13:52:28 +00:00
|
|
|
"run"
|
2020-08-24 07:58:42 +00:00
|
|
|
"runpip"
|
|
|
|
"upgrade"
|
2020-10-18 14:11:30 +00:00
|
|
|
"suffix"
|
|
|
|
"legacy_venv"
|
2021-01-16 13:52:28 +00:00
|
|
|
"determination"
|
2021-05-09 12:02:28 +00:00
|
|
|
"json"
|
2020-08-24 07:58:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description =
|
|
|
|
"Install and Run Python Applications in Isolated Environments";
|
|
|
|
homepage = "https://github.com/pipxproject/pipx";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ yevhenshymotiuk ];
|
|
|
|
};
|
|
|
|
}
|