2024-01-02 11:29:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
docbook2x,
|
|
|
|
libapparmor,
|
|
|
|
libcap,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
nix-update-script,
|
|
|
|
nixosTests,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
systemd,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lxc";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "lxc";
|
|
|
|
rev = "refs/tags/lxc-${version}";
|
|
|
|
hash = "sha256-lnLmLgWXt3pI2S+4OeHRlPP5gui7S7ZXXClFt+n/8sY=";
|
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-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 = [
|
|
|
|
# make build more nix compatible
|
|
|
|
./add-meson-options.patch
|
|
|
|
|
|
|
|
# fix docbook2man version detection
|
|
|
|
./docbook-hack.patch
|
|
|
|
];
|
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"
|
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 = {
|
|
|
|
tests.incus = nixosTests.incus.container;
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [
|
|
|
|
"-vr"
|
|
|
|
"lxc-(.*)"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
}
|