depot/third_party/nixpkgs/pkgs/development/tools/refurb/default.nix
Default email 0d9fc34957 Project import generated by Copybara.
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
2023-01-20 11:41:00 +01:00

58 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "refurb";
version = "1.10.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "dosisod";
repo = "refurb";
rev = "refs/tags/v${version}";
hash = "sha256-wb9E1BX9gjejZ5nTudzEPP+suX2eG4MPT07651+OY88=";
};
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = with python3Packages; [
mypy
mypy-extensions
tomli
typing-extensions
];
checkInputs = with python3Packages; [
attrs
click
colorama
iniconfig
mccabe
packaging
pathspec
platformdirs
pluggy
py
pyparsing
pytestCheckHook
];
postPatch = ''
sed -i "/^addopts/d" pyproject.toml
'';
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 ];
};
}