depot/third_party/nixpkgs/pkgs/development/python-modules/pipx/default.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

{ 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 ];
};
}