diff --git a/pkgs/development/python-modules/codespell/default.nix b/pkgs/development/python-modules/codespell/default.nix new file mode 100644 index 000000000000..dfd0be09fab4 --- /dev/null +++ b/pkgs/development/python-modules/codespell/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonApplication, fetchPypi, pytest, chardet }: +buildPythonApplication rec { + pname = "codespell"; + version = "1.15.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0c211rzfgmwls8ab8fj21xp9bhxk6ys3xw8w7chp4arjlifc26wg"; + }; + + checkInputs = [ pytest chardet ]; + checkPhase = '' + # We don't want to be affected by the presence of these + rm -r codespell_lib setup.cfg + # test_command assumes too much about the execution environment + pytest --pyargs codespell_lib.tests -k "not test_command" + ''; + + meta = { + description = "Fix common misspellings in source code"; + homepage = "https://github.com/codespell-project/codespell"; + license = with lib.licenses; [ gpl2 cc-by-sa-30 ]; + maintainers = with lib.maintainers; [ johnazoidberg ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f97ed6ec56bd..31b0622d656f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -747,6 +747,8 @@ in chkcrontab = callPackage ../tools/admin/chkcrontab { }; + codespell = with python3Packages; toPythonApplication codespell; + cozy = callPackage ../applications/audio/cozy-audiobooks { }; ctrtool = callPackage ../tools/archivers/ctrtool { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d782de82e4d6..e8b95115d683 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -476,6 +476,8 @@ in { cozy = callPackage ../development/python-modules/cozy { }; + codespell = callPackage ../development/python-modules/codespell { }; + curio = callPackage ../development/python-modules/curio { }; dendropy = callPackage ../development/python-modules/dendropy { };