diff --git a/nixos/modules/services/desktops/pipewire/bluez-hardware.conf.json b/nixos/modules/services/desktops/pipewire/bluez-hardware.conf.json deleted file mode 100644 index e5e7517e38d4..000000000000 --- a/nixos/modules/services/desktops/pipewire/bluez-hardware.conf.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "bluez5.features.device": [ - { - "name": "Air 1 Plus", - "no-features": [ - "hw-volume-mic" - ] - }, - { - "name": "AirPods", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "name": "AirPods Pro", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "name": "AXLOIE Goin", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "name": "BAA 100", - "no-features": [ - "hw-volume" - ] - }, - { - "name": "D50s", - "address": "~^00:13:ef:", - "no-features": [ - "hw-volume" - ] - }, - { - "name": "JBL Endurance RUN BT", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl", - "sbc-xq" - ] - }, - { - "name": "JBL LIVE650BTNC" - }, - { - "name": "Motorola DC800", - "no-features": [ - "sbc-xq" - ] - }, - { - "name": "Motorola S305", - "no-features": [ - "sbc-xq" - ] - }, - { - "name": "Soundcore Life P2-L", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "name": "Urbanista Stockholm Plus", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "address": "~^94:16:25:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^9c:64:8b:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^a0:e9:db:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^0c:a6:94:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:14:02:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^44:5e:f3:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^d4:9c:28:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:18:6b:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^b8:ad:3e:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^a0:e9:db:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:24:1c:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:11:b1:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^a4:15:66:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:14:f1:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^00:26:7e:", - "no-features": [ - "hw-volume" - ] - }, - { - "address": "~^90:03:b7:", - "no-features": [ - "hw-volume" - ] - } - ], - "bluez5.features.adapter": [ - { - "bus-type": "usb", - "vendor-id": "usb:0bda" - }, - { - "bus-type": "usb", - "no-features": [ - "msbc-alt1-rtl" - ] - }, - { - "no-features": [ - "msbc-alt1-rtl" - ] - } - ], - "bluez5.features.kernel": [ - { - "sysname": "Linux", - "release": "~^[0-4]\\.", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.[1-7]\\.", - "no-features": [ - "msbc-alt1", - "msbc-alt1-rtl" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.(8|9)\\.", - "no-features": [ - "msbc-alt1" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.10\\.(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|51|52|53|54|55|56|57|58|59|60|61)($|[^0-9])", - "no-features": [ - "msbc-alt1" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.12\\.(18|19)($|[^0-9])", - "no-features": [ - "msbc-alt1" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.13\\.(3|4|5|6|7|8|9|10|11|12|13)($|[^0-9])", - "no-features": [ - "msbc-alt1" - ] - }, - { - "sysname": "Linux", - "release": "~^5\\.14($|[^0-9])", - "no-features": [ - "msbc-alt1" - ] - }, - { - "no-features": [] - } - ] -} diff --git a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix index 41ab995e3292..17a2d49bb1f3 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix @@ -15,7 +15,6 @@ let defaults = { alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json)); bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json)); - bluez-hardware = (builtins.fromJSON (builtins.readFile ./bluez-hardware.conf.json)); media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json)); v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json)); }; @@ -23,7 +22,6 @@ let configs = { alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor; bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor; - bluez-hardware = defaults.bluez-hardware; media-session = recursiveUpdate defaults.media-session cfg.config.media-session; v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor; }; @@ -122,10 +120,6 @@ in { mkIf config.services.pipewire.pulse.enable { source = json.generate "bluez-monitor.conf" configs.bluez-monitor; }; - environment.etc."pipewire/media-session.d/bluez-hardware.conf" = - mkIf config.services.pipewire.pulse.enable { - source = json.generate "bluez-hardware.conf" configs.bluez-hardware; - }; environment.etc."pipewire/media-session.d/with-jack" = mkIf config.services.pipewire.jack.enable { diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index 90a946597e77..506a626e7c86 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -19,12 +19,12 @@ stdenv.mkDerivation { pname = "libcamera"; - version = "unstable-2021-06-02"; + version = "unstable-2021-09-24"; src = fetchgit { - url = "git://linuxtv.org/libcamera.git"; - rev = "143b252462b9b795a1286a30349348642fcb87f5"; - sha256 = "0mlwgd3rxagzhmc94lnn6snriyqvfdpz8r8f58blcf16859galyl"; + url = "https://git.libcamera.org/libcamera/libcamera.git"; + rev = "40f5fddca7f774944a53f58eeaebc4db79c373d8"; + sha256 = "0jklgdv5ma4nszxibms5lkf5d2ips7ncynwa1flglrhl5bl4wkzz"; }; postPatch = '' diff --git a/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch b/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch index d3851604a131..ea968e28ea89 100644 --- a/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch +++ b/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch @@ -1,5 +1,5 @@ diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in -index 95632c250..a88aac6e2 100644 +index 648e13069..50f767f0c 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -131,7 +131,7 @@ context.modules = [ @@ -15,8 +15,8 @@ index 95632c250..a88aac6e2 100644 # but it is better to start it as a systemd service. # Run the session manager with -h for options. # -- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" } -+ @sm_comment@{ path = "" args = "@session_manager_args@" } +- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" } ++ @sm_comment@{ path = "" args = "@session_manager_args@" } # # You can optionally start the pulseaudio-server here as well # but it is better to start it as a systemd service. diff --git a/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch b/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch new file mode 100644 index 000000000000..d8241a809f65 --- /dev/null +++ b/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch @@ -0,0 +1,12 @@ +diff --git a/meson.build b/meson.build +index 56599ebd1..3bed2d3e3 100644 +--- a/meson.build ++++ b/meson.build +@@ -54,7 +54,7 @@ else + endif + + spa_plugindir = pipewire_libdir / spa_name +-spa_datadir = pipewire_datadir / spa_name ++spa_datadir = pipewire_libdir / spa_name + + alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer' diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 0ada18539984..96040bf9e6b6 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -24,10 +24,14 @@ , vulkan-loader , webrtc-audio-processing , ncurses +, readline81 # meson can't find <7 as those versions don't have a .pc file , makeFontsConf , callPackage , nixosTests , withMediaSession ? true +, libcameraSupport ? true +, libcamera +, libdrm , gstreamerSupport ? true , gst_all_1 ? null , ffmpegSupport ? true @@ -58,7 +62,7 @@ let self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.36"; + version = "0.3.38"; outputs = [ "out" @@ -77,7 +81,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-kwoffB0Hi84T4Q0NaxLxsCyPV4R0LayX9kHmXU/vRPA="; + sha256 = "sha256-QENz4MVyKuPJynA+NBdmKa6g1GrcRg9vzXLJ1/i3VJU="; }; patches = [ @@ -93,6 +97,8 @@ let ./0080-pipewire-config-dir.patch # Remove output paths from the comments in the config templates to break dependency cycles ./0090-pipewire-config-template-paths.patch + # Place SPA data files in lib output to avoid dependency cycles + ./0095-spa-data-dir.patch ]; nativeBuildInputs = [ @@ -113,6 +119,7 @@ let libusb1 libsndfile ncurses + readline81 udev vulkan-headers vulkan-loader @@ -121,6 +128,7 @@ let SDL2 systemd ] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ] + ++ lib.optionals libcameraSupport [ libcamera libdrm ] ++ lib.optional ffmpegSupport ffmpeg ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ] ++ lib.optional pulseTunnelSupport libpulseaudio @@ -128,14 +136,13 @@ let mesonFlags = [ "-Ddocs=enabled" - "-Dexamples=${mesonEnable withMediaSession}" # only needed for `pipewire-media-session` "-Dudevrulesdir=lib/udev/rules.d" "-Dinstalled_tests=enabled" "-Dinstalled_test_prefix=${placeholder "installedTests"}" "-Dpipewire_pulse_prefix=${placeholder "pulse"}" "-Dmedia-session-prefix=${placeholder "mediaSession"}" "-Dlibjack-path=${placeholder "jack"}/lib" - "-Dlibcamera=disabled" + "-Dlibcamera=${mesonEnable libcameraSupport}" "-Droc=disabled" "-Dlibpulse=${mesonEnable pulseTunnelSupport}" "-Davahi=${mesonEnable zeroconfSupport}"