forked from mirrors/nixpkgs
5021717099
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>
21 lines
428 B
Nix
21 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"
|
|
'';
|
|
}
|