2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jsonschema,
|
|
|
|
pythonOlder,
|
|
|
|
rfc3987,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools-scm,
|
|
|
|
libfdt,
|
2023-03-08 16:32:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dtschema";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2024.02";
|
|
|
|
format = "pyproject";
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "devicetree-org";
|
|
|
|
repo = "dt-schema";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-UJU8b9BzuuUSHRjnA6hOd1bMPNOlk4LNtrQV5aZmGhI=";
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
patches = [
|
|
|
|
# Change name of pylibfdt to libfdt
|
|
|
|
./fix_libfdt_name.patch
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonschema
|
|
|
|
rfc3987
|
|
|
|
ruamel-yaml
|
2023-03-30 22:05:00 +00:00
|
|
|
libfdt
|
2023-03-08 16:32:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Module has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "dtschema" ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
bsd2 # or
|
|
|
|
gpl2Only
|
|
|
|
];
|
2023-03-08 16:32:21 +00:00
|
|
|
maintainers = with maintainers; [ sorki ];
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
broken = (
|
|
|
|
# Library not loaded: @rpath/libfdt.1.dylib
|
2024-06-05 15:53:02 +00:00
|
|
|
stdenv.isDarwin
|
|
|
|
||
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# see https://github.com/devicetree-org/dt-schema/issues/108
|
|
|
|
versionAtLeast jsonschema.version "4.18"
|
2023-08-10 07:59:29 +00:00
|
|
|
);
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
}
|