3
0
Fork 0
forked from mirrors/nixpkgs

Merge branch 'chromium'.

This introduces Chromium 39 as the new stable version along with a bunch
of fixes.

Fixes #2799, particularily the PDF plugin, which now is open source and
thus no longer an issue.

Also fixes #3219 and merges #2906, so we no longer get a crash while
trying to bring up the print preview dialog.

Thanks to @edwtjo for the CUPS version bump.

 * chromium: Switch to use open-source PDF plugin.
 * cups: bump 1.5.4 -> 1.7.5
 * chromium: Allow env vars for passing plugin paths.
 * chromium: Update all channels to latest versions.
 * protobuf: Clean up and update to version 2.6.1.
This commit is contained in:
aszlig 2014-11-22 04:27:38 +01:00
commit 392a4c0a26
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961
11 changed files with 154 additions and 66 deletions

View file

@ -12,7 +12,7 @@ mkChromiumDerivation (base: rec {
cp -v "$buildPath/"*.pak "$libExecPath/"
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
cp -v $buildPath/libffmpegsumo.so "$libExecPath/"
cp -v "$buildPath/libpdf.so" "$buildPath/libffmpegsumo.so" "$libExecPath/"
cp -v "$buildPath/chrome" "$libExecPath/$packageName"

View file

@ -69,7 +69,7 @@ let
use_system_xdg_utils = true;
use_system_yasm = true;
use_system_zlib = false;
use_system_protobuf = true;
use_system_protobuf = versionOlder source.version "40.0.0.0";
use_system_harfbuzz = false;
use_system_icu = false; # Doesn't support ICU 52 yet.

View file

@ -9,7 +9,6 @@
, gnomeKeyringSupport ? false
, proprietaryCodecs ? true
, enablePepperFlash ? false
, enablePepperPDF ? false
, enableWideVine ? false
, cupsSupport ? false
, pulseSupport ? false
@ -36,7 +35,7 @@ let
sandbox = callPackage ./sandbox.nix { };
plugins = callPackage ./plugins.nix {
inherit enablePepperFlash enablePepperPDF enableWideVine;
inherit enablePepperFlash enableWideVine;
};
};
@ -74,6 +73,7 @@ in stdenv.mkDerivation {
ln -s "${chromium.browser}/share" "$out/share"
makeWrapper "${browserBinary}" "$out/bin/chromium" \
--set CHROMIUM_SANDBOX_BINARY_PATH "${sandboxBinary}" \
--run "export ${chromium.plugins.envVarsEnabled}" \
--add-flags "${chromium.plugins.flagsEnabled}"
ln -s "$out/bin/chromium" "$out/bin/chromium-browser"

View file

@ -1,6 +1,5 @@
{ stdenv
, enablePepperFlash ? false
, enablePepperPDF ? false
, enableWideVine ? false
, source
@ -16,7 +15,7 @@ let
src = source.plugins;
phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
outputs = [ "pdf" "flash" "widevine" ];
outputs = [ "flash" "widevine" ];
unpackCmd = let
chan = if source.channel == "dev" then "chrome-unstable"
@ -26,7 +25,6 @@ let
mkdir -p plugins
ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \
./opt/google/${chan}/PepperFlash \
./opt/google/${chan}/libpdf.so \
./opt/google/${chan}/libwidevinecdm.so \
./opt/google/${chan}/libwidevinecdmadapter.so
'';
@ -40,7 +38,7 @@ let
rpaths = [ stdenv.gcc.gcc ];
mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}";
in ''
for sofile in PepperFlash/libpepflashplayer.so libpdf.so \
for sofile in PepperFlash/libpepflashplayer.so \
libwidevinecdm.so libwidevinecdmadapter.so; do
chmod +x "$sofile"
patchelf --set-rpath "${mkrpath rpaths}" "$sofile"
@ -51,25 +49,12 @@ let
'';
installPhase = let
pdfName = "Chrome PDF Viewer";
pdfDescription = "Portable Document Format";
pdfMimeTypes = concatStringsSep ";" [
"application/pdf"
"application/x-google-chrome-print-preview-pdf"
];
pdfInfo = "#${pdfName}#${pdfDescription};${pdfMimeTypes}";
wvName = "Widevine Content Decryption Module";
wvDescription = "Playback of encrypted HTML audio/video content";
wvMimeTypes = "application/x-ppapi-widevine-cdm";
wvModule = "$widevine/lib/libwidevinecdmadapter.so";
wvInfo = "#${wvName}#${wvDescription}:${wvMimeTypes}";
in ''
install -vD libpdf.so "$pdf/lib/libpdf.so"
mkdir -p "$pdf/nix-support"
echo "--register-pepper-plugins='$pdf/lib/libpdf.so${pdfInfo}'" \
> "$pdf/nix-support/chromium-flags"
flashVersion="$(
sed -n -r 's/.*"version": "([^"]+)",.*/\1/p' PepperFlash/manifest.json
)"
@ -88,13 +73,18 @@ let
mkdir -p "$widevine/nix-support"
echo "--register-pepper-plugins='${wvModule}${wvInfo}'" \
> "$widevine/nix-support/chromium-flags"
echo "NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE=$widevine/lib" \
> "$widevine/nix-support/chromium-env-vars"
'';
passthru.flagsEnabled = let
passthru = let
enabledPlugins = optional enablePepperFlash plugins.flash
++ optional enablePepperPDF plugins.pdf
++ optional enableWideVine plugins.widevine;
getFlags = plugin: "$(< ${plugin}/nix-support/chromium-flags)";
in concatStringsSep " " (map getFlags enabledPlugins);
getEnvVars = plugin: "$(< ${plugin}/nix-support/chromium-env-vars)";
in {
flagsEnabled = concatStringsSep " " (map getFlags enabledPlugins);
envVarsEnabled = concatStringsSep " " (map getEnvVars enabledPlugins);
};
};
in plugins

View file

@ -22,9 +22,7 @@ stdenv.mkDerivation {
prePatch = "patchShebangs .";
patches = let
onPre39 = optional (versionOlder version "39.0.0.0");
in [ ./sandbox_userns_36.patch ] ++ onPre39 ./missing_alg_import.patch;
patches = [ ./sandbox_userns_36.patch ./nix_plugin_paths.patch ];
postPatch = ''
sed -i -r \

View file

@ -1,11 +0,0 @@
diff -Naur chromium-37.0.2062.94.old/media/cast/logging/encoding_event_subscriber.cc chromium-37.0.2062.94/media/cast/logging/encoding_event_subscriber.cc
--- chromium-37.0.2062.94.old/media/cast/logging/encoding_event_subscriber.cc 2014-08-29 02:05:15.149140733 -0700
+++ chromium-37.0.2062.94/media/cast/logging/encoding_event_subscriber.cc 2014-08-29 02:06:00.182853590 -0700
@@ -4,6 +4,7 @@
#include "media/cast/logging/encoding_event_subscriber.h"
+#include <algorithm>
#include <cstring>
#include <utility>

View file

@ -0,0 +1,99 @@
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 8a205a6..d5c24e1 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -97,21 +97,14 @@ static base::LazyInstance<base::FilePath>
g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
// Gets the path for internal plugins.
-bool GetInternalPluginsDirectory(base::FilePath* result) {
-#if defined(OS_MACOSX) && !defined(OS_IOS)
- // If called from Chrome, get internal plugins from a subdirectory of the
- // framework.
- if (base::mac::AmIBundled()) {
- *result = chrome::GetFrameworkBundlePath();
- DCHECK(!result->empty());
- *result = result->Append("Internet Plug-Ins");
- return true;
- }
- // In tests, just look in the module directory (below).
-#endif
-
- // The rest of the world expects plugins in the module directory.
- return PathService::Get(base::DIR_MODULE, result);
+bool GetInternalPluginsDirectory(base::FilePath* result,
+ const std::string& ident) {
+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
+ const char* value = getenv(full_env.c_str());
+ if (value == NULL)
+ return PathService::Get(base::DIR_MODULE, result);
+ else
+ *result = base::FilePath(value);
}
} // namespace
@@ -248,11 +241,11 @@ bool PathProvider(int key, base::FilePath* result) {
create_dir = true;
break;
case chrome::DIR_INTERNAL_PLUGINS:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "ALL"))
return false;
break;
case chrome::DIR_PEPPER_FLASH_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
return false;
cur = cur.Append(kPepperFlashBaseDirectory);
break;
@@ -285,7 +278,7 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.Append(FILE_PATH_LITERAL("script.log"));
break;
case chrome::FILE_FLASH_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "FILEFLASH"))
return false;
cur = cur.Append(kInternalFlashPluginFileName);
break;
@@ -295,12 +288,12 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.Append(chrome::kPepperFlashPluginFilename);
break;
case chrome::FILE_PDF_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PDF"))
return false;
cur = cur.Append(kInternalPDFPluginFileName);
break;
case chrome::FILE_EFFECTS_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "FILE_EFFECTS"))
return false;
cur = cur.Append(kEffectsPluginFileName);
break;
@@ -308,7 +301,7 @@ bool PathProvider(int key, base::FilePath* result) {
// We currently need a path here to look up whether the plugin is disabled
// and what its permissions are.
case chrome::FILE_NACL_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "NACL"))
return false;
cur = cur.Append(kInternalNaClPluginFileName);
break;
@@ -343,7 +336,7 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.DirName();
}
#else
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
@@ -372,7 +365,7 @@ bool PathProvider(int key, base::FilePath* result) {
// In the component case, this is the source adapter. Otherwise, it is the
// actual Pepper module that gets loaded.
case chrome::FILE_WIDEVINE_CDM_ADAPTER:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "WIDEVINE"))
return false;
cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
break;

View file

@ -1,21 +1,21 @@
# This file is autogenerated from update.sh in the parent directory.
{
dev = {
version = "40.0.2182.3";
sha256 = "1713y6f2q5qh32wg027nphkv6p6rgq0q1awqcy543ypbk9p1jvbm";
sha256bin32 = "0qf0ccfg77qc17iy5cndkp827s8li3qyxasmgjq224g579wcj0bl";
sha256bin64 = "07f97m548kj7indpzyyvksa4gisndxc1s8qslk43mgsx26kz62rf";
version = "41.0.2224.3";
sha256 = "04lgklidxx4bryqhnm7kjqbfr12ns8ic9g4yxk3dig71081sas5f";
sha256bin32 = "17fgh57yckk318r7r6qkc934dpq35qa6ps4x5fwscl070rzjf81k";
sha256bin64 = "1qsvjm38cxx3inrw0hs4q9f4i9arqfj9cs57xh64wflrnh2z52zf";
};
beta = {
version = "39.0.2171.19";
sha256 = "19j86hzh552a73mvabzgdiq0s1ypr30b6lkn4kfxc2vhs1ds8nmg";
sha256bin32 = "06imcc3r6g4f7yi8b4mzknqk11khzk44pjrw0qnw40kgjf0kkgd3";
sha256bin64 = "0qd594rbg049g1h4s7lgw9abcccx6wrl3fggkd1z9bl8ihj54j4b";
version = "40.0.2214.10";
sha256 = "0wxkxgj6z18l2qkm0k16r8bpv9rdxk1g1ias03zzvlbj1bw3brdn";
sha256bin32 = "0wr2vg97d3qrryb5sz31sd3ycb1l17irrs79vfa04ip85jqv89zn";
sha256bin64 = "0bclgy386vdmfdf59hwkypcs8wwmlpgl3npp089hmcdvv7dmars8";
};
stable = {
version = "38.0.2125.101";
sha256 = "12hrl7i0xrjdwz8yaap5jhc6bzn29pk6dcz96743n6j7mcckac6k";
sha256bin32 = "1c35j4wx53njcqbdqznz2m0791bb9lpmhnpkrll36051437f25wl";
sha256bin64 = "1k8hrrxlqc1mv88v2qkyq8188lfaibvqpqg0g8qgj2ha5vsnvwvw";
version = "39.0.2171.65";
sha256 = "0lglcjvyhgmdm0sd76wv509pgwcfl86rlp9rj83z9giadwqlcmxi";
sha256bin32 = "1iqzi462vw8da5f8ysk76q68xhiw5ndqc3hhc6djipsc6h240bji";
sha256bin64 = "1gxh3sxpnl0167la9ncnz7l85gzi4ax6g5pqni1nma5g5cqqm177";
};
}

View file

@ -1,28 +1,41 @@
{ fetchurl, stdenv, zlib }:
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, zlib, gtest }:
stdenv.mkDerivation rec {
name = "protobuf-2.5.0";
name = "protobuf-${version}";
version = "2.6.1";
src = fetchurl {
url = "http://protobuf.googlecode.com/files/${name}.tar.bz2";
sha256 = "0xxn9gxhvsgzz2sgmihzf6pf75clr05mqj6218camwrwajpcbgqk";
src = fetchFromGitHub {
owner = "google";
repo = "protobuf";
rev = version;
sha256 = "03df8zvx2sry3jz2x4pi3l32qyfqa7w8kj8jdbz30nzy0h7aa070";
};
buildInputs = [ zlib ];
postPatch = ''
sed -i -e '/gtest/d' Makefile.am
sed -i \
-e 's!\$(top_\(build\|src\)dir)/gtest!${gtest}!g' \
-e 's/\(libgtest[^.]*\.\)la/\1a/g' \
src/Makefile.am
'';
buildInputs = [ zlib autoconf automake libtool gtest ];
preConfigure = "autoreconf -vfi";
doCheck = true;
meta = {
description = "Protocol Buffers - Google's data interchange format";
longDescription =
'' Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format. Google uses Protocol Buffers for
almost all of its internal RPC protocols and file formats.
'';
longDescription = ''
Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format. Google uses Protocol Buffers for
almost all of its internal RPC protocols and file formats.
'';
license = "mBSD";
license = stdenv.lib.licenses.bsd3;
homepage = http://code.google.com/p/protobuf/;
homepage = "https://developers.google.com/protocol-buffers/";
};
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam, openssl
, dbus, libusb, acl }:
let version = "1.5.4"; in
let version = "1.7.5"; in
stdenv.mkDerivation {
name = "cups-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.cups.org/software/${version}/cups-${version}-source.tar.bz2";
sha256 = "1rfhlv9b37120d6shngvyrcp99vh4a3lwdkrfanv3sjqid7068w0";
sha256 = "00mx4rpiqw9cwx46bd3hd5lcgmcxy63zfnmkr02smanv8xl4rjqq";
};
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb ]

View file

@ -9125,7 +9125,6 @@ let
channel = "stable";
pulseSupport = config.pulseaudio or true;
enablePepperFlash = config.chromium.enablePepperFlash or false;
enablePepperPDF = config.chromium.enablePepperPDF or false;
hiDPISupport = config.chromium.hiDPISupport or false;
};