20 pname = "lxd-unwrapped-lts";
21 # major/minor are used in updateScript to pin to LTS
24 src = fetchFromGitHub {
27 rev = "refs/tags/lxd-${version}";
28 hash = "sha256-3C5pLvO7oABWFhFiWtBr5ohFFWm20Gg36WBfVVJgKdc=";
31 vendorHash = "sha256-W7+Z2o5cw3u0DbTZA+a3pRXt9zRggUUjFTUTtQ7B22A=";
34 substituteInPlace shared/usbid/load.go \
35 --replace "/usr/share/misc/usb.ids" "${hwdata}/share/hwdata/usb.ids"
63 tags = [ "libsqlite3" ];
66 # required for go-dqlite. See: https://github.com/canonical/lxd/pull/8939
67 export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
70 # build static binaries: https://github.com/canonical/lxd/blob/6fd175c45e65cd475d198db69d6528e489733e19/Makefile#L43-L51
72 make lxd-agent lxd-migrate
79 "TestConvertNetworkConfig"
80 "TestConvertStorageConfig"
82 "TestContainerTestSuite"
85 [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
88 installShellCompletion --bash --name lxd ./scripts/bash/lxd-client
92 tests.lxd = nixosTests.lxd;
93 tests.lxd-to-incus = nixosTests.incus.lxd-to-incus;
95 updateScript = nix-update-script {
104 description = "Daemon based on liblxc offering a REST API to manage containers";
105 homepage = "https://ubuntu.com/lxd";
106 changelog = "https://github.com/canonical/lxd/releases/tag/lxd-${version}";
107 license = with licenses; [
112 platforms = platforms.linux;