mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
whatstyle: switch to finalAttrs and python3Packages
This commit is contained in:
committed by
Weijia Wang
parent
3baa9cf69d
commit
3626582a48
@@ -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;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user