mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-05 09:58:50 +03:00
chromium: Fix building with WineVine components
Before version 54, the WideVine CDM plugin was built unconditionally and it seems since version 54 this now is dependent upon a GYP/GN flag on whether to include the CDM shared library or not. Also, we now use a patch from Gentoo which should hopefully get the CDM plugin to work properly, at least according to their bugtracker: https://bugs.gentoo.org/show_bug.cgi?id=547630 Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
66ce15a3b1
commit
d2e60d1f93
@ -18,6 +18,11 @@ mkChromiumDerivation (base: rec {
|
||||
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
||||
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
||||
|
||||
if [ -e "$buildPath/libwidevinecdmadapter.so" ]; then
|
||||
cp -v "$buildPath/libwidevinecdmadapter.so" \
|
||||
"$libExecPath/libwidevinecdmadapter.so"
|
||||
fi
|
||||
|
||||
mkdir -p "$sandbox/bin"
|
||||
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
, enableSELinux ? false, libselinux ? null
|
||||
, enableNaCl ? false
|
||||
, enableHotwording ? false
|
||||
, enableWideVine ? false
|
||||
, gnomeSupport ? false, gnome ? null
|
||||
, gnomeKeyringSupport ? false, libgnome_keyring3 ? null
|
||||
, proprietaryCodecs ? true
|
||||
@ -102,10 +103,9 @@ let
|
||||
++ optional pulseSupport libpulseaudio;
|
||||
|
||||
patches = [
|
||||
./patches/widevine.patch
|
||||
./patches/glibc-2.24.patch
|
||||
./patches/nix_plugin_paths_52.patch
|
||||
];
|
||||
] ++ optional enableWideVine ./patches/widevine.patch;
|
||||
|
||||
postPatch = ''
|
||||
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
||||
@ -147,6 +147,7 @@ let
|
||||
use_gio = gnomeSupport;
|
||||
enable_nacl = enableNaCl;
|
||||
enable_hotwording = enableHotwording;
|
||||
enable_widevine = enableWideVine;
|
||||
selinux = enableSELinux;
|
||||
use_cups = cupsSupport;
|
||||
} // {
|
||||
|
@ -22,7 +22,8 @@ let
|
||||
|
||||
mkChromiumDerivation = callPackage ./common.nix {
|
||||
inherit enableSELinux enableNaCl enableHotwording gnomeSupport gnome
|
||||
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport;
|
||||
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport
|
||||
enableWideVine;
|
||||
};
|
||||
|
||||
browser = callPackage ./browser.nix { inherit channel; };
|
||||
|
@ -1,12 +1,16 @@
|
||||
diff -upr chromium-42.0.2311.90.orig/third_party/widevine/cdm/widevine_cdm_version.h chromium-42.0.2311.90/third_party/widevine/cdm/widevine_cdm_version.h
|
||||
--- chromium-42.0.2311.90.orig/third_party/widevine/cdm/widevine_cdm_version.h 2015-04-15 01:18:59.000000000 +0300
|
||||
+++ chromium-42.0.2311.90/third_party/widevine/cdm/widevine_cdm_version.h 2015-04-15 09:09:49.157260050 +0300
|
||||
@@ -14,4 +14,8 @@
|
||||
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
|
||||
// as a string, e.g., "1.0.123.456").
|
||||
Minimal WideVine patch from Gentoo:
|
||||
|
||||
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-widevine-r1.patch
|
||||
|
||||
BTS: https://bugs.gentoo.org/show_bug.cgi?id=547630
|
||||
|
||||
--- a/third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||
+++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "third_party/widevine/cdm/widevine_cdm_common.h"
|
||||
|
||||
+#define WIDEVINE_CDM_VERSION_STRING "unknown"
|
||||
#define WIDEVINE_CDM_AVAILABLE
|
||||
|
||||
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
|
||||
+#define WIDEVINE_CDM_AVAILABLE
|
||||
+#define WIDEVINE_CDM_VERSION_STRING "@WIDEVINE_VERSION@"
|
||||
+
|
||||
#endif // WIDEVINE_CDM_VERSION_H_
|
||||
|
Loading…
Reference in New Issue
Block a user