Merge pull request #194479 from jlamur/qutebrowser-widevine-cdm

configure widevine for qutebrowser
This commit is contained in:
Timothy DeHerrera 2022-10-13 14:02:23 -06:00 committed by GitHub
commit 296c61d262
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 1 deletions

View file

@ -6397,6 +6397,15 @@
githubId = 1204734;
name = "Emil Karlson";
};
jlamur = {
email = "contact@juleslamur.fr";
github = "jlamur";
githubId = 7054317;
name = "Jules Lamur";
keys = [{
fingerprint = "B768 6CD7 451A 650D 9C54 4204 6710 CF0C 1CBD 7762";
}];
};
jlesquembre = {
email = "jl@lafuente.me";
github = "jlesquembre";

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchzip
}:
stdenv.mkDerivation rec {
pname = "widevine-cdm";
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 libwidevinecdm.so $out/libwidevinecdm.so
'';
meta = with lib; {
description = "Widevine CDM";
homepage = "https://www.widevine.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ jlamur ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -12,6 +12,8 @@
, qtbase ? null
, qtwebengine ? null
, wrapGAppsHook ? null
, enableWideVine ? false
, widevine-cdm
}: let
isQt6 = mkDerivationWith == null;
@ -149,6 +151,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"''}
)
'';
@ -157,6 +160,6 @@ buildPythonApplication {
description = "Keyboard-focused browser with a minimal GUI";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda ];
inherit (backendPackage.meta) platforms;
platforms = if enableWideVine then [ "x86_64-linux" ] else backendPackage.meta.platforms;
};
}

View file

@ -37651,4 +37651,6 @@ with pkgs;
swaysettings = callPackage ../applications/misc/swaysettings { };
aitrack = libsForQt5.callPackage ../applications/misc/aitrack { };
widevine-cdm = callPackage ../applications/networking/browsers/misc/widevine-cdm.nix { };
}