From 68ef56b572974816c2d3a88ffcdfcb83ceea5ebd Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 20 Jul 2024 19:13:32 +0000 Subject: [PATCH] mpv/ffmpeg: consolidate the different ffmpeg configs into overlays/preferences --- hosts/common/programs/kdenlive.nix | 7 ------- hosts/common/programs/mpv/default.nix | 5 ++++- overlays/preferences.nix | 9 +++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hosts/common/programs/kdenlive.nix b/hosts/common/programs/kdenlive.nix index 361e5c0fd..66c6e2be5 100644 --- a/hosts/common/programs/kdenlive.nix +++ b/hosts/common/programs/kdenlive.nix @@ -1,13 +1,6 @@ { pkgs, ... }: { sane.programs.kdenlive = { - packageUnwrapped = pkgs.kdenlive.override { - ffmpeg-full = pkgs.ffmpeg-full.override { - # avoid expensive samba build for a feature i don't use - withSamba = false; - }; - }; - buildCost = 1; sandbox.method = "bwrap"; diff --git a/hosts/common/programs/mpv/default.nix b/hosts/common/programs/mpv/default.nix index 271317cfc..885ab09b9 100644 --- a/hosts/common/programs/mpv/default.nix +++ b/hosts/common/programs/mpv/default.nix @@ -146,7 +146,10 @@ in # i think using `luajit` here instead of `lua` is optional, just i get better perf with it :) lua = pkgs.luajit.override { enable52Compat = true; self = lua; }; # ship a ffmpeg with sofa enabled, for surround-sound downmixing - ffmpeg = pkgs.ffmpeg-full; + # ffmpeg = pkgs.ffmpeg-full; + ffmpeg = pkgs.ffmpeg.override { + withMysofa = true; + }; }; scripts = [ pkgs.mpvScripts.mpris diff --git a/overlays/preferences.nix b/overlays/preferences.nix index 6c2e3ff1a..507bf6d21 100644 --- a/overlays/preferences.nix +++ b/overlays/preferences.nix @@ -13,6 +13,15 @@ enableOAuth2 = false; }; + ffmpeg = super.ffmpeg.override { + # required by mpv for spatial audio; enable it globally to avoid shipping many ffmpegs + withMysofa = true; + }; + ffmpeg-full = super.ffmpeg-full.override { + # saves 20 minutes of build time and cross issues, for unused feature + withSamba = false; + }; + gnome = super.gnome.overrideScope (gself: gsuper: with gself; { gnome-control-center = gsuper.gnome-control-center.override { # i build goa without the "backend", to avoid webkit_4_1.