depot/third_party/nixpkgs/pkgs/development/tools/refurb/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

63 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "refurb";
version = "1.13.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "dosisod";
repo = "refurb";
rev = "refs/tags/v${version}";
hash = "sha256-e/gKBgbtjO2XYnAIdHDoVJWyP6cyvsuIFLrV/eqjces=";
};
postPatch = ''
# remove --cov* options provided to pytest
sed -i '/^addopts = "--cov/d' pyproject.toml
'';
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = with python3Packages; [
mypy
mypy-extensions
tomli
typing-extensions
];
nativeCheckInputs = with python3Packages; [
attrs
click
colorama
iniconfig
mccabe
packaging
pathspec
platformdirs
pluggy
py
pyparsing
pytestCheckHook
];
disabledTests = [
"test_checks" # broken because new mypy release added new checks
];
pythonImportsCheck = [
"refurb"
];
meta = with lib; {
description = "A tool for refurbishing and modernizing Python codebases";
homepage = "https://github.com/dosisod/refurb";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ knl ];
};
}