summary refs log tree commit diff
path: root/pkgs/misc/sndio/default.nix
blob: c415714f573cf62962ba4859516b8c99247f9133 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchurl, alsaLib }:

stdenv.mkDerivation rec {
  pname = "sndio";
  version = "1.6.0";
  enableParallelBuilding = true;
  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 ''
    install_name_tool -id $out/lib/libsndio.7.0.dylib $out/lib/libsndio.7.0.dylib
    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";
    license = licenses.isc;
    maintainers = with maintainers; [ chiiruno ];
    platforms = platforms.all;
  };
}