Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, jsonschema 5, pythonOlder 6, rfc3987 7, ruamel-yaml 8, setuptools-scm 9, libfdt 10}: 11 12buildPythonPackage rec { 13 pname = "dtschema"; 14 version = "2023.04"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "devicetree-org"; 21 repo = "dt-schema"; 22 rev = "refs/tags/v${version}"; 23 sha256 = "sha256-w9TsRdiDTdExft7rdb2hYcvxP6hxOFZKI3hITiNSwgw="; 24 }; 25 26 patches = [ 27 # Change name of pylibfdt to libfdt 28 ./fix_libfdt_name.patch 29 ]; 30 31 SETUPTOOLS_SCM_PRETEND_VERSION = version; 32 33 nativeBuildInputs = [ 34 setuptools-scm 35 ]; 36 37 propagatedBuildInputs = [ 38 jsonschema 39 rfc3987 40 ruamel-yaml 41 libfdt 42 ]; 43 44 # Module has no tests 45 doCheck = false; 46 47 pythonImportsCheck = [ 48 "dtschema" 49 ]; 50 51 meta = with lib; { 52 description = "Tooling for devicetree validation using YAML and jsonschema"; 53 homepage = "https://github.com/devicetree-org/dt-schema/"; 54 changelog = "https://github.com/devicetree-org/dt-schema/releases/tag/v${version}"; 55 license = with licenses; [ bsd2 /* or */ gpl2Only ]; 56 maintainers = with maintainers; [ sorki ]; 57 }; 58} 59