2024-01-02 11:29:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2024-05-15 15:35:15 +00:00
|
|
|
dbus,
|
2024-01-02 11:29:13 +00:00
|
|
|
docbook2x,
|
|
|
|
libapparmor,
|
|
|
|
libcap,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
nixosTests,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
systemd,
|
2024-05-15 15:35:15 +00:00
|
|
|
nix-update-script,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lxc";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "6.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "lxc";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${finalAttrs.version}";
|
|
|
|
hash = "sha256-D994gekFgW/1Q4iVFM/3Zi0JXKn9Ghfd3UcjckVfoFY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
docbook2x
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
dbus
|
2024-01-02 11:29:13 +00:00
|
|
|
libapparmor
|
|
|
|
libcap
|
|
|
|
libseccomp
|
|
|
|
libselinux
|
|
|
|
openssl
|
|
|
|
systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
patches = [
|
|
|
|
# fix docbook2man version detection
|
|
|
|
./docbook-hack.patch
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
# fix linking
|
|
|
|
./4428.diff
|
2024-02-07 01:22:34 +00:00
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dinstall-init-files=false"
|
|
|
|
"-Dinstall-state-dirs=false"
|
|
|
|
"-Dspecfile=false"
|
2024-05-15 15:35:15 +00:00
|
|
|
# re-enable when fixed https://github.com/lxc/lxc/issues/4427
|
|
|
|
# "-Dtools-multicall=true"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru = {
|
2024-04-21 15:54:59 +00:00
|
|
|
tests = {
|
|
|
|
incus-legacy-init = nixosTests.incus.container-legacy-init;
|
|
|
|
incus-systemd-init = nixosTests.incus.container-systemd-init;
|
2024-05-15 15:35:15 +00:00
|
|
|
lxd = nixosTests.lxd.container;
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
"--version-regex"
|
|
|
|
"v(6.0.*)"
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://linuxcontainers.org/";
|
|
|
|
description = "Userspace tools for Linux Containers, a lightweight virtualization system";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
LXC containers are often considered as something in the middle between a chroot and a
|
|
|
|
full fledged virtual machine. The goal of LXC is to create an environment as close as
|
|
|
|
possible to a standard Linux installation but without the need for a separate kernel.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = lib.teams.lxc.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
})
|