depot/third_party/nixpkgs/pkgs/tools/admin/lxd/wrapper.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

60 lines
901 B
Nix

{ lib
, lxd-unwrapped
, makeWrapper
, symlinkJoin
, writeShellScriptBin
, acl
, apparmor-parser
, apparmor-profiles
, attr
, bash
, btrfs-progs
, criu
, dnsmasq
, gnutar
, gzip
, iproute2
, iptables
, rsync
, squashfsTools
, xz
,
}:
let
binPath = lib.makeBinPath [
acl
attr
bash
btrfs-progs
criu
dnsmasq
gnutar
gzip
iproute2
iptables
rsync
squashfsTools
xz
(writeShellScriptBin "apparmor_parser" ''
exec '${apparmor-parser}/bin/apparmor_parser' -I '${apparmor-profiles}/etc/apparmor.d' "$@"
'')
];
in
symlinkJoin {
name = "lxd-${lxd-unwrapped.version}";
paths = [ lxd-unwrapped ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/lxd --prefix PATH : ${lib.escapeShellArg binPath}
'';
passthru = {
inherit (lxd-unwrapped) tests;
};
inherit (lxd-unwrapped) meta pname version;
}