2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2022-09-30 11:47:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pycodestyle
|
|
|
|
, glibcLocales
|
2022-11-27 09:42:12 +00:00
|
|
|
, tomli
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytestCheckHook
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "autopep8";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "2.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hhatto";
|
|
|
|
repo = "autopep8";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-77ZVprACHUP8BmylTtvHvJMjb70E1YFKKdQDigAZG6s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-pycodestyle-2.10.0.patch";
|
|
|
|
url = "https://github.com/hhatto/autopep8/pull/659.patch";
|
|
|
|
hash = "sha256-ulvQqJ3lUm8/9QZwH+whzrxbz8c11/ntc8zH2zfmXiE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
propagatedBuildInputs = [ pycodestyle tomli ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
checkInputs = [
|
|
|
|
glibcLocales
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool that automatically formats Python code to conform to the PEP 8 style guide";
|
2022-09-30 11:47:45 +00:00
|
|
|
homepage = "https://pypi.org/project/autopep8/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|