mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
chromium: split the sandbox into a separate output
Related to #17460 and 66d5edf
Triggers a rebuild of Chromium
This commit is contained in:
parent
66d5edf654
commit
231ed9edd9
2 changed files with 8 additions and 4 deletions
|
@ -224,6 +224,13 @@ let
|
|||
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; };
|
||||
};
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ in stdenv.mkDerivation {
|
|||
buildCommand = let
|
||||
browserBinary = "${chromium.browser}/libexec/chromium/chromium";
|
||||
getWrapperFlags = plugin: "$(< \"${plugin}/nix-support/wrapper-flags\")";
|
||||
sandboxExecutableSourcePath = "${chromium.browser}/libexec/chromium/chrome-sandbox";
|
||||
launchScript = writeScript "chromium" ''
|
||||
#! ${stdenv.shell}
|
||||
|
||||
|
@ -100,9 +99,7 @@ in stdenv.mkDerivation {
|
|||
substituteInPlace $out/bin/chromium --replace @out@ $out --replace @sandbox@ $sandbox
|
||||
chmod 755 "$out/bin/chromium"
|
||||
|
||||
mkdir -p "$sandbox/bin"
|
||||
[ -x "${sandboxExecutableSourcePath}" ] || exit 1
|
||||
ln -sv "${sandboxExecutableSourcePath}" "$sandbox/bin/${sandboxExecutableName}"
|
||||
ln -sv "${chromium.browser.sandbox}" "$sandbox"
|
||||
|
||||
ln -s "$out/bin/chromium" "$out/bin/chromium-browser"
|
||||
ln -s "${chromium.browser}/share/icons" "$out/share/icons"
|
||||
|
|
Loading…
Reference in a new issue