35 thin-provisioning-tools,
41 binPath = lib.makeBinPath [
64 thin-provisioning-tools
69 (writeShellScriptBin "apparmor_parser" ''
70 exec '${apparmor-parser}/bin/apparmor_parser' -I '${apparmor-profiles}/etc/apparmor.d' "$@"
74 clientBinPath = [ spice-gtk ];
76 ovmf-2mb = OVMF.override {
81 ovmf-4mb = OVMF.override {
86 ovmf-prefix = if stdenv.hostPlatform.isAarch64 then "AAVMF" else "OVMF";
88 # mimic ovmf from https://github.com/canonical/lxd-pkg-snap/blob/3abebe1dfeb20f9b7729556960c7e9fe6ad5e17c/snapcraft.yaml#L378
89 # also found in /snap/lxd/current/share/qemu/ on a snap install
90 ovmf = linkFarm "lxd-ovmf" [
92 name = "OVMF_CODE.2MB.fd";
93 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd";
96 name = "OVMF_CODE.4MB.fd";
97 path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd";
100 name = "OVMF_CODE.fd";
101 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd";
105 name = "OVMF_VARS.2MB.fd";
106 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd";
109 name = "OVMF_VARS.2MB.ms.fd";
110 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd";
113 name = "OVMF_VARS.4MB.fd";
114 path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd";
117 name = "OVMF_VARS.4MB.ms.fd";
118 path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd";
121 name = "OVMF_VARS.fd";
122 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd";
125 name = "OVMF_VARS.ms.fd";
126 path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd";
131 name = "lxd-${lxd-unwrapped-lts.version}";
133 paths = [ lxd-unwrapped-lts ];
135 nativeBuildInputs = [ makeWrapper ];
138 wrapProgram $out/bin/lxd --prefix PATH : ${lib.escapeShellArg binPath}:${qemu_kvm}/libexec:$out/bin --set LXD_OVMF_PATH ${ovmf}
140 wrapProgram $out/bin/lxc --prefix PATH : ${lib.makeBinPath clientBinPath}
144 inherit (lxd-unwrapped-lts) tests;
147 inherit (lxd-unwrapped-lts) meta pname version;