1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, setuptools
6, setuptools-scm
7, pythonRelaxDepsHook
8, pyasn1
9, pyasn1-modules
10, cryptography
11, joblib
12, gitpython
13, pytestCheckHook
14}:
15
16buildPythonPackage rec {
17 pname = "edk2-pytool-library";
18 version = "0.19.5";
19 pyproject = true;
20
21 disabled = pythonOlder "3.10";
22
23 src = fetchFromGitHub {
24 owner = "tianocore";
25 repo = "edk2-pytool-library";
26 rev = "v${version}";
27 hash = "sha256-Gxza9bVLVVHejKNI9CQZQxfJuT71LBsxDQ8e4xAozS0=";
28 };
29
30 nativeBuildInputs = [
31 setuptools
32 setuptools-scm
33 pythonRelaxDepsHook
34 ];
35
36 pythonRelaxDeps = [
37 "tinydb"
38 "joblib"
39 ];
40
41 propagatedBuildInputs = [
42 pyasn1
43 pyasn1-modules
44 cryptography
45 joblib
46 gitpython
47 ];
48
49 nativeCheckInputs = [
50 pytestCheckHook
51 ];
52
53 disabledTests = [
54 # requires network access
55 "test_basic_parse"
56 ];
57
58 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
59
60 pythonImportsCheck = [ "edk2toollib" ];
61
62 meta = with lib; {
63 description = "Python library package that supports UEFI development";
64 homepage = "https://github.com/tianocore/edk2-pytool-library";
65 changelog = "https://github.com/tianocore/edk2-pytool-library/releases/tag/v${version}";
66 license = licenses.bsd2Patent;
67 maintainers = with maintainers; [ nickcao ];
68 platforms = platforms.linux;
69 };
70}