mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-28 08:49:51 +00:00
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
jsonschema,
|
|
rfc3987,
|
|
ruamel-yaml,
|
|
setuptools-scm,
|
|
libfdt,
|
|
pytestCheckHook,
|
|
dtc,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "dtschema";
|
|
version = "2026.09";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "devicetree-org";
|
|
repo = "dt-schema";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-7GLRG6l05IGS9E2BoOYMYv7vk2hDU5wt0jPiflwhxWc=";
|
|
};
|
|
|
|
build-system = [ setuptools-scm ];
|
|
|
|
# dtc's Meson build installs libfdt without Python distribution metadata.
|
|
# The module is provided by libfdt below, but cannot be detected as pylibfdt.
|
|
pythonRemoveDeps = [ "pylibfdt" ];
|
|
|
|
dependencies = [
|
|
jsonschema
|
|
rfc3987
|
|
ruamel-yaml
|
|
libfdt
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"dtschema"
|
|
"libfdt"
|
|
];
|
|
|
|
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${finalAttrs.version}";
|
|
license =
|
|
with lib.licenses;
|
|
OR [
|
|
bsd2
|
|
gpl2Only
|
|
];
|
|
maintainers = with lib.maintainers; [ sorki ];
|
|
|
|
# Library not loaded: @rpath/libfdt.1.dylib
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
})
|