widevine-cdm: merge with vivaldi-widevine

This commit is contained in:
Weijia Wang 2023-02-25 11:18:41 +02:00
parent b73601f559
commit fb15c693c3
6 changed files with 15 additions and 36 deletions

View File

@ -1,4 +1,6 @@
{ lib, stdenv, fetchzip
{ lib
, stdenv
, fetchzip
}:
stdenv.mkDerivation rec {
@ -12,7 +14,13 @@ stdenv.mkDerivation rec {
};
installPhase = ''
install -vD libwidevinecdm.so $out/libwidevinecdm.so
runHook preInstall
install -vD manifest.json $out/share/google/chrome/WidevineCdm/manifest.json
install -vD LICENSE.txt $out/share/google/chrome/WidevineCdm/LICENSE.txt
install -vD libwidevinecdm.so $out/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
runHook postInstall
'';
meta = with lib; {
@ -21,6 +29,6 @@ stdenv.mkDerivation rec {
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ jlamur ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -144,7 +144,7 @@ buildPythonApplication {
--add-flags '--backend ${backend}'
--set QUTE_QTWEBENGINE_VERSION_OVERRIDE "${lib.getVersion qtwebengine}"
${lib.optionalString (pipewireSupport && backend == "webengine") ''--prefix LD_LIBRARY_PATH : ${libPath}''}
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/libwidevinecdm.so"''}
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
)
'';

View File

@ -11,7 +11,7 @@
, wayland, pipewire
, isSnapshot ? false
, proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null
, enableWidevine ? false, vivaldi-widevine ? null
, enableWidevine ? false, widevine-cdm ? null
, commandLineArgs ? ""
, pulseSupport ? stdenv.isLinux, libpulseaudio
}:
@ -95,7 +95,7 @@ in stdenv.mkDerivation rec {
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + lib.optionalString enableWidevine ''
ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
ln -sf ${widevine-cdm}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'' + ''
runHook postInstall
'';

View File

@ -1,28 +0,0 @@
{ lib, stdenv, fetchzip
}:
stdenv.mkDerivation rec {
pname = "widevine";
version = "4.10.2449.0";
src = fetchzip {
url = "https://dl.google.com/widevine-cdm/${version}-linux-x64.zip";
sha256 = "sha256-f2kAkP+s3fB+krEZsiujEoI4oznkzSyaIB/CRJZWlXE=";
stripRoot = false;
};
installPhase = ''
install -vD manifest.json $out/share/google/chrome/WidevineCdm/manifest.json
install -vD LICENSE.txt $out/share/google/chrome/WidevineCdm/LICENSE.txt
install -vD libwidevinecdm.so $out/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
'';
meta = with lib; {
description = "Widevine support for Vivaldi";
homepage = "https://www.widevine.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ betaboon ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -1622,6 +1622,7 @@ mapAliases ({
virtmanager = virt-manager; # Added 2019-10-29
virtmanager-qt = virt-manager-qt; # Added 2019-10-29
virtviewer = throw "'virtviewer' has been renamed to/replaced by 'virt-viewer'"; # Converted to throw 2022-02-22
vivaldi-widevine = throw "'vivaldi-widevine' has been renamed to/replaced by 'widevine-cdm'"; # Added 2023-02-25
vkBasalt = vkbasalt; # Added 2022-11-22
vnc2flv = throw "vnc2flv has been removed: abandoned by upstream"; # Added 2022-03-21
vorbisTools = throw "'vorbisTools' has been renamed to/replaced by 'vorbis-tools'"; # Converted to throw 2022-02-22

View File

@ -32188,8 +32188,6 @@ with pkgs;
vivaldi-ffmpeg-codecs = callPackage ../applications/networking/browsers/vivaldi/ffmpeg-codecs.nix {};
vivaldi-widevine = callPackage ../applications/networking/browsers/vivaldi/widevine.nix { };
libopenmpt = callPackage ../development/libraries/audio/libopenmpt { };
libopenmpt-modplug = callPackage ../development/libraries/audio/libopenmpt-modplug { };