2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cached-property,
|
|
|
|
click,
|
|
|
|
fetchFromGitHub,
|
|
|
|
packaging,
|
|
|
|
pytest-timeout,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-01-19 23:45:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pythonfinder";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.1.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sarugaku";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "pythonfinder";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-CbaKXD7Sde8euRqvc/IHoXoSMF+dNd7vT9LkLWq4/IU=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
2023-10-09 19:29:22 +00:00
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ packaging ] ++ lib.optionals (pythonOlder "3.8") [ cached-property ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
cli = [ click ];
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-19 23:45:15 +00:00
|
|
|
pytest-timeout
|
2023-10-09 19:29:22 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pythonfinder" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "Cross platform search tool for finding Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pyfinder";
|
2022-01-19 23:45:15 +00:00
|
|
|
homepage = "https://github.com/sarugaku/pythonfinder";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/sarugaku/pythonfinder/blob/v${version}/CHANGELOG.rst";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|