571c71e6f7
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.
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, aspellDicts
|
|
, python3
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "codespell";
|
|
version = "2.3.0";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "codespell-project";
|
|
repo = "codespell";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-X3Pueu0E7Q57sbKSXqCZki4/PUb1WyWk/Zmj+lhVTM8=";
|
|
};
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
setuptools-scm
|
|
];
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
aspell-python
|
|
chardet
|
|
pytestCheckHook
|
|
pytest-cov-stub
|
|
pytest-dependency
|
|
];
|
|
|
|
preCheck = ''
|
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
|
'';
|
|
|
|
disabledTests = [
|
|
# tries to run not fully installed script
|
|
"test_basic"
|
|
];
|
|
|
|
pythonImportsCheck = [ "codespell_lib" ];
|
|
|
|
meta = with lib; {
|
|
description = "Fix common misspellings in source code";
|
|
mainProgram = "codespell";
|
|
homepage = "https://github.com/codespell-project/codespell";
|
|
license = with licenses; [ gpl2Only cc-by-sa-30 ];
|
|
maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ];
|
|
};
|
|
}
|