at master 39 lines 954 B view raw
1{ 2 lib, 3 python3, 4 fetchFromGitHub, 5 clang-unwrapped, 6}: 7 8python3.pkgs.buildPythonApplication rec { 9 pname = "whatstyle"; 10 version = "0.2.0"; 11 format = "setuptools"; 12 src = fetchFromGitHub { 13 owner = "mikr"; 14 repo = pname; 15 rev = "v${version}"; 16 sha256 = "sha256-4LCZAEUQFPl4CBPeuqsodiAlwd8uBg+SudF5d+Vz4Gc="; 17 }; 18 19 # Fix references to previous version, to avoid confusion: 20 postPatch = '' 21 substituteInPlace setup.py --replace 0.1.6 ${version} 22 substituteInPlace ${pname}.py --replace 0.1.6 ${version} 23 ''; 24 25 nativeCheckInputs = [ 26 clang-unwrapped # clang-format 27 ]; 28 29 doCheck = false; # 3 or 4 failures depending on version, haven't investigated. 30 31 meta = with lib; { 32 description = "Find a code format style that fits given source files"; 33 mainProgram = "whatstyle"; 34 homepage = "https://github.com/mikr/whatstyle"; 35 license = licenses.mit; 36 maintainers = [ ]; 37 platforms = platforms.all; 38 }; 39}