chromium: split the sandbox into a seperate output (take 2)
Fixup of 231ed9e
This commit is contained in:
parent
983ab7be1e
commit
20f009d56d
@ -7,13 +7,19 @@ mkChromiumDerivation (base: rec {
|
|||||||
packageName = "chromium";
|
packageName = "chromium";
|
||||||
buildTargets = [ "mksnapshot" "chrome_sandbox" "chrome" ];
|
buildTargets = [ "mksnapshot" "chrome_sandbox" "chrome" ];
|
||||||
|
|
||||||
|
outputs = ["out" "sandbox"];
|
||||||
|
|
||||||
|
sandboxExecutableName = "__chromium-suid-sandbox";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$libExecPath"
|
mkdir -p "$libExecPath"
|
||||||
cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
|
cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
|
||||||
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
|
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
|
||||||
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
||||||
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
||||||
cp -v "$buildPath/chrome_sandbox" "$libExecPath/chrome-sandbox"
|
|
||||||
|
mkdir -p "$sandbox/bin"
|
||||||
|
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"
|
||||||
|
|
||||||
mkdir -vp "$out/share/man/man1"
|
mkdir -vp "$out/share/man/man1"
|
||||||
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
|
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
|
||||||
@ -29,6 +35,8 @@ mkChromiumDerivation (base: rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = { inherit sandboxExecutableName; };
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "An open source web browser from Google";
|
description = "An open source web browser from Google";
|
||||||
homepage = http://www.chromium.org/;
|
homepage = http://www.chromium.org/;
|
||||||
|
@ -96,8 +96,6 @@ let
|
|||||||
buildPath = "out/${buildType}";
|
buildPath = "out/${buildType}";
|
||||||
libExecPath = "$out/libexec/${packageName}";
|
libExecPath = "$out/libexec/${packageName}";
|
||||||
|
|
||||||
sandboxExecutableName = "__chromium-suid-sandbox";
|
|
||||||
|
|
||||||
base = rec {
|
base = rec {
|
||||||
name = "${packageName}-${version}";
|
name = "${packageName}-${version}";
|
||||||
inherit (upstream-info) version;
|
inherit (upstream-info) version;
|
||||||
@ -223,15 +221,6 @@ let
|
|||||||
targets = extraAttrs.buildTargets or [];
|
targets = extraAttrs.buildTargets or [];
|
||||||
commands = map buildCommand targets;
|
commands = map buildCommand targets;
|
||||||
in concatStringsSep "\n" commands;
|
in concatStringsSep "\n" commands;
|
||||||
|
|
||||||
outputs = ["out" "sandbox"];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p "$sandbox/bin"
|
|
||||||
mv -v "$out/libexec/chromium/chrome-sandbox" "$sandbox/bin/${sandboxExecutableName}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = { inherit sandboxExecutableName; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Remove some extraAttrs we supplied to the base attributes already.
|
# Remove some extraAttrs we supplied to the base attributes already.
|
||||||
|
@ -109,7 +109,7 @@ in stdenv.mkDerivation {
|
|||||||
inherit (chromium.browser) meta packageName;
|
inherit (chromium.browser) meta packageName;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit (chromium) upstream-info;
|
inherit (chromium) upstream-info browser;
|
||||||
mkDerivation = chromium.mkChromiumDerivation;
|
mkDerivation = chromium.mkChromiumDerivation;
|
||||||
inherit sandboxExecutableName;
|
inherit sandboxExecutableName;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user