2021-02-05 17:12:51 +00:00
|
|
|
{ lib, python3, fetchFromGitHub, clang-unwrapped }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "whatstyle";
|
|
|
|
version = "0.1.8";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mikr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "08lfd8h5fnvy5gci4f3an411cypad7p2yiahvbmlp51r9xwpaiwr";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Fix references to previous version, to avoid confusion:
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace 0.1.6 ${version}
|
|
|
|
substituteInPlace ${pname}.py --replace 0.1.6 ${version}
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ clang-unwrapped /* clang-format */ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false; # 3 or 4 failures depending on version, haven't investigated.
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Find a code format style that fits given source files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "whatstyle";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mikr/whatstyle";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|