Files
nixpkgs/pkgs/development/tools/misc/whatstyle/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

40 lines
952 B
Nix

{
lib,
python3,
fetchFromGitHub,
clang-unwrapped,
}:
python3.pkgs.buildPythonApplication rec {
pname = "whatstyle";
version = "0.2.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "mikr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-4LCZAEUQFPl4CBPeuqsodiAlwd8uBg+SudF5d+Vz4Gc=";
};
# 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 = {
description = "Find a code format style that fits given source files";
mainProgram = "whatstyle";
homepage = "https://github.com/mikr/whatstyle";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.all;
};
}