From 713e7bb27be15293c65a386b18d46231dcc879d3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 11 Oct 2023 21:01:34 +0000 Subject: [PATCH 1/9] nv-codec-headers-12: 12.0.16.0 -> 12.1.14.0 --- pkgs/development/libraries/nv-codec-headers/12_x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nv-codec-headers/12_x.nix b/pkgs/development/libraries/nv-codec-headers/12_x.nix index 1ad0076eeb20..dcbb34e33cdb 100644 --- a/pkgs/development/libraries/nv-codec-headers/12_x.nix +++ b/pkgs/development/libraries/nv-codec-headers/12_x.nix @@ -5,12 +5,12 @@ stdenv.mkDerivation rec { pname = "nv-codec-headers"; - version = "12.0.16.0"; + version = "12.1.14.0"; src = fetchgit { url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git"; rev = "n${version}"; - sha256 = "sha256-8YZU9pb0kzat0JBVEotaZUkNicQvLNIrIyPU9KTTjwg="; + sha256 = "sha256-WJYuFmMGSW+B32LwE7oXv/IeTln6TNEeXSkquHh85Go="; }; makeFlags = [ From ebd5a51661ca98a205acac2e7fdbdb8f3a5cf4a9 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:41:02 -0300 Subject: [PATCH 2/9] ffmpeg: substitute sha256sum with hash --- pkgs/development/libraries/ffmpeg/4.nix | 2 +- pkgs/development/libraries/ffmpeg/5.nix | 2 +- pkgs/development/libraries/ffmpeg/6.nix | 2 +- pkgs/development/libraries/ffmpeg/generic.nix | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix index 8dc42dea247d..e57c0fcff5bc 100644 --- a/pkgs/development/libraries/ffmpeg/4.nix +++ b/pkgs/development/libraries/ffmpeg/4.nix @@ -1,6 +1,6 @@ import ./generic.nix { version = "4.4.4"; - sha256 = "sha256-Q8bkuF/1uJfqttJJoObnnLX3BEduv+qxsvOrVhMvRjA="; + hash = "sha256-Q8bkuF/1uJfqttJJoObnnLX3BEduv+qxsvOrVhMvRjA="; extraPatches = [ { name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch"; diff --git a/pkgs/development/libraries/ffmpeg/5.nix b/pkgs/development/libraries/ffmpeg/5.nix index a3ff054f1e60..68edb0fd37e4 100644 --- a/pkgs/development/libraries/ffmpeg/5.nix +++ b/pkgs/development/libraries/ffmpeg/5.nix @@ -1,6 +1,6 @@ import ./generic.nix { version = "5.1.3"; - sha256 = "sha256-twfJvANLQGO7TiyHPMPqApfHLFUlOGZTTIIGEnjyvuE="; + hash = "sha256-twfJvANLQGO7TiyHPMPqApfHLFUlOGZTTIIGEnjyvuE="; extraPatches = [ { name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch"; diff --git a/pkgs/development/libraries/ffmpeg/6.nix b/pkgs/development/libraries/ffmpeg/6.nix index 37bdf5b060f7..33cb0896ca3d 100644 --- a/pkgs/development/libraries/ffmpeg/6.nix +++ b/pkgs/development/libraries/ffmpeg/6.nix @@ -1,4 +1,4 @@ import ./generic.nix { version = "6.0"; - sha256 = "sha256-RVbgsafIbeUUNXmUbDQ03ZN42oaUo0njqROo7KOQgv0="; + hash = "sha256-RVbgsafIbeUUNXmUbDQ03ZN42oaUo0njqROo7KOQgv0="; } diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index e713ca1413fb..25f52e7069f6 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -1,4 +1,4 @@ -{ version, sha256, extraPatches ? [] }: +{ version, hash, extraPatches ? [] }: { lib, stdenv, buildPackages, removeReferencesTo, addOpenGLRunpath, pkg-config, perl, texinfo, yasm @@ -334,7 +334,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchgit { url = "https://git.ffmpeg.org/ffmpeg.git"; rev = "n${finalAttrs.version}"; - inherit sha256; + inherit hash; }; postPatch = '' From 319a37ebf52035d024806cf025407ec8656d8209 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:44:09 -0300 Subject: [PATCH 3/9] ffmpeg: sort external libraries --- pkgs/development/libraries/ffmpeg/generic.nix | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 25f52e7069f6..1e9230a3f101 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -179,8 +179,8 @@ */ , alsa-lib , bzip2 -, clang , celt +, clang , dav1d , fdk_aac , fontconfig @@ -188,27 +188,31 @@ , frei0r , fribidi , game-music-emu +, glslang , gnutls , gsm -, libjack2 +, intel-media-sdk , ladspaH , lame -, libass , libaom +, libass , libbluray , libbs2b , libcaca , libdc1394 -, libraw1394 , libdrm +, libGL +, libGLU , libiconv -, intel-media-sdk +, libjack2 , libmodplug , libmysofa , libogg , libopenmpt , libopus , libplacebo +, libpulseaudio +, libraw1394 , librsvg , libssh , libtensorflow @@ -223,41 +227,37 @@ , libwebp , libX11 , libxcb -, libXv , libXext , libxml2 -, xz +, libXv , nv-codec-headers , nv-codec-headers-11 -, openal , ocl-icd # OpenCL ICD +, openal , opencl-headers # OpenCL headers , opencore-amr -, libGL -, libGLU , openh264 , openjpeg -, libpulseaudio , rav1e -, svt-av1 , rtmpdump , samba , SDL2 , soxr , speex , srt +, svt-av1 , vid-stab , vo-amrwbenc +, vulkan-headers +, vulkan-loader , x264 , x265 , xavs , xvidcore +, xz , zeromq4 , zimg , zlib -, vulkan-headers -, vulkan-loader -, glslang /* * Darwin frameworks */ From 6c6a5062b7016f0c9262c25858183e4a0d96f78d Mon Sep 17 00:00:00 2001 From: arthsmn Date: Mon, 4 Dec 2023 08:03:57 -0300 Subject: [PATCH 4/9] ffmpeg: add arthsmn as a maintainer --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 1e9230a3f101..ef5ae6718e39 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -698,7 +698,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optional withUnfree unfreeRedistributable; pkgConfigModules = [ "libavutil" ]; platforms = platforms.all; - maintainers = with maintainers; [ atemu ]; + maintainers = with maintainers; [ atemu arthsmn ]; mainProgram = "ffmpeg"; }; }) From 3a9d9480cecb1102d86a941e67838ffe2ea72b92 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:47:26 -0300 Subject: [PATCH 5/9] ffmpeg: 6.0 -> 6.1 --- pkgs/development/libraries/ffmpeg/6.nix | 4 ++-- pkgs/development/libraries/ffmpeg/generic.nix | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/6.nix b/pkgs/development/libraries/ffmpeg/6.nix index 33cb0896ca3d..62d3919c0646 100644 --- a/pkgs/development/libraries/ffmpeg/6.nix +++ b/pkgs/development/libraries/ffmpeg/6.nix @@ -1,4 +1,4 @@ import ./generic.nix { - version = "6.0"; - hash = "sha256-RVbgsafIbeUUNXmUbDQ03ZN42oaUo0njqROo7KOQgv0="; + version = "6.1"; + hash = "sha256-NzhD2D16bCVCyCXo0TRwZYp3Ta5eFSfoQPa+iRkeNZg="; } diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index ef5ae6718e39..5ae6469c7435 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -27,6 +27,7 @@ # Feature flags , withAlsa ? withHeadlessDeps && stdenv.isLinux # Alsa in/output supporT , withAom ? withFullDeps # AV1 reference encoder +, withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer , withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering , withBluray ? withFullDeps # BluRay reading , withBs2b ? withFullDeps # bs2b DSP library @@ -195,6 +196,7 @@ , ladspaH , lame , libaom +, libaribcaption , libass , libbluray , libbs2b @@ -231,7 +233,7 @@ , libxml2 , libXv , nv-codec-headers -, nv-codec-headers-11 +, nv-codec-headers-12 , ocl-icd # OpenCL ICD , openal , opencl-headers # OpenCL headers @@ -344,10 +346,6 @@ stdenv.mkDerivation (finalAttrs: { --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1 substituteInPlace doc/filters.texi \ --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1 - '' + lib.optionalString withVulkan '' - # FIXME: horrible hack, remove for next release - substituteInPlace libavutil/hwcontext_vulkan.c \ - --replace VK_EXT_VIDEO_DECODE VK_KHR_VIDEO_DECODE ''; patches = map (patch: fetchpatch patch) (extraPatches @@ -441,6 +439,8 @@ stdenv.mkDerivation (finalAttrs: { * External libraries */ (enableFeature withAlsa "alsa") + # FIXME: see if jellyfin-ffmpeg is already on a version >= 6.1 to use enableFeature + (optionalString withAribcaption "--enable-libaribcaption") (enableFeature withBzlib "bzlib") (enableFeature withCelt "libcelt") (enableFeature withCuda "cuda") @@ -553,9 +553,10 @@ stdenv.mkDerivation (finalAttrs: { # TODO This was always in buildInputs before, why? buildInputs = optionals withFullDeps [ libdc1394 ] ++ optionals (withFullDeps && !stdenv.isDarwin) [ libraw1394 ] # TODO where does this belong to - ++ optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast version "6") then nv-codec-headers-11 else nv-codec-headers) ] + ++ optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast version "6") then nv-codec-headers-12 else nv-codec-headers) ] ++ optionals withAlsa [ alsa-lib ] ++ optionals withAom [ libaom ] + ++ optionals withAribcaption [ libaribcaption ] ++ optionals withAss [ libass ] ++ optionals withBluray [ libbluray ] ++ optionals withBs2b [ libbs2b ] From b96d3a4f6c96d375dce7a020e908911013a499ab Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:49:37 -0300 Subject: [PATCH 6/9] jellyfin-ffmpeg: 6.0-7 -> 6.0.1-1 --- pkgs/development/libraries/jellyfin-ffmpeg/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix index ff2fca37fba4..5ae590c1a454 100644 --- a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix +++ b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix @@ -1,21 +1,18 @@ { ffmpeg_6-full -, nv-codec-headers-12 , chromaprint , fetchFromGitHub , lib }: -(ffmpeg_6-full.override { - nv-codec-headers-11 = nv-codec-headers-12; -}).overrideAttrs (old: rec { +ffmpeg_6-full.overrideAttrs (old: rec { pname = "jellyfin-ffmpeg"; - version = "6.0-7"; + version = "6.0.1-1"; src = fetchFromGitHub { owner = "jellyfin"; repo = "jellyfin-ffmpeg"; rev = "v${version}"; - sha256 = "sha256-Z4getn/mVYIRANkIOyt7jMpcqHBvq5GXLK/ST5zV1r4="; + hash = "sha256-LMwGxx++z6TpZLnpeRGraid4653Mp8T4pY5EP4Z7GXY="; }; buildInputs = old.buildInputs ++ [ chromaprint ]; From 10ea6439961e0d1090e9d818451806221d502976 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:51:31 -0300 Subject: [PATCH 7/9] mpd: fix build with ffmpeg 6.1 --- pkgs/servers/mpd/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index 11ea7716c630..a6fd225e5c58 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, glib, systemd, boost, fmt, buildPackages +{ lib, stdenv, fetchFromGitHub, fetchpatch, meson, ninja, pkg-config, glib, systemd, boost, fmt, buildPackages # Darwin inputs , AudioToolbox, AudioUnit # Inputs @@ -148,6 +148,15 @@ let depsBuildBuild = [ buildPackages.stdenv.cc ]; + # FIXME: see if it's still necessary and remove on next release + patches = [ + (fetchpatch { + url = "https://github.com/MusicPlayerDaemon/MPD/commit/50c1e3738a672f933560247b5527d365d17b1c02.patch"; + hash = "sha256-99XL3Yb1f9yrD0p+Ssn1HfAHrVoO/ky6bp3e1n1+yvg="; + excludes = [ "NEWS" ]; + }) + ]; + postPatch = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") '' substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \ --replace kAudioObjectPropertyElement{Main,Master} \ From 41d6390f917dded4952337ea4abeb007d3930d7c Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:52:44 -0300 Subject: [PATCH 8/9] wl-screenrec: fix build by setting ffmpeg to version 5 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a47288afcc1..a937b944f9e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4826,7 +4826,9 @@ with pkgs; wl-mirror = callPackage ../tools/wayland/wl-mirror { }; - wl-screenrec = callPackage ../tools/wayland/wl-screenrec { }; + wl-screenrec = callPackage ../tools/wayland/wl-screenrec { + ffmpeg = ffmpeg_5; + }; wleave = callPackage ../tools/wayland/wleave { }; From 180fad87322929dcef29cd3b1890b5218ec944a6 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Sun, 3 Dec 2023 15:53:16 -0300 Subject: [PATCH 9/9] gifski: fix build by setting ffmpeg to version 5 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a937b944f9e9..ff10294b6c76 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8545,7 +8545,9 @@ with pkgs; gifsicle = callPackage ../tools/graphics/gifsicle { }; - gifski = callPackage ../tools/graphics/gifski { }; + gifski = callPackage ../tools/graphics/gifski { + ffmpeg = ffmpeg_5; + }; github-backup = callPackage ../tools/misc/github-backup { };