python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / ig / igvm-tooling / package.nix
blob557bcee8aa0d954a2cedeeeb05e139bce8bc16dd
2   lib,
3   python3,
4   fetchFromGitHub,
5   fetchpatch,
6   which,
7   acpica-tools,
8   nix-update-script,
9 }:
11 python3.pkgs.buildPythonApplication rec {
12   pname = "igvm-tooling";
13   version = "1.5.0-unstable-2024-06-06";
14   pyproject = true;
16   src = fetchFromGitHub {
17     owner = "microsoft";
18     repo = "igvm-tooling";
19     rev = "53656ddde294bbafcae6349b5acfc5da9f7dbb92";
20     hash = "sha256-X9Gi+kTmc/ZcsgbHldEj9zPnOmd5puDD7/+J1s1CVws=";
21   };
23   patches = [
24     # drop unused libclang dependency
25     # remove once https://github.com/microsoft/igvm-tooling/pull/53 is merged
26     (fetchpatch {
27       name = "0001-setup.py-remove-unused-libclang-dependency.patch";
28       url = "https://github.com/microsoft/igvm-tooling/commit/7182e925de9b5e9f5c8c3a3ce6e3942a92506064.patch";
29       hash = "sha256-tcVxcuLxknyEdo2YjeHOqSG9xQna8US+YyvlcfX+Htw=";
30       stripLen = 1;
31     })
32   ];
34   postPatch = ''
35     substituteInPlace igvm/acpi.py \
36       --replace-fail 'os.path.join(os.path.dirname(__file__), "acpi", "acpi.zip")' "\"$out/share/igvm-tooling/acpi/acpi.zip\""
37   '';
39   sourceRoot = "${src.name}/src";
41   nativeBuildInputs = [ acpica-tools ];
43   propagatedBuildInputs =
44     (with python3.pkgs; [
45       setuptools
46       ecdsa
47       cstruct
48       pyelftools
49       pytest
50       cached-property
51       frozendict
52     ])
53     ++ [
54       acpica-tools
55       which
56     ];
58   postInstall = ''
59     mkdir -p $out/share/igvm-tooling/acpi/acpi-clh
60     cp -rT igvm/acpi/acpi-clh $out/share/igvm-tooling/acpi/acpi-clh
61     cp igvm/acpi/acpi.zip $out/share/igvm-tooling/acpi/acpi.zip
62     find $out/share/igvm-tooling/acpi -name "*.dsl" -exec iasl -f {} \;
63   '';
65   passthru.updateScript = nix-update-script { };
67   meta = {
68     description = "IGVM Image Generator";
69     homepage = "https://github.com/microsoft/igvm-tooling";
70     license = lib.licenses.mit;
71     maintainers = with lib.maintainers; [
72       malt3
73       katexochen
74     ];
75     changelog = "https://github.com/microsoft/igvm-tooling/releases/tag/igvm-${version}";
76     mainProgram = "igvmgen";
77     platforms = lib.platforms.all;
78   };