1ae14203fc
GitOrigin-RevId: 68398d2dd50efc2d878bf0f83bbc8bc323b6b0e0
64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, userpath
|
|
, argcomplete
|
|
, packaging
|
|
, importlib-metadata
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pipx";
|
|
version = "0.16.0.0";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
# no tests in the pypi tarball, so we directly fetch from github
|
|
src = fetchFromGitHub {
|
|
owner = "pipxproject";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "08mn7vm8iw20pg0gfn491y1jx8wcyjijps6f1hy7ipzd5ckynscn";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
userpath
|
|
argcomplete
|
|
packaging
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
importlib-metadata
|
|
];
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
# disable tests, which require internet connection
|
|
pytestFlagsArray = [ "--ignore=tests/test_install_all_packages.py" ];
|
|
disabledTests = [
|
|
"install"
|
|
"inject"
|
|
"ensure_null_pythonpath"
|
|
"missing_interpreter"
|
|
"cache"
|
|
"internet"
|
|
"run"
|
|
"runpip"
|
|
"upgrade"
|
|
"suffix"
|
|
"legacy_venv"
|
|
"determination"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|