From 3c0d96a18dbf5fa018e580a69b88e6c5e952235e Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 21 Sep 2022 03:56:07 +0200 Subject: [PATCH] openalSoft: remove leaked reference to pipewire.dev output The compiled library ends up containing a path to a pipewire.dev header file, which is an unnecessary reference. Manually get rid of it. --- pkgs/development/libraries/openal-soft/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix index fa1d5af48042..05fcee876f29 100644 --- a/pkgs/development/libraries/openal-soft/default.nix +++ b/pkgs/development/libraries/openal-soft/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config +{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, removeReferencesTo , alsaSupport ? !stdenv.isDarwin, alsa-lib , dbusSupport ? !stdenv.isDarwin, dbus , pipewireSupport ? !stdenv.isDarwin, pipewire @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { strictDeps = true; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ cmake pkg-config removeReferencesTo ]; buildInputs = lib.optional alsaSupport alsa-lib ++ lib.optional dbusSupport dbus @@ -44,6 +44,10 @@ stdenv.mkDerivation rec { "-DOSS_INCLUDE_DIR=${stdenv.cc.libc}/include" ]; + postInstall = lib.optional pipewireSupport '' + remove-references-to -t ${pipewire.dev} $(readlink -f $out/lib/*.so) + ''; + meta = with lib; { description = "OpenAL alternative"; homepage = "https://kcat.strangesoft.net/openal.html";