Merge pull request #121598 from badmutex/badi/update-vivaldi

This commit is contained in:
Sandro 2021-05-03 17:33:51 +02:00 committed by GitHub
commit 2265b1e518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,11 +18,11 @@ let
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec {
pname = "vivaldi";
version = "3.7.2218.45-1";
version = "3.8.2259.37-1";
src = fetchurl {
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb";
sha256 = "11q3whw01nbwvzccgn55b4lkr7dzlql961406r6by8xqvf8zgmp4";
sha256 = "1lpia3jm6l2yvbhrw5khws28n653w22bszzd44y6zv6zwbw7y127";
};
unpackPhase = ''
@ -47,6 +47,7 @@ in stdenv.mkDerivation rec {
+ ":$out/opt/${vivaldiName}/lib";
buildPhase = ''
runHook preBuild
echo "Patching Vivaldi binaries"
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
@ -56,12 +57,14 @@ in stdenv.mkDerivation rec {
ln -s ${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so opt/${vivaldiName}/libffmpeg.so.''${version%\.*\.*}
'' + ''
echo "Finished patching Vivaldi binaries"
runHook postBuild
'';
dontPatchELF = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r opt "$out"
mkdir "$out/bin"
@ -84,6 +87,8 @@ in stdenv.mkDerivation rec {
${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + lib.optionalString enableWidevine ''
ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'' + ''
runHook postInstall
'';
meta = with lib; {