Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 38 lines 929 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 src = fetchFromGitHub { 12 owner = "mikr"; 13 repo = pname; 14 rev = "v${version}"; 15 sha256 = "sha256-4LCZAEUQFPl4CBPeuqsodiAlwd8uBg+SudF5d+Vz4Gc="; 16 }; 17 18 # Fix references to previous version, to avoid confusion: 19 postPatch = '' 20 substituteInPlace setup.py --replace 0.1.6 ${version} 21 substituteInPlace ${pname}.py --replace 0.1.6 ${version} 22 ''; 23 24 nativeCheckInputs = [ 25 clang-unwrapped # clang-format 26 ]; 27 28 doCheck = false; # 3 or 4 failures depending on version, haven't investigated. 29 30 meta = with lib; { 31 description = "Find a code format style that fits given source files"; 32 mainProgram = "whatstyle"; 33 homepage = "https://github.com/mikr/whatstyle"; 34 license = licenses.mit; 35 maintainers = [ ]; 36 platforms = platforms.all; 37 }; 38}