Merge #247379: dt-schema: handle jsonschema incompatibility

...into staging-next
This commit is contained in:
Vladimír Čunát 2023-08-08 07:12:21 +02:00
commit 3858a9b87a
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
3 changed files with 41 additions and 2 deletions

View file

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, jsonschema
@ -54,6 +55,14 @@ buildPythonPackage rec {
changelog = "https://github.com/devicetree-org/dt-schema/releases/tag/v${version}";
license = with licenses; [ bsd2 /* or */ gpl2Only ];
maintainers = with maintainers; [ sorki ];
broken = (
# Library not loaded: @rpath/libfdt.1.dylib
stdenv.isDarwin ||
# see https://github.com/devicetree-org/dt-schema/issues/108
versionAtLeast jsonschema.version "4.18"
);
};
}

View file

@ -0,0 +1,30 @@
{ lib
, python3
}:
let python = python3.override {
packageOverrides = self: super: {
# see https://github.com/devicetree-org/dt-schema/issues/108
jsonschema = super.jsonschema.overridePythonAttrs (old: rec {
version = "4.17.3";
disabled = self.pythonOlder "3.7";
src = old.src.override {
inherit version;
hash = "sha256-D4ZEN6uLYHa6ZwdFPvj5imoNUSqA6T+KvbZ29zfstg0=";
};
propagatedBuildInputs = with self; ([
attrs
pyrsistent
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
typing-extensions
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
pkgutil-resolve-name
]);
});
};
}; in python.pkgs.toPythonApplication python.pkgs.dtschema

View file

@ -7409,7 +7409,7 @@ with pkgs;
dtc = callPackage ../development/compilers/dtc { };
dt-schema = with python3Packages; toPythonApplication dtschema;
dt-schema = callPackage ../development/tools/dt-schema { };
dub = callPackage ../development/tools/build-managers/dub { };