nixpkgs/pkgs/by-name/re/refurb/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

62 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "refurb";
version = "2.0.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "dosisod";
repo = "refurb";
rev = "refs/tags/v${version}";
hash = "sha256-6MchaqRKJPmvwiDyhCK4kFyIYl2B+2dGL8H8X2ES+VQ=";
};
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
pytest-cov-stub
pytestCheckHook
];
disabledTests = [
"test_checks" # broken because new mypy release added new checks
"test_mypy_consistence" # broken by new mypy release
];
pythonImportsCheck = [
"refurb"
];
meta = with lib; {
description = "Tool for refurbishing and modernizing Python codebases";
mainProgram = "refurb";
homepage = "https://github.com/dosisod/refurb";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ knl ];
};
}