nixpkgs/pkgs/applications/networking/browsers/chromium/sandbox.nix
aszlig 5021717099
chromium: Split off sandbox from the browser.
Now, we no longer tie the sandbox directly to the browser derivation but
wrap everything together into one derivation at the entry point at
default.nix.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-19 03:58:42 +02:00

20 lines
428 B
Nix

{ stdenv, source }:
stdenv.mkDerivation {
name = "chromium-sandbox-${source.version}";
src = source.sandbox;
patchPhase = ''
sed -i -e '/#include.*base_export/c \
#define BASE_EXPORT __attribute__((visibility("default")))
' linux/suid/*.[hc]
'';
buildPhase = ''
gcc -Wall -std=gnu99 -o sandbox linux/suid/*.c
'';
installPhase = ''
install -svD sandbox "$out/bin/chromium-sandbox"
'';
}