Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, python3, fetchFromGitHub, clang-unwrapped }:
2
3python3.pkgs.buildPythonApplication rec {
4 pname = "whatstyle";
5 version = "0.1.8";
6 src = fetchFromGitHub {
7 owner = "mikr";
8 repo = pname;
9 rev = "v${version}";
10 sha256 = "08lfd8h5fnvy5gci4f3an411cypad7p2yiahvbmlp51r9xwpaiwr";
11 };
12
13 # Fix references to previous version, to avoid confusion:
14 postPatch = ''
15 substituteInPlace setup.py --replace 0.1.6 ${version}
16 substituteInPlace ${pname}.py --replace 0.1.6 ${version}
17 '';
18
19 nativeCheckInputs = [ clang-unwrapped /* clang-format */ ];
20
21 doCheck = false; # 3 or 4 failures depending on version, haven't investigated.
22
23 meta = with lib; {
24 description = "Find a code format style that fits given source files";
25 homepage = "https://github.com/mikr/whatstyle";
26 license = licenses.mit;
27 maintainers = with maintainers; [ dtzWill ];
28 platforms = platforms.all;
29 };
30}