1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
{
lib,
stdenv,
fetchFromGitHub,
docbook2x,
libapparmor,
libcap,
libseccomp,
libselinux,
meson,
ninja,
nix-update-script,
nixosTests,
openssl,
pkg-config,
systemd,
}:
stdenv.mkDerivation rec {
pname = "lxc";
version = "5.0.3";
src = fetchFromGitHub {
owner = "lxc";
repo = "lxc";
rev = "refs/tags/lxc-${version}";
hash = "sha256-lnLmLgWXt3pI2S+4OeHRlPP5gui7S7ZXXClFt+n/8sY=";
};
nativeBuildInputs = [
docbook2x
meson
ninja
pkg-config
];
buildInputs = [
libapparmor
libcap
libseccomp
libselinux
openssl
systemd
];
patches = [
# make build more nix compatible
./add-meson-options.patch
# fix docbook2man version detection
./docbook-hack.patch
];
mesonFlags = [
"-Dinstall-init-files=false"
"-Dinstall-state-dirs=false"
"-Dspecfile=false"
];
enableParallelBuilding = true;
doCheck = true;
passthru = {
tests = {
incus-old-init = nixosTests.incus.container-old-init;
incus-new-init = nixosTests.incus.container-new-init;
};
updateScript = nix-update-script {
extraArgs = [
"-vr"
"lxc-(.*)"
];
};
};
meta = {
homepage = "https://linuxcontainers.org/";
description = "Userspace tools for Linux Containers, a lightweight virtualization system";
license = lib.licenses.gpl2;
longDescription = ''
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.
'';
platforms = lib.platforms.linux;
maintainers = lib.teams.lxc.members;
};
}
|