jsondiff override not needed for versions >2.0.0

This commit is contained in:
Derek Kulinski 2023-06-27 13:52:24 -07:00
parent 4f91d45e39
commit e54901d3a6

View file

@ -988,14 +988,21 @@ lib.composeManyExtensions [
];
});
jsondiff = super.jsondiff.overridePythonAttrs (
old: {
preBuild = (old.preBuild or "") + ''
substituteInPlace setup.py \
--replace "'jsondiff=jsondiff.cli:main_deprecated'," ""
'';
}
);
jsondiff =
if lib.versionOlder "2.0.0"
then
super.jsondiff.overridePythonAttrs
(
old: {
preBuild = lib.optionalString (!(old.src.isWheel or false)) (
(old.preBuild or "") + ''
substituteInPlace setup.py \
--replace "'jsondiff=jsondiff.cli:main_deprecated'," ""
''
);
}
)
else super.jsondiff;
jsonslicer = super.jsonslicer.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig ];