diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
commit | a5e1520e4538e29ecfbd4b168306f890566d7bfd (patch) | |
tree | 28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/pipewire | |
parent | 822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff) | |
parent | 3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff) | |
download | nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2 nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/pipewire')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/pipewire/default.nix | 281 |
1 files changed, 136 insertions, 145 deletions
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/default.nix b/nixpkgs/pkgs/development/libraries/pipewire/default.nix index fa5cb97b214f..4cfcf9b3a6d8 100644 --- a/nixpkgs/pkgs/development/libraries/pipewire/default.nix +++ b/nixpkgs/pkgs/development/libraries/pipewire/default.nix @@ -1,8 +1,6 @@ { stdenv , lib -, buildPackages , fetchFromGitLab -, fetchpatch , python3 , meson , ninja @@ -28,7 +26,6 @@ , readline # meson can't find <7 as those versions don't have a .pc file , lilv , makeFontsConf -, callPackage , nixosTests , withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind , valgrind @@ -76,147 +73,141 @@ # Bluetooth codec only makes sense if general bluetooth enabled assert ldacbtSupport -> bluezSupport; -let - mesonEnableFeature = b: if b then "enabled" else "disabled"; - - self = stdenv.mkDerivation rec { - pname = "pipewire"; - version = "1.0.0"; - - outputs = [ - "out" - "jack" - "dev" - "doc" - "man" - "installedTests" - ]; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "pipewire"; - repo = "pipewire"; - rev = version; - sha256 = "sha256-mfnMluxJAxDbB6JlIM6HJ0zg7e1q3ia3uFbht6zeHCk="; - }; - - patches = [ - # Load libjack from a known location - ./0060-libjack-path.patch - # Move installed tests into their own output. - ./0070-installed-tests-path.patch - ]; - - strictDeps = true; - nativeBuildInputs = [ - docutils - doxygen - graphviz - meson - ninja - pkg-config - python3 - glib - ]; - - buildInputs = [ - alsa-lib - dbus - glib - libjack2 - libusb1 - libselinux - libsndfile - lilv - ncurses - readline - udev - vulkan-headers - vulkan-loader - tinycompress - ] ++ (if enableSystemd then [ systemd ] else [ eudev ]) - ++ (if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then [ webrtc-audio-processing_1 ] else [ webrtc-audio-processing ]) - ++ 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 liblc3 sbc fdk_aac libopus ] - ++ lib.optional ldacbtSupport ldacbt - ++ lib.optional nativeModemManagerSupport modemmanager - ++ lib.optional pulseTunnelSupport libpulseaudio - ++ lib.optional zeroconfSupport avahi - ++ lib.optional raopSupport openssl - ++ lib.optional rocSupport roc-toolkit - ++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ] - ++ lib.optional mysofaSupport libmysofa - ++ lib.optional ffadoSupport ffado; - - # Valgrind binary is required for running one optional test. - nativeCheckInputs = lib.optional withValgrind valgrind; - - mesonFlags = [ - "-Ddocs=enabled" - "-Dudevrulesdir=lib/udev/rules.d" - "-Dinstalled_tests=enabled" - "-Dinstalled_test_prefix=${placeholder "installedTests"}" - "-Dlibjack-path=${placeholder "jack"}/lib" - "-Dlibcamera=${mesonEnableFeature libcameraSupport}" - "-Dlibffado=${mesonEnableFeature ffadoSupport}" - "-Droc=${mesonEnableFeature rocSupport}" - "-Dlibpulse=${mesonEnableFeature pulseTunnelSupport}" - "-Davahi=${mesonEnableFeature zeroconfSupport}" - "-Dgstreamer=${mesonEnableFeature gstreamerSupport}" - "-Dsystemd-system-service=${mesonEnableFeature enableSystemd}" - "-Dudev=${mesonEnableFeature (!enableSystemd)}" - "-Dffmpeg=${mesonEnableFeature ffmpegSupport}" - "-Dbluez5=${mesonEnableFeature bluezSupport}" - "-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}" - "-Dbluez5-backend-hfp-native=${mesonEnableFeature nativeHfpSupport}" - "-Dbluez5-backend-native-mm=${mesonEnableFeature nativeModemManagerSupport}" - "-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}" - "-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}" - # source code is not easily obtainable - "-Dbluez5-codec-lc3plus=disabled" - "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}" - "-Dbluez5-codec-ldac=${mesonEnableFeature ldacbtSupport}" - "-Dsysconfdir=/etc" - "-Draop=${mesonEnableFeature raopSupport}" - "-Dsession-managers=" - "-Dvulkan=enabled" - "-Dx11=${mesonEnableFeature x11Support}" - "-Dx11-xfixes=${mesonEnableFeature x11Support}" - "-Dlibcanberra=${mesonEnableFeature x11Support}" - "-Dlibmysofa=${mesonEnableFeature mysofaSupport}" - "-Dsdl2=disabled" # required only to build examples, causes dependency loop - "-Drlimits-install=false" # installs to /etc, we won't use this anyway - "-Dcompress-offload=enabled" - "-Dman=enabled" - ]; - - # Fontconfig error: Cannot load default config file - FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; - - doCheck = true; - - postUnpack = '' - patchShebangs source/doc/*.py - patchShebangs source/doc/input-filter-h.sh - ''; - - postInstall = '' - moveToOutput "bin/pw-jack" "$jack" - ''; - - passthru.tests.installed-tests = nixosTests.installed-tests.pipewire; - - meta = with lib; { - description = "Server and user space API to deal with multimedia pipelines"; - changelog = "https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/${version}"; - homepage = "https://pipewire.org/"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ kranzes k900 ]; - }; +stdenv.mkDerivation(finalAttrs: { + pname = "pipewire"; + version = "1.0.3"; + + outputs = [ + "out" + "jack" + "dev" + "doc" + "man" + "installedTests" + ]; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "pipewire"; + repo = "pipewire"; + rev = finalAttrs.version; + sha256 = "sha256-QVw7Q+RNo8BBy/uxoZeSQQn/vQcIl1bOiA9fYMR0+oI="; }; -in -self + patches = [ + # Load libjack from a known location + ./0060-libjack-path.patch + # Move installed tests into their own output. + ./0070-installed-tests-path.patch + ]; + + strictDeps = true; + nativeBuildInputs = [ + docutils + doxygen + graphviz + meson + ninja + pkg-config + python3 + glib + ]; + + buildInputs = [ + alsa-lib + dbus + glib + libjack2 + libusb1 + libselinux + libsndfile + lilv + ncurses + readline + udev + vulkan-headers + vulkan-loader + tinycompress + ] ++ (if enableSystemd then [ systemd ] else [ eudev ]) + ++ (if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then [ webrtc-audio-processing_1 ] else [ webrtc-audio-processing ]) + ++ 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 liblc3 sbc fdk_aac libopus ] + ++ lib.optional ldacbtSupport ldacbt + ++ lib.optional nativeModemManagerSupport modemmanager + ++ lib.optional pulseTunnelSupport libpulseaudio + ++ lib.optional zeroconfSupport avahi + ++ lib.optional raopSupport openssl + ++ lib.optional rocSupport roc-toolkit + ++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ] + ++ lib.optional mysofaSupport libmysofa + ++ lib.optional ffadoSupport ffado; + + # Valgrind binary is required for running one optional test. + nativeCheckInputs = lib.optional withValgrind valgrind; + + mesonFlags = [ + (lib.mesonEnable "docs" true) + (lib.mesonOption "udevrulesdir" "lib/udev/rules.d") + (lib.mesonEnable "installed_tests" true) + (lib.mesonOption "installed_test_prefix" (placeholder "installedTests")) + (lib.mesonOption "libjack-path" "${placeholder "jack"}/lib") + (lib.mesonEnable "libcamera" libcameraSupport) + (lib.mesonEnable "libffado" ffadoSupport) + (lib.mesonEnable "roc" rocSupport) + (lib.mesonEnable "libpulse" pulseTunnelSupport) + (lib.mesonEnable "avahi" zeroconfSupport) + (lib.mesonEnable "gstreamer" gstreamerSupport) + (lib.mesonEnable "systemd-system-service" enableSystemd) + (lib.mesonEnable "udev" (!enableSystemd)) + (lib.mesonEnable "ffmpeg" ffmpegSupport) + (lib.mesonEnable "bluez5" bluezSupport) + (lib.mesonEnable "bluez5-backend-hsp-native" nativeHspSupport) + (lib.mesonEnable "bluez5-backend-hfp-native" nativeHfpSupport) + (lib.mesonEnable "bluez5-backend-native-mm" nativeModemManagerSupport) + (lib.mesonEnable "bluez5-backend-ofono" ofonoSupport) + (lib.mesonEnable "bluez5-backend-hsphfpd" hsphfpdSupport) + # source code is not easily obtainable + (lib.mesonEnable "bluez5-codec-lc3plus" false) + (lib.mesonEnable "bluez5-codec-lc3" bluezSupport) + (lib.mesonEnable "bluez5-codec-ldac" ldacbtSupport) + (lib.mesonOption "sysconfdir" "/etc") + (lib.mesonEnable "raop" raopSupport) + (lib.mesonOption "session-managers" "") + (lib.mesonEnable "vulkan" true) + (lib.mesonEnable "x11" x11Support) + (lib.mesonEnable "x11-xfixes" x11Support) + (lib.mesonEnable "libcanberra" x11Support) + (lib.mesonEnable "libmysofa" mysofaSupport) + (lib.mesonEnable "sdl2" false) # required only to build examples, causes dependency loop + (lib.mesonBool "rlimits-install" false) # installs to /etc, we won't use this anyway + (lib.mesonEnable "compress-offload" true) + (lib.mesonEnable "man" true) + ]; + + # Fontconfig error: Cannot load default config file + FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; + + doCheck = true; + + postUnpack = '' + patchShebangs source/doc/*.py + patchShebangs source/doc/input-filter-h.sh + ''; + + postInstall = '' + moveToOutput "bin/pw-jack" "$jack" + ''; + + passthru.tests.installed-tests = nixosTests.installed-tests.pipewire; + + meta = with lib; { + description = "Server and user space API to deal with multimedia pipelines"; + changelog = "https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/${version}"; + homepage = "https://pipewire.org/"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ kranzes k900 ]; + }; +}) |