nixpkgs/pkgs/development/python-modules/poetry-core/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

67 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, build
, git
, importlib-metadata
, pep517
, pytest-mock
, pytestCheckHook
, setuptools
, tomlkit
, virtualenv
}:
buildPythonPackage rec {
pname = "poetry-core";
version = "1.4.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-poetry";
repo = pname;
rev = version;
hash = "sha256-SCzs2v0LIgx3vBYTavPqc7uwAQdWsdmkbDyHgIjOxrk=";
};
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
nativeCheckInputs = [
build
git
pep517
pytest-mock
pytestCheckHook
setuptools
tomlkit
virtualenv
];
# Requires git history to work correctly
disabledTests = [
"default_with_excluded_data"
"default_src_with_excluded_data"
];
pythonImportsCheck = [
"poetry.core"
];
# Allow for package to use pep420's native namespaces
pythonNamespaces = [
"poetry"
];
meta = with lib; {
changelog = "https://github.com/python-poetry/poetry-core/blob/${src.rev}/CHANGELOG.md";
description = "Core utilities for Poetry";
homepage = "https://github.com/python-poetry/poetry-core/";
license = licenses.mit;
maintainers = with maintainers; [ jonringer ];
};
}