depot/third_party/nixpkgs/pkgs/development/tools/misc/whatstyle/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

31 lines
919 B
Nix

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