vivaldi-widevine: init at 4.10.1196.0

This commit is contained in:
betaboon 2019-06-28 23:52:03 +02:00 committed by Tim Steinbach
parent e0e865f787
commit 1ab2e927a6
3 changed files with 41 additions and 2 deletions

View File

@ -9,6 +9,7 @@
, patchelf, makeWrapper
, isSnapshot ? false
, proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null
, enableWidevine ? false, vivaldi-widevine ? null
}:
let
@ -51,7 +52,7 @@ in stdenv.mkDerivation rec {
opt/${vivaldiName}/vivaldi-bin
'' + stdenv.lib.optionalString proprietaryCodecs ''
sed -i '/^if \[ "$VIVALDI_FFMPEG_FOUND/i \
VIVALDI_FFMPEG_FOUND=YES\nCACHED_FFMPEG=${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so' opt/${vivaldiName}/vivaldi
VIVALDI_FFMPEG_FOUND=YES\nCACHED_FFMPEG=${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so' opt/${vivaldiName}/${vivaldiName}
'' + ''
echo "Finished patching Vivaldi binaries"
'';
@ -76,7 +77,11 @@ in stdenv.mkDerivation rec {
"$out"/share/icons/hicolor/''${d}x''${d}/apps/vivaldi.png
done
wrapProgram "$out/bin/vivaldi" \
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
${stdenv.lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + stdenv.lib.optionalString enableWidevine ''
rm $out/opt/${vivaldiName}/libwidevinecdm.so
ln -s ${vivaldi-widevine}/lib/libwidevinecdm.so $out/opt/${vivaldiName}/libwidevinecdm.so
'';
meta = with stdenv.lib; {

View File

@ -0,0 +1,32 @@
{ stdenv, fetchurl
, unzip
}:
stdenv.mkDerivation rec {
name = "widevine";
version = "4.10.1196.0";
src = fetchurl {
url = "https://dl.google.com/widevine-cdm/${version}-linux-x64.zip";
sha256 = "01c7nr7d2xs718jymicbk4ipzfx6q253109qv3lk4lryrrhvw14y";
};
buildInputs = [ unzip ];
unpackPhase = ''
unzip $src libwidevinecdm.so
find .
'';
installPhase = ''
install -vD libwidevinecdm.so $out/lib/libwidevinecdm.so
'';
meta = with stdenv.lib; {
description = "Widevine support for Vivaldi";
homepage = "https://www.widevine.com";
license = licenses.unfree;
maintainers = with maintainers; [ betaboon ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -19536,6 +19536,8 @@ in
vivaldi-ffmpeg-codecs = callPackage ../applications/networking/browsers/vivaldi/ffmpeg-codecs.nix {};
vivaldi-widevine = callPackage ../applications/networking/browsers/vivaldi/widevine.nix { };
openmpt123 = callPackage ../applications/audio/openmpt123 { };
opusfile = callPackage ../applications/audio/opusfile { };