python310Packages.dtschema: modernize

This commit is contained in:
Fabian Affolter 2023-03-04 16:48:28 +01:00
parent 78409f3c62
commit 046c0a1447

View file

@ -1,34 +1,42 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, git
, ruamel-yaml
, jsonschema , jsonschema
, pythonOlder
, rfc3987 , rfc3987
, setuptools , ruamel-yaml
, setuptools-scm , setuptools-scm
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "dtschema"; pname = "dtschema";
version = "2022.1"; version = "2022.01";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "devicetree-org";
sha256 = "sha256-G5KzuaMbbkuLK+cNvzBld1UwvExS6ZGVW2e+GXQRFMU="; repo = "dt-schema";
rev = "refs/tags/v${version}";
hash = "sha256-wwlXIM/eO3dII/qQpkAGLT3/15rBLi7ZiNtqYFf7Li4=";
}; };
nativeBuildInputs = [ setuptools-scm git ]; SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [ propagatedBuildInputs = [
setuptools
ruamel-yaml
jsonschema jsonschema
rfc3987 rfc3987
ruamel-yaml
]; ];
# Module has no tests
doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [
"dtschema" "dtschema"
]; ];