1{
2 lib,
3 pkgs,
4 stdenv,
5 buildPythonPackage,
6 fetchPypi,
7 setuptools,
8 cryptography,
9 pytestCheckHook,
10 pefile,
11}:
12
13buildPythonPackage rec {
14 pname = "virt-firmware";
15 version = "24.4";
16 pyproject = true;
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-rqhaKDOQEOj6bcRz3qZJ+a4yG1qTC9SUjuxMhZlnmwU=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 setuptools
27 cryptography
28 pefile
29 ];
30
31 # tests require systemd-detect-virt
32 doCheck = lib.meta.availableOn stdenv.hostPlatform pkgs.systemd;
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pkgs.systemd
37 ];
38
39 pytestFlagsArray = [ "tests/tests.py" ];
40
41 pythonImportsCheck = [ "virt.firmware.efi" ];
42
43 meta = with lib; {
44 description = "Tools for virtual machine firmware volumes";
45 homepage = "https://gitlab.com/kraxel/virt-firmware";
46 license = licenses.gpl2;
47 maintainers = with maintainers; [
48 lheckemann
49 raitobezarius
50 ];
51 };
52}