Commit 117f82d9 authored by George Huebner's avatar George Huebner Committed by Fabian Affolter
Browse files

uefi-firmware-parser: make available as python package

parent db952ffc
Loading
Loading
Loading
Loading
+1 −38
Original line number Diff line number Diff line
{
  fetchFromGitHub,
  lib,
  nix-update-script,
  python3,
}:

python3.pkgs.buildPythonApplication (finalAttrs: {
  pname = "uefi-firmware-parser";
  version = "1.13";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "theopolis";
    repo = "uefi-firmware-parser";
    rev = "v${finalAttrs.version}";
    hash = "sha256-JPNur7Ipi+Ite9B7lqDm7h7iYUga8D+l18J2knCWZpk=";
  };

  build-system = [
    python3.pkgs.setuptools
    python3.pkgs.wheel
  ];

  pythonRemoveDeps = [ "future" ];

  pythonImportsCheck = [ "uefi_firmware" ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Tool for parsing, extracting, and recreating UEFI firmware volumes";
    homepage = "https://github.com/theopolis/uefi-firmware-parser";
    license = lib.licenses.mit;
    platforms = lib.platforms.unix;
    mainProgram = "uefi-firmware-parser";
  };
})
{ python3Packages }: with python3Packages; toPythonApplication uefi-firmware-parser
+37 −0
Original line number Diff line number Diff line
{
  fetchFromGitHub,
  lib,
  buildPythonPackage,
  setuptools,
  wheel,
}:

buildPythonPackage rec {
  pname = "uefi-firmware-parser";
  version = "1.12";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "theopolis";
    repo = "uefi-firmware-parser";
    tag = "v${version}";
    hash = "sha256-Yiw9idmvSpx4CcVrXHznR8vK/xl7DTL+L7k4Nvql2B8=";
  };

  build-system = [
    setuptools
    wheel
  ];

  pythonRemoveDeps = [ "future" ];

  pythonImportsCheck = [ "uefi_firmware" ];

  meta = {
    description = "Tool for parsing, extracting, and recreating UEFI firmware volumes";
    homepage = "https://github.com/theopolis/uefi-firmware-parser";
    license = lib.licenses.mit;
    platforms = lib.platforms.unix;
    mainProgram = "uefi-firmware-parser";
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -20242,6 +20242,8 @@ self: super: with self; {
    inherit (pkgs) libx11 libxext;
  };
  uefi-firmware-parser = callPackage ../development/python-modules/uefi-firmware-parser { };
  ufal-chu-liu-edmonds = callPackage ../development/python-modules/ufal-chu-liu-edmonds { };
  ufmt = callPackage ../development/python-modules/ufmt { };