about summary refs log tree commit diff
path: root/pkgs/misc/sndio
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-10-26 09:00:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2019-10-26 09:00:00 -0500
commit5bb2426dbeef8c64ec56f5985c15e14b069bf2f6 (patch)
tree0258ab5ec9bea55eb6ebfdb25ede5f07b730ded2 /pkgs/misc/sndio
parent03470789498a3a6b5ea4e525d06191815a0978f7 (diff)
sndio: fix build on darwin
Diffstat (limited to 'pkgs/misc/sndio')
-rw-r--r--pkgs/misc/sndio/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/misc/sndio/default.nix b/pkgs/misc/sndio/default.nix
index 1993b4bcce405..0f09483a8571c 100644
--- a/pkgs/misc/sndio/default.nix
+++ b/pkgs/misc/sndio/default.nix
@@ -4,13 +4,19 @@ stdenv.mkDerivation rec {
   pname = "sndio";
   version = "1.6.0";
   enableParallelBuilding = true;
-  buildInputs = [ alsaLib ];
+  buildInputs = stdenv.lib.optionals stdenv.isLinux [ alsaLib ];
 
   src = fetchurl {
     url = "http://www.sndio.org/sndio-${version}.tar.gz";
     sha256 = "1havdx3q4mipgddmd2bnygr1yh6y64567m1yqwjapkhsq550dq4r";
   };
 
+  postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    for file in $out/bin/*; do
+      install_name_tool -change libsndio.7.0.dylib $out/lib/libsndio.dylib $file
+    done
+  '';
+
   meta = with stdenv.lib; {
     homepage = "http://www.sndio.org";
     description = "Small audio and MIDI framework part of the OpenBSD project";