diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index fe21642373ef..9eb25c316f95 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -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/; diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 7f6eb328ee1c..2c70978a4962 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -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. diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 82143f206370..049c1128b9fa 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -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; };