qtscrcpy: switch to latest ffmpeg#357575
Conversation
emilazy
left a comment
There was a problem hiding this comment.
Thanks. I take it FFmpeg 7 fails? Do you have the error message?
No but the higher the upgrade, the more breaking changes there should be. |
|
We are trying to move away from these old FFmpeg versions entirely. Arch, for instance, ships FFmpeg 4 for compatibility with a few (mostly binary) packages, and FFmpeg 7, but no FFmpeg 6. Old versions should only be pinned where there is a compatibility issue and it is not possible to get a patch from upstream or another distro; please see the advice in See also the prior work: |
|
This builds: diff --git a/pkgs/by-name/qt/qtscrcpy/package.nix b/pkgs/by-name/qt/qtscrcpy/package.nix
index 88f13a04d0..88b6f36132 100644
--- a/pkgs/by-name/qt/qtscrcpy/package.nix
+++ b/pkgs/by-name/qt/qtscrcpy/package.nix
@@ -7,7 +7,7 @@
libsForQt5,
scrcpy,
android-tools,
- ffmpeg_4,
+ ffmpeg,
makeDesktopItem,
copyDesktopItems,
}:
@@ -49,6 +49,8 @@
substituteInPlace QtScrcpy/sndcpy/sndcpy.sh \
--replace-fail 'ADB=./adb' "ADB=${lib.getExe' android-tools "adb"}" \
--replace-fail 'SNDCPY_APK=sndcpy.apk' "SNDCPY_APK=$out/share/qtscrcpy/sndcpy.apk"
+ substituteInPlace QtScrcpy/QtScrcpyCore/src/device/decoder/decoder.cpp \
+ --replace-fail 'avcodec_close(m_codecCtx);' ""
'';
nativeBuildInputs = [
@@ -61,7 +63,7 @@
buildInputs =
[
scrcpy
- ffmpeg_4
+ ffmpeg
]
++ (with libsForQt5; [
qtbaseThe deprecated |
Per the request of #340257 (comment). Tested and seems nothing broken.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.