nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 39 lines 967 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 = "whatstyle"; 15 tag = "v${version}"; 16 hash = "sha256-4LCZAEUQFPl4CBPeuqsodiAlwd8uBg+SudF5d+Vz4Gc="; 17 }; 18 19 # Fix references to previous version, to avoid confusion: 20 postPatch = '' 21 substituteInPlace setup.py --replace-fail 0.1.9 ${version} 22 substituteInPlace whatstyle.py --replace-fail 0.1.9 ${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 = { 32 description = "Find a code format style that fits given source files"; 33 mainProgram = "whatstyle"; 34 homepage = "https://github.com/mikr/whatstyle"; 35 license = lib.licenses.mit; 36 maintainers = [ ]; 37 platforms = lib.platforms.all; 38 }; 39}