2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, sndio, libbsd }:
|
2020-03-16 22:47:30 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "aucatctl";
|
|
|
|
version = "0.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.sndio.org/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "524f2fae47db785234f166551520d9605b9a27551ca438bd807e3509ce246cf0";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ sndio ]
|
2021-01-15 14:21:58 +01:00
|
|
|
++ lib.optional (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD)
|
2020-03-16 22:47:30 +01:00
|
|
|
libbsd;
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=("PREFIX=$out")
|
2021-01-15 14:21:58 +01:00
|
|
|
'' + lib.optionalString
|
2020-03-16 22:47:30 +01:00
|
|
|
(!stdenv.isDarwin && !stdenv.targetPlatform.isBSD) ''
|
|
|
|
makeFlagsArray+=(LDADD="-lsndio -lbsd")
|
|
|
|
|
|
|
|
# Fix warning about implicit declaration of function 'strlcpy'
|
|
|
|
substituteInPlace aucatctl.c \
|
|
|
|
--replace '#include <string.h>' '#include <bsd/string.h>'
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-03-16 22:47:30 +01:00
|
|
|
description =
|
|
|
|
"The aucatctl utility sends MIDI messages to control sndiod and/or aucat volumes";
|
|
|
|
homepage = "http://www.sndio.org";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ sna ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|