{ lib, pkgs, stdenv, buildPythonPackage, fetchFromGitLab, setuptools, cryptography, pytestCheckHook, pefile, }: buildPythonPackage rec { pname = "virt-firmware"; version = "24.7"; pyproject = true; src = fetchFromGitLab { owner = "kraxel"; repo = "virt-firmware"; rev = "refs/tags/v${version}"; hash = "sha256-uVLq4vbnvK1RCA3tpLgwKb/qzysLsOo3p/6gQ2Prmu0="; }; build-system = [ setuptools ]; dependencies = [ setuptools cryptography pefile ]; # tests require systemd-detect-virt doCheck = lib.meta.availableOn stdenv.hostPlatform pkgs.systemd; nativeCheckInputs = [ pytestCheckHook pkgs.systemd ]; pytestFlagsArray = [ "tests/tests.py" ]; pythonImportsCheck = [ "virt.firmware.efi" ]; meta = with lib; { description = "Tools for virtual machine firmware volumes"; homepage = "https://gitlab.com/kraxel/virt-firmware"; license = licenses.gpl2; maintainers = with maintainers; [ raitobezarius ]; }; }