{,python313Packages.}dtschema: 2025.08 -> 2025.12, modernize, enable tests (#481221)
This commit is contained in:
@@ -1,26 +1,5 @@
|
||||
{
|
||||
python3,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
self = python;
|
||||
packageOverrides = self: super: {
|
||||
# see https://github.com/devicetree-org/dt-schema/issues/108
|
||||
jsonschema = super.jsonschema.overridePythonAttrs (old: rec {
|
||||
version = "4.17.3";
|
||||
|
||||
src = old.src.override {
|
||||
inherit version;
|
||||
hash = "sha256-D4ZEN6uLYHa6ZwdFPvj5imoNUSqA6T+KvbZ29zfstg0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [
|
||||
attrs
|
||||
pyrsistent
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
python.pkgs.toPythonApplication python.pkgs.dtschema
|
||||
python3Packages.toPythonApplication python3Packages.dtschema
|
||||
|
||||
@@ -8,51 +8,51 @@
|
||||
ruamel-yaml,
|
||||
setuptools-scm,
|
||||
libfdt,
|
||||
pytestCheckHook,
|
||||
dtc,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "dtschema";
|
||||
version = "2025.08";
|
||||
version = "2025.12";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "devicetree-org";
|
||||
repo = "dt-schema";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-SW2WAVB7ZSgKRjIyFdMqe8tRIuM97ZVBg4d0BJC6SBI=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-DCkZDI0/W/4IkMzaa769vKJxlSMWoEsLIdlyChYd+Mk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
jsonschema
|
||||
rfc3987
|
||||
ruamel-yaml
|
||||
libfdt
|
||||
];
|
||||
|
||||
# Module has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "dtschema" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
dtc
|
||||
];
|
||||
|
||||
enabledTestPaths = [ "test/test-dt-validate.py" ];
|
||||
|
||||
meta = {
|
||||
description = "Tooling for devicetree validation using YAML and jsonschema";
|
||||
homepage = "https://github.com/devicetree-org/dt-schema/";
|
||||
changelog = "https://github.com/devicetree-org/dt-schema/releases/tag/v${version}";
|
||||
changelog = "https://github.com/devicetree-org/dt-schema/releases/tag/v${finalAttrs.version}";
|
||||
license = with lib.licenses; [
|
||||
bsd2 # or
|
||||
gpl2Only
|
||||
];
|
||||
maintainers = with lib.maintainers; [ sorki ];
|
||||
|
||||
broken = (
|
||||
# Library not loaded: @rpath/libfdt.1.dylib
|
||||
stdenv.hostPlatform.isDarwin
|
||||
||
|
||||
|
||||
# see https://github.com/devicetree-org/dt-schema/issues/108
|
||||
lib.versionAtLeast jsonschema.version "4.18"
|
||||
);
|
||||
# Library not loaded: @rpath/libfdt.1.dylib
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user