whatstyle: switch to finalAttrs and python3Packages

This commit is contained in:
Guy Chronister
2026-05-06 16:46:47 -05:00
committed by Weijia Wang
parent 3baa9cf69d
commit 3626582a48

View File

@@ -1,6 +1,6 @@
{
lib,
python3,
python3Packages,
fetchFromGitHub,
llvmPackages,
}:
@@ -9,21 +9,21 @@ let
inherit (llvmPackages) clang-unwrapped;
in
python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonApplication (finalAttrs: {
pname = "whatstyle";
version = "0.2.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "mikr";
repo = "whatstyle";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-4LCZAEUQFPl4CBPeuqsodiAlwd8uBg+SudF5d+Vz4Gc=";
};
# Fix references to previous version, to avoid confusion:
postPatch = ''
substituteInPlace setup.py --replace-fail 0.1.9 ${version}
substituteInPlace whatstyle.py --replace-fail 0.1.9 ${version}
substituteInPlace setup.py --replace-fail 0.1.9 ${finalAttrs.version}
substituteInPlace whatstyle.py --replace-fail 0.1.9 ${finalAttrs.version}
'';
nativeCheckInputs = [
@@ -40,4 +40,4 @@ python3.pkgs.buildPythonApplication rec {
maintainers = [ ];
platforms = lib.platforms.all;
};
}
})