Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/development/libraries/ffmpeg/4.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/ffmpeg/5.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/ffmpeg/6.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./generic.nix {
version = "6.0";
sha256 = "sha256-RVbgsafIbeUUNXmUbDQ03ZN42oaUo0njqROo7KOQgv0=";
version = "6.1";
hash = "sha256-NzhD2D16bCVCyCXo0TRwZYp3Ta5eFSfoQPa+iRkeNZg=";
}
49 changes: 25 additions & 24 deletions pkgs/development/libraries/ffmpeg/generic.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ version, sha256, extraPatches ? [] }:
{ version, hash, extraPatches ? [] }:

{ lib, stdenv, buildPackages, removeReferencesTo, addOpenGLRunpath, pkg-config, perl, texinfo, yasm

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -179,36 +180,41 @@
*/
, alsa-lib
, bzip2
, clang
, celt
, clang
, dav1d
, fdk_aac
, fontconfig
, freetype
, frei0r
, fribidi
, game-music-emu
, glslang
, gnutls
, gsm
, libjack2
, intel-media-sdk
, ladspaH
, lame
, libass
, libaom
, libaribcaption
, 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
Expand All @@ -223,41 +229,37 @@
, libwebp
, libX11
, libxcb
, libXv
, libXext
, libxml2
, xz
, libXv
, nv-codec-headers
, nv-codec-headers-11
, openal
, nv-codec-headers-12
, 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
*/
Expand Down Expand Up @@ -334,7 +336,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchgit {
url = "https://git.ffmpeg.org/ffmpeg.git";
rev = "n${finalAttrs.version}";
inherit sha256;
inherit hash;
};

postPatch = ''
Expand All @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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 ]
Expand Down Expand Up @@ -698,7 +699,7 @@ stdenv.mkDerivation (finalAttrs: {
++ optional withUnfree unfreeRedistributable;
pkgConfigModules = [ "libavutil" ];
platforms = platforms.all;
maintainers = with maintainers; [ atemu ];
maintainers = with maintainers; [ atemu arthsmn ];
mainProgram = "ffmpeg";
};
})
9 changes: 3 additions & 6 deletions pkgs/development/libraries/jellyfin-ffmpeg/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/nv-codec-headers/12_x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
11 changes: 10 additions & 1 deletion pkgs/servers/mpd/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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} \
Expand Down
8 changes: 6 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand Down Expand Up @@ -8543,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 { };

Expand Down