nixpkgs/pkgs/applications/networking/browsers/chromium/sandbox.nix
aszlig c537fa6da0
chromium: Update beta and dev to latest versions.
beta: 34.0.1847.60 -> 35.0.1916.47 (builds fine, tested)
dev:  35.0.1883.0  -> 36.0.1941.0  (builds fine, tested)

For the new version 36, we needed to rebase our user namespaces sandbox
patch, because http://crbug.com/312380 is preparing for an upstream
implementation of the same functionality.

Also, we need to add ply and jinja2 to the depends on version 36. This
is done unconditionally, because I want to avoid cluttering up the
expressions with various versionOlder checks.

The sandbox binary had to be fixed as well and we no longer use system
zlib, as - who might have guessed it - it's a fast moving target at
Chromium as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-20 17:45:24 +02:00

21 lines
476 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")))
/#include/s|sandbox/linux|'"$(pwd)"'/linux|
' linux/suid/*.[hc]
'';
buildPhase = ''
gcc -Wall -std=gnu99 -o sandbox linux/suid/*.c
'';
installPhase = ''
install -svD sandbox "$out/bin/chromium-sandbox"
'';
}