-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vivaldi: fix patched paths #72207
vivaldi: fix patched paths #72207
Conversation
So basically this shouldn't be merged until 2.9 is released. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix-review
passes on NixOS
diff LGTM
not sure how to test
[6 built, 1 copied (0.0 MiB), 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/72207
3 package were build:
exodus vivaldi-ffmpeg-codecs vivaldi-widevine
@eadwu i just tested this as 9.2 is released. it doesnt quite work. diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix
index d203dade224..2a51e46db71 100644
--- a/pkgs/applications/networking/browsers/vivaldi/default.nix
+++ b/pkgs/applications/networking/browsers/vivaldi/default.nix
@@ -81,7 +81,7 @@ in stdenv.mkDerivation rec {
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
${stdenv.lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + stdenv.lib.optionalString enableWidevine ''
- ln -sf ${vivaldi-widevine}/lib/libwidevinecdm.so $out/opt/${vivaldiName}/WidevineCdm
+ ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/browsers/vivaldi/ffmpeg-codecs.nix b/pkgs/applications/networking/browsers/vivaldi/ffmpeg-codecs.nix
index cd710cb883d..78b35da1609 100644
--- a/pkgs/applications/networking/browsers/vivaldi/ffmpeg-codecs.nix
+++ b/pkgs/applications/networking/browsers/vivaldi/ffmpeg-codecs.nix
@@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
name = "chromium-codecs-ffmpeg";
- version = "77.0.3865.90";
+ version = "78.0.3904.70";
src = fetchurl {
- url = "http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_${version}-0ubuntu0.18.04.1_amd64.deb";
- sha256 = "12736d7x1kqv1727ycx0f1ijbdq2fcc3vwklklnxpkklnf86w51q";
+ url = "http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_${version}-0ubuntu0.18.04.2_amd64.deb";
+ sha256 = "1ybzddqqim5q20jk5p0wc5kman58vjd8zj9ccs3hrk7c37hvcd16";
};
buildInputs = [ dpkg ];
diff --git a/pkgs/applications/networking/browsers/vivaldi/widevine.nix b/pkgs/applications/networking/browsers/vivaldi/widevine.nix
index fe626b20d4e..f8d5bd609da 100644
--- a/pkgs/applications/networking/browsers/vivaldi/widevine.nix
+++ b/pkgs/applications/networking/browsers/vivaldi/widevine.nix
@@ -14,12 +14,15 @@ stdenv.mkDerivation rec {
buildInputs = [ unzip ];
unpackPhase = ''
- unzip $src libwidevinecdm.so
- find .
+ unzip $src
'';
- installPhase = ''
- install -vD libwidevinecdm.so $out/lib/libwidevinecdm.so
+ installPhase = let
+ installDir = "$out/share/google/chrome/WidevineCdm/_platform_specific/linux_x64";
+ in ''
+ install -vD libwidevinecdm.so ${installDir}/libwidevinecdm.so
+ install -vD manifest.json ${installDir}/manifest.json
+ install -vD LICENSE.txt ${installDir}/LICENSE.txt
'';
meta = with stdenv.lib; { |
Applied patch and rebased onto master. |
263097f
to
3ca23d5
Compare
still all builds fine, @betaboon for testing |
Might be worth noting that if follow vivaldi's specification for whether or not the widevine works [1], none of the two approaches work although they suppress the error. [1] https://help.vivaldi.com/article/widevinecdm-eme-drm-support-on-linux/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to work fine.
i tested with: https://bitmovin.com/demos/drm
and with netflix
@GrahamcOfBorg build exodus vivaldi-ffmpeg-codecs vivaldi-widevine |
2.10 has been released, would be nice to have the latest version of |
I didnt notice this PR hasnt been merged yet :/ |
I forgot to follow up after doing the ofborg build |
Thanks guys! |
3ca23d5
to
b1159b4
Compare
@eadwu the mirror you're using for ffmpeg does not serve the specified version for me. I improved the update-script a little to extract the ffmpeg- and widevine version directly from the update scripts provided by the vivaldi package. diff --git a/pkgs/applications/networking/browsers/vivaldi/update.sh b/pkgs/applications/networking/browsers/vivaldi/update.sh
index 2e6c2853eb1..b08fe3d7713 100755
--- a/pkgs/applications/networking/browsers/vivaldi/update.sh
+++ b/pkgs/applications/networking/browsers/vivaldi/update.sh
@@ -28,6 +28,7 @@ path=${prefetch[1]}
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/applications/networking/browsers/vivaldi/default.nix"
ffmpeg_nix="$nixpkgs/pkgs/applications/networking/browsers/vivaldi/ffmpeg-codecs.nix"
+widevine_nix="$nixpkgs/pkgs/applications/networking/browsers/vivaldi/widevine.nix"
(cd "$root" && update-source-version vivaldi "$vivaldi_version" "$hash")
@@ -35,12 +36,28 @@ git add "${default_nix}"
git commit -m "vivaldi: ${vivaldi_version_old} -> ${vivaldi_version}"
# Check vivaldi-ffmpeg-codecs version.
-chromium_version_old=$(version vivaldi-ffmpeg-codecs)
-chromium_version=$(bsdtar xOf "$path" data.tar.xz | bsdtar xOf - ./opt/vivaldi/vivaldi-bin | strings | grep '^[0-9]\{2,\}\.[0-9]\+\.[0-9]\{4,\}\+\.[0-9]\+$')
+ffmpeg_version_old=$(version vivaldi-ffmpeg-codecs)
+ffmpeg_version_raw=$(bsdtar xOf "$path" data.tar.xz | bsdtar xOf - ./opt/vivaldi/update-ffmpeg | sed -n -e "s/^FFMPEG_VERSION='\(.*\)'/\1/p")
+ffmpeg_version=$(echo "$ffmpeg_version_raw" | sed -n -e "s/\(.*\)-.*/\1/p")
+ffmpeg_url=$(bsdtar xOf "$path" data.tar.xz | bsdtar xOf - ./opt/vivaldi/update-ffmpeg | sed -n -e 's/^.*FFMPEG_URL="\(.*_amd64.deb\)"/\1/p' | sed "s/\${FFMPEG_VERSION}/$ffmpeg_version_raw/")
-if [[ "$chromium_version" != "$chromium_version_old" ]]; then
- (cd "$root" && update-source-version vivaldi-ffmpeg-codecs "$chromium_version")
+mapfile -t ffmpeg_prefetch < <(nix-prefetch-url --print-path "$ffmpeg_url")
+ffmpeg_hash=${ffmpeg_prefetch[0]}
+ffmpeg_path=${ffmpeg_prefetch[1]}
+
+if [[ "$ffmpeg_version" != "$ffmpeg_version_old" ]]; then
+ (cd "$root" && update-source-version vivaldi-ffmpeg-codecs "$ffmpeg_version" "$ffmpeg_hash" "$ffmpeg_url")
git add "${ffmpeg_nix}"
- git commit -m "vivaldi-ffmepg-codecs: $chromium_version_old -> $chromium_version"
+ git commit -m "vivaldi-ffmpeg-codecs: $ffmpeg_version_old -> $ffmpeg_version"
+fi
+
+# Check widevine version.
+widevine_version_old=$(version vivaldi-widevine)
+widevine_version=$(bsdtar xOf "$path" data.tar.xz | bsdtar xOf - ./opt/vivaldi/update-widevine | sed -n -e "s/^WIDEVINE_VERSION=\(.*\)/\1/p")
+
+if [[ "$widevine_version" != "$widevine_version_old" ]]; then
+ (cd "$root" && update-source-version vivaldi-widevine "$widevine_version")
+ git add "${widevine_nix}"
+ git commit -m "vivaldi-widevine: $widevine_version_old -> $widevine_version"
fi
|
I don't recall the reason I originally changed it for but I would assume it would have to do with the fact I usually use snapshots and when I extracted the version the link was dead for some reason at the time. I'll change it back. |
b1159b4
to
955dfa3
Compare
Sorry, I keep bumping it up again, but is this PR ready to be merged of there is still work to be done? |
@GrahamcOfBorg build exodus vivaldi-ffmpeg-codecs vivaldi-widevine |
I'll just assume Widevine is correctly installed since I still can't seem to be able to watch Twitch streams. Widevine changes are mainly to fix the metadata issues in
ffmpeg changes are just fixing it so the file appears in the directory correctly
so this PR should be fine now. |
So it can be merged? ;) |
If nothing else is blocking, then yeah. |
Vivaldi 2.11 is there ;) |
Don't know whether it's this PR or the updates to vivaldi but Twitch seems to work now. |
@GrahamcOfBorg build exodus vivaldi-ffmpeg-codecs vivaldi-widevine |
seems like this is in a usable state, going to re-verify that it builds on master then merge |
Doesn't align with the stable version but it's looking like these changes are needed for when 2.9 is released.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @