diff --git a/pkgs/tools/admin/lxd/default.nix b/pkgs/tools/admin/lxd/default.nix index 88a7c7fb6993..5b06b6e868fc 100644 --- a/pkgs/tools/admin/lxd/default.nix +++ b/pkgs/tools/admin/lxd/default.nix @@ -32,7 +32,7 @@ buildGoModule rec { --replace "/usr/share/misc/usb.ids" "${hwdata}/share/hwdata/usb.ids" ''; - excludedPackages = [ "test" "lxd/db/generate" ]; + excludedPackages = [ "test" "lxd/db/generate" "lxd-agent" "lxd-migrate" ]; nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ @@ -53,6 +53,11 @@ buildGoModule rec { export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" ''; + # build static binaries: https://github.com/canonical/lxd/blob/6fd175c45e65cd475d198db69d6528e489733e19/Makefile#L43-L51 + postBuild = '' + make lxd-agent lxd-migrate + ''; + preCheck = let skippedTests = [ "TestValidateConfig"