2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, sndio, libbsd }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "aucatctl";
|
|
|
|
version = "0.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "http://www.sndio.org/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "524f2fae47db785234f166551520d9605b9a27551ca438bd807e3509ce246cf0";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ sndio ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD)
|
2020-04-24 23:36:52 +00:00
|
|
|
libbsd;
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=("PREFIX=$out")
|
2021-01-17 00:15:33 +00:00
|
|
|
'' + lib.optionalString
|
2020-04-24 23:36:52 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "The aucatctl utility sends MIDI messages to control sndiod and/or aucat volumes";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.sndio.org";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ sna ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|