2019-05-16 20:26:48 +01:00
|
|
|
{ stdenv, python3, fetchFromGitHub, clang-unwrapped }:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "whatstyle";
|
2020-03-31 05:42:13 +01:00
|
|
|
version = "0.1.8";
|
2019-05-16 20:26:48 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mikr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-03-31 05:42:13 +01:00
|
|
|
sha256 = "08lfd8h5fnvy5gci4f3an411cypad7p2yiahvbmlp51r9xwpaiwr";
|
2019-05-16 20:26:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ clang-unwrapped /* clang-format */ ];
|
|
|
|
|
|
|
|
doCheck = false; # 3 or 4 failures depending on version, haven't investigated.
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Find a code format style that fits given source files";
|
2020-03-31 05:42:13 +01:00
|
|
|
homepage = "https://github.com/mikr/whatstyle";
|
2019-05-16 20:26:48 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|