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
42 changes: 42 additions & 0 deletions pkgs/by-name/li/libldac-dec/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
nix-update-script,
}:

stdenv.mkDerivation {
pname = "libldac-dec";
version = "0.0.2-unstable-2024-11-12";

src = fetchFromGitHub {
owner = "O2C14";
repo = "libldac-dec";
rev = "8c15f53b97c8322c18cff3fddf6d7129dbd3d349";
hash = "sha256-pdeEtQXxL2pd9qTfLOEmPDn3POgo5qxRqbK807WN98s=";
};

nativeBuildInputs = [ cmake ];

# Upstream CMakeLists.txt doesn't have install rules
postPatch = ''
cat >> CMakeLists.txt <<'EOF'
install(TARGETS ldacBT_dec LIBRARY DESTINATION ''${CMAKE_INSTALL_LIBDIR})
EOF
'';

cmakeFlags = [
"-DCMAKE_INSTALL_LIBDIR=lib"
];

passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

meta = {
description = "LDAC decoding library implemented in another way";
homepage = "https://github.com/O2C14/libldac-dec";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ qweered ];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
libcamera,
libdrm,
gst_all_1,
ffmpeg,
# ffmpeg depends on SDL2 which depends on pipewire by default.
# Break the cycle by depending on ffmpeg-headless.
# Pipewire only uses libavcodec (via an SPA plugin), which isn't
# affected by the *-headless changes.
ffmpeg-headless,
fftwFloat,
bluezSupport ? stdenv.hostPlatform.isLinux,
bluez,
Expand All @@ -47,8 +51,12 @@
fdk_aac,
libopus,
ldacbt,
libldac-dec,
spandsp,
modemmanager,
libpulseaudio,
onnxruntimeSupport ? false,
onnxruntime,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what is this used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to source code, for noise cancellation filter (filter-chain with ml model)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they ship a filter that can use this out of the box? Sounds like something we may want to enable?

zeroconfSupport ? true,
avahi,
raopSupport ? true,
Expand Down Expand Up @@ -80,7 +88,7 @@ in

stdenv.mkDerivation (finalAttrs: {
pname = "pipewire";
version = "1.4.10";
version = "1.6.0";

outputs = [
"out"
Expand All @@ -95,8 +103,8 @@ stdenv.mkDerivation (finalAttrs: {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "pipewire";
rev = finalAttrs.version;
sha256 = "sha256-/Av2iXWInsY6S+PdbfCm1AFtHEFt4LXhgRJ6r9lqOpM=";
tag = finalAttrs.version;
hash = "sha256-Xc5ouBvT8v0hA3lPfCjhCicoem0jk4knevj7LJJipJ4=";
};

patches = [
Expand All @@ -107,6 +115,8 @@ stdenv.mkDerivation (finalAttrs: {
];

strictDeps = true;
__structuredAttrs = true;

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
docutils
Expand All @@ -121,7 +131,7 @@ stdenv.mkDerivation (finalAttrs: {

buildInputs = [
dbus
ffmpeg
ffmpeg-headless
fftwFloat
glib
gst_all_1.gst-plugins-base
Expand Down Expand Up @@ -156,7 +166,10 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optional webrtcAudioProcessingSupport webrtc-audio-processing
++ lib.optional stdenv.hostPlatform.isLinux alsa-lib
++ lib.optional ldacbtSupport ldacbt
++ lib.optionals ldacbtSupport [
ldacbt
libldac-dec
]
++ lib.optional libcameraSupport libcamera
++ lib.optional zeroconfSupport avahi
++ lib.optional raopSupport openssl
Expand All @@ -178,9 +191,11 @@ stdenv.mkDerivation (finalAttrs: {
liblc3
sbc
fdk_aac
spandsp
]
++ lib.optional ffadoSupport ffado
++ lib.optional stdenv.hostPlatform.isLinux libselinux
++ lib.optional onnxruntimeSupport onnxruntime
++ lib.optional modemmanagerSupport modemmanager;

# Valgrind binary is required for running one optional test.
Expand Down Expand Up @@ -208,7 +223,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonEnable "avb" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "v4l2" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "pipewire-v4l2" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "systemd" enableSystemd)
(lib.mesonEnable "libsystemd" enableSystemd)
(lib.mesonEnable "systemd-system-service" enableSystemd)
(lib.mesonEnable "udev" (!enableSystemd && stdenv.hostPlatform.isLinux))
(lib.mesonEnable "ffmpeg" true)
Expand Down Expand Up @@ -237,6 +252,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonEnable "compress-offload" true)
(lib.mesonEnable "man" true)
(lib.mesonEnable "snap" false) # we don't currently have a working snapd
(lib.mesonEnable "onnxruntime" onnxruntimeSupport)
];

# Fontconfig error: Cannot load default config file
Expand All @@ -249,8 +265,9 @@ stdenv.mkDerivation (finalAttrs: {
patchShebangs doc/*.py
patchShebangs doc/input-filter-h.sh

# Remove installed-test that runs forever
# Remove problematic installed-tests
sed -i -e "/test-pipewire-alsa-stress/d" pipewire-alsa/tests/meson.build
sed -i -e "/benchmark-aec/d" spa/tests/meson.build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, what's wrong with this test? It worked for me.

Copy link
Contributor Author

@qweered qweered Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its failing for me in vm, and for @c6rg0 too

'';

postInstall = ''
Expand All @@ -272,6 +289,7 @@ stdenv.mkDerivation (finalAttrs: {
platforms = lib.platforms.linux ++ lib.platforms.freebsd;
maintainers = with lib.maintainers; [
k900
qweered
];
pkgConfigModules = [
"libpipewire-0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
enableGI ? true,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "wireplumber";
version = "0.5.13";

Expand All @@ -37,10 +37,13 @@ stdenv.mkDerivation rec {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "wireplumber";
rev = version;
tag = finalAttrs.version;
hash = "sha256-iQpMT01mRroaA48spA11zdb47L5AcVmigE4nJuJRaUo=";
};

strictDeps = true;
__structuredAttrs = true;

nativeBuildInputs = [
meson
pkg-config
Expand Down Expand Up @@ -90,6 +93,9 @@ stdenv.mkDerivation rec {
homepage = "https://pipewire.org";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ k900 ];
maintainers = with lib.maintainers; [
k900
qweered
];
};
}
})
10 changes: 0 additions & 10 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5284,16 +5284,6 @@ with pkgs;

pipx = with python3.pkgs; toPythonApplication pipx;

pipewire = callPackage ../development/libraries/pipewire {
# ffmpeg depends on SDL2 which depends on pipewire by default.
# Break the cycle by depending on ffmpeg-headless.
# Pipewire only uses libavcodec (via an SPA plugin), which isn't
# affected by the *-headless changes.
ffmpeg = ffmpeg-headless;
};

wireplumber = callPackage ../development/libraries/pipewire/wireplumber.nix { };

racket-minimal = callPackage ../by-name/ra/racket/minimal.nix {
stdenv = stdenvAdapters.makeStaticLibraries stdenv;
};
Expand Down
Loading