nixpkgs/pkgs/development/tools/refurb/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-28 10:10:20 +00:00
{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "refurb";
2023-02-25 03:31:12 +00:00
version = "1.13.0";
2022-09-28 10:10:20 +00:00
format = "pyproject";
src = fetchFromGitHub {
owner = "dosisod";
repo = "refurb";
2022-12-06 18:01:21 +00:00
rev = "refs/tags/v${version}";
2023-02-25 03:31:12 +00:00
hash = "sha256-e/gKBgbtjO2XYnAIdHDoVJWyP6cyvsuIFLrV/eqjces=";
2022-09-28 10:10:20 +00:00
};
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = with python3Packages; [
mypy
mypy-extensions
tomli
typing-extensions
];
nativeCheckInputs = with python3Packages; [
2022-09-28 10:10:20 +00:00
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 ];
};
}