45b69d6dba
Now the chromium derivation produces an extra output path for the sandbox in order to be properly used as a setuid wrapper in <nixos> without the need to include the full Chromium package. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
21 lines
414 B
Nix
21 lines
414 B
Nix
{ stdenv, src, binary }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "chromium-sandbox-${src.version}";
|
|
inherit src;
|
|
|
|
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/${binary}"
|
|
'';
|
|
}
|