mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
0aad4b7ee4
Overview of the updated versions: stable: 40.0.2214.91 -> 40.0.2214.115 beta: 41.0.2272.16 -> 41.0.2272.64 dev: 41.0.2272.16 -> 42.0.2305.3 Introduces 42.0.2305.3 as the new dev version, which no longer requires our user namespaces sandbox patch. Thanks to everyone participating in https://crbug.com/312380 for finally having this upstream. In the course of supporting the official namespace sandbox (that's what the user namespace sandbox is called), a few things needed to be fixed for version 42: * Add an updated nix_plugin_paths.patch, because the old one tries to patch the path for libpdf, which is now natively included in Chromium. * Don't copy libpdf.so to libexec path for version 42, it's no longer needed as it's completely built-in now. * Disable SUID sandbox directly in the source instead of going the easy route of passing --disable-setuid-sandbox. The reason is that with the command line flag a nasty nagbar will appear. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
45 lines
1.5 KiB
Nix
45 lines
1.5 KiB
Nix
{ stdenv, mkChromiumDerivation }:
|
|
|
|
with stdenv.lib;
|
|
|
|
mkChromiumDerivation (base: rec {
|
|
name = "chromium-browser";
|
|
packageName = "chromium";
|
|
buildTargets = [ "mksnapshot" "chrome" ];
|
|
|
|
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/libffmpegsumo.so" "$libExecPath/"
|
|
${optionalString (versionOlder base.version "42.0.0.0") ''
|
|
cp -v "$buildPath/libpdf.so" "$libExecPath/"
|
|
''}
|
|
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
|
|
|
mkdir -vp "$out/share/man/man1"
|
|
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
|
|
|
|
for icon_file in chrome/app/theme/chromium/product_logo_*[0-9].png; do
|
|
num_and_suffix="''${icon_file##*logo_}"
|
|
icon_size="''${num_and_suffix%.*}"
|
|
expr "$icon_size" : "^[0-9][0-9]*$" || continue
|
|
logo_output_prefix="$out/share/icons/hicolor"
|
|
logo_output_path="$logo_output_prefix/''${icon_size}x''${icon_size}/apps"
|
|
mkdir -vp "$logo_output_path"
|
|
cp -v "$icon_file" "$logo_output_path/$packageName.png"
|
|
done
|
|
'';
|
|
|
|
preHook = "unset NIX_ENFORCE_PURITY";
|
|
|
|
meta = {
|
|
description = "An open source web browser from Google";
|
|
homepage = http://www.chromium.org/;
|
|
maintainers = with maintainers; [ goibhniu chaoflow aszlig ];
|
|
license = licenses.bsd3;
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|