My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/typer/default.nix

61 lines
1.1 KiB

{ lib
, stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, flit-core
, click
, pytestCheckHook
, shellingham
, pytest-xdist
, pytest-sugar
, coverage
, pythonOlder
}:
buildPythonPackage rec {
pname = "typer";
version = "0.4.1";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Vkau8Nk2ssdhoQOT8DhO5rXH/guz5c1xCxcTTKHZnP8=";
};
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = [
click
];
checkInputs = [
pytestCheckHook
pytest-xdist
pytest-sugar
shellingham
coverage # execs coverage in tests
];
preCheck = ''
export HOME=$(mktemp -d);
'';
disabledTests = lib.optionals stdenv.isDarwin [
# likely related to https://github.com/sarugaku/shellingham/issues/35
"test_show_completion"
"test_install_completion"
];
pythonImportsCheck = [ "typer" ];
meta = with lib; {
description = "Python library for building CLI applications";
homepage = "https://typer.tiangolo.com/";
license = licenses.mit;
maintainers = with maintainers; [ winpat ];
};
}