chromium: split the sandbox into a seperate output (take 2)

Fixup of 231ed9e
This commit is contained in:
obadz 2016-08-06 14:40:56 +01:00
parent 983ab7be1e
commit 20f009d56d
3 changed files with 10 additions and 13 deletions

View file

@ -7,13 +7,19 @@ mkChromiumDerivation (base: rec {
packageName = "chromium";
buildTargets = [ "mksnapshot" "chrome_sandbox" "chrome" ];
outputs = ["out" "sandbox"];
sandboxExecutableName = "__chromium-suid-sandbox";
installPhase = ''
mkdir -p "$libExecPath"
cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
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"
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
@ -29,6 +35,8 @@ mkChromiumDerivation (base: rec {
done
'';
passthru = { inherit sandboxExecutableName; };
meta = {
description = "An open source web browser from Google";
homepage = http://www.chromium.org/;

View file

@ -96,8 +96,6 @@ let
buildPath = "out/${buildType}";
libExecPath = "$out/libexec/${packageName}";
sandboxExecutableName = "__chromium-suid-sandbox";
base = rec {
name = "${packageName}-${version}";
inherit (upstream-info) version;
@ -223,15 +221,6 @@ let
targets = extraAttrs.buildTargets or [];
commands = map buildCommand targets;
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.

View file

@ -109,7 +109,7 @@ in stdenv.mkDerivation {
inherit (chromium.browser) meta packageName;
passthru = {
inherit (chromium) upstream-info;
inherit (chromium) upstream-info browser;
mkDerivation = chromium.mkChromiumDerivation;
inherit sandboxExecutableName;
};