2014-03-22 16:05:14 +00:00
|
|
|
{ stdenv, source }:
|
2013-09-25 12:45:13 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2014-03-22 16:05:14 +00:00
|
|
|
name = "chromium-sandbox-${source.version}";
|
|
|
|
src = source.sandbox;
|
2013-09-25 12:45:13 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e '/#include.*base_export/c \
|
|
|
|
#define BASE_EXPORT __attribute__((visibility("default")))
|
2014-03-27 08:53:01 +00:00
|
|
|
/#include/s|sandbox/linux|'"$(pwd)"'/linux|
|
2013-09-25 12:45:13 +01:00
|
|
|
' linux/suid/*.[hc]
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
gcc -Wall -std=gnu99 -o sandbox linux/suid/*.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-03-22 16:05:14 +00:00
|
|
|
install -svD sandbox "$out/bin/chromium-sandbox"
|
2013-09-25 12:45:13 +01:00
|
|
|
'';
|
|
|
|
}
|