tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
sydbox: init at 2.2.0
authored by
Mikael Voss
and committed by
Yuka
4 years ago
d08244d5
5655e71e
+79
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
sydbox
default.nix
top-level
all-packages.nix
+77
pkgs/os-specific/linux/sydbox/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchurl
4
4
+
, pkg-config
5
5
+
, autoreconfHook
6
6
+
, python3
7
7
+
, perl
8
8
+
, libxslt
9
9
+
, docbook_xsl
10
10
+
, docbook_xml_dtd_42
11
11
+
, libseccomp
12
12
+
, installTests ? true, gnumake, which
13
13
+
, debugBuild ? false, libunwind
14
14
+
}:
15
15
+
16
16
+
stdenv.mkDerivation rec {
17
17
+
pname = "sydbox-1";
18
18
+
version = "2.2.0";
19
19
+
20
20
+
outputs = [ "out" "dev" "man" "doc" ]
21
21
+
++ lib.optional installTests "installedTests";
22
22
+
23
23
+
src = fetchurl {
24
24
+
url = "https://git.exherbo.org/${pname}.git/snapshot/${pname}-${version}.tar.xz";
25
25
+
sha256 = "0664myrrzbvsw73q5b7cqwgv4hl9a7vkm642s1r96gaxm16jk0z7";
26
26
+
};
27
27
+
28
28
+
nativeBuildInputs = [
29
29
+
pkg-config
30
30
+
autoreconfHook
31
31
+
python3
32
32
+
perl
33
33
+
libxslt.bin
34
34
+
docbook_xsl
35
35
+
docbook_xml_dtd_42
36
36
+
];
37
37
+
38
38
+
buildInputs = [
39
39
+
libseccomp
40
40
+
] ++ lib.optional debugBuild libunwind
41
41
+
++ lib.optionals installTests [
42
42
+
gnumake
43
43
+
python3
44
44
+
perl
45
45
+
which
46
46
+
];
47
47
+
48
48
+
enableParallelBuilding = true;
49
49
+
50
50
+
configureFlags = [ ]
51
51
+
++ lib.optionals installTests [ "--enable-installed-tests"
52
52
+
"--libexecdir=${placeholder "installedTests"}/libexec" ]
53
53
+
++ lib.optional debugBuild "--enable-debug";
54
54
+
55
55
+
makeFlags = [ "SYD_INCLUDEDIR=${stdenv.cc.libc.dev}/include" ];
56
56
+
57
57
+
doCheck = true;
58
58
+
checkPhase = ''
59
59
+
# Many of the regular test cases in t/ do not work inside the build sandbox
60
60
+
make -C syd check
61
61
+
'';
62
62
+
63
63
+
postInstall = if installTests then ''
64
64
+
moveToOutput bin/syd-test $installedTests
65
65
+
'' else ''
66
66
+
# Tests are installed despite --disable-installed-tests
67
67
+
rm -r $out/bin/syd-test $out/libexec
68
68
+
'';
69
69
+
70
70
+
meta = with lib; {
71
71
+
homepage = "https://sydbox.exherbo.org/";
72
72
+
description = "seccomp-based application sandbox";
73
73
+
license = licenses.gpl2;
74
74
+
platforms = platforms.linux;
75
75
+
maintainers = with maintainers; [ mvs ];
76
76
+
};
77
77
+
}
+2
pkgs/top-level/all-packages.nix
···
3417
3417
3418
3418
swego = callPackage ../servers/swego { };
3419
3419
3420
3420
+
sydbox = callPackage ../os-specific/linux/sydbox { };
3421
3421
+
3420
3422
syscall_limiter = callPackage ../os-specific/linux/syscall_limiter {};
3421
3423
3422
3424
syslogng = callPackage ../tools/system/syslog-ng { };