Unverified Commit f5355b93 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #196056 from SuperSandro2000/codespell

parents a8cc292e 07a08a08
Loading
Loading
Loading
Loading
+22 −4
Original line number Diff line number Diff line
{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-dependency, aspell-python, aspellDicts, chardet }:
{ lib
, aspell-python
, aspellDicts
, buildPythonApplication
, chardet
, fetchFromGitHub
, pytestCheckHook
, pytest-dependency
, setuptools-scm
}:

buildPythonApplication rec {
  pname = "codespell";
  version = "2.2.1";
  version = "2.2.2";

  src = fetchFromGitHub {
    owner = "codespell-project";
    repo = "codespell";
    rev = "v${version}";
    sha256 = "sha256-H/istsEt6kYzwvwy8GlOH0fkMTWbEdXVF1P1qO6sITs=";
    sha256 = "sha256-zXHqaZzGIS7BOFc/kPzA4sgpoEmXuaKHdOcKpMWWeOI=";
  };

  postPatch = ''
@@ -17,7 +26,16 @@ buildPythonApplication rec {
      --replace "--cov-report=" ""
  '';

  checkInputs = [ aspell-python chardet pytestCheckHook pytest-dependency ];
  nativeBuildInputs = [ setuptools-scm ];

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  checkInputs = [
    aspell-python
    chardet
    pytestCheckHook
    pytest-dependency
  ];

  preCheck = ''
    export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"