lol

dt-schema, python3.pkgs.dtschema: handle jsonschema incompatibility

1. dt-schema is an application, so it can pin jsonschema to 4.17
2. mark python3.pkgs.dtschema broken with jsonschema > 4.17
3. mark python3.pkgs.dtschema broken on darwin

+41 -2
+10 -1
pkgs/development/python-modules/dtschema/default.nix
··· 1 - { lib 1 + { stdenv 2 + , lib 2 3 , buildPythonPackage 3 4 , fetchFromGitHub 4 5 , jsonschema ··· 54 55 changelog = "https://github.com/devicetree-org/dt-schema/releases/tag/v${version}"; 55 56 license = with licenses; [ bsd2 /* or */ gpl2Only ]; 56 57 maintainers = with maintainers; [ sorki ]; 58 + 59 + broken = ( 60 + # Library not loaded: @rpath/libfdt.1.dylib 61 + stdenv.isDarwin || 62 + 63 + # see https://github.com/devicetree-org/dt-schema/issues/108 64 + versionAtLeast jsonschema.version "4.18" 65 + ); 57 66 }; 58 67 } 59 68
+30
pkgs/development/tools/dt-schema/default.nix
··· 1 + { lib 2 + , python3 3 + }: 4 + 5 + let python = python3.override { 6 + packageOverrides = self: super: { 7 + # see https://github.com/devicetree-org/dt-schema/issues/108 8 + jsonschema = super.jsonschema.overridePythonAttrs (old: rec { 9 + version = "4.17.3"; 10 + disabled = self.pythonOlder "3.7"; 11 + 12 + src = old.src.override { 13 + inherit version; 14 + hash = "sha256-D4ZEN6uLYHa6ZwdFPvj5imoNUSqA6T+KvbZ29zfstg0="; 15 + }; 16 + 17 + propagatedBuildInputs = with self; ([ 18 + attrs 19 + pyrsistent 20 + ] ++ lib.optionals (pythonOlder "3.8") [ 21 + importlib-metadata 22 + typing-extensions 23 + ] ++ lib.optionals (pythonOlder "3.9") [ 24 + importlib-resources 25 + pkgutil-resolve-name 26 + ]); 27 + }); 28 + }; 29 + }; in python.pkgs.toPythonApplication python.pkgs.dtschema 30 +
+1 -1
pkgs/top-level/all-packages.nix
··· 7396 7396 7397 7397 dtc = callPackage ../development/compilers/dtc { }; 7398 7398 7399 - dt-schema = with python3Packages; toPythonApplication dtschema; 7399 + dt-schema = callPackage ../development/tools/dt-schema { }; 7400 7400 7401 7401 dub = callPackage ../development/tools/build-managers/dub { }; 7402 7402