nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 47 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 sndio, 6 libbsd, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "aucatctl"; 11 version = "0.1"; 12 13 src = fetchurl { 14 url = "http://www.sndio.org/aucatctl-${finalAttrs.version}.tar.gz"; 15 sha256 = "524f2fae47db785234f166551520d9605b9a27551ca438bd807e3509ce246cf0"; 16 }; 17 18 buildInputs = [ 19 sndio 20 ] 21 ++ lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isBSD) libbsd; 22 23 outputs = [ 24 "out" 25 "man" 26 ]; 27 28 preBuild = '' 29 makeFlagsArray+=("PREFIX=$out") 30 '' 31 + lib.optionalString (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isBSD) '' 32 makeFlagsArray+=(LDADD="-lsndio -lbsd") 33 34 # Fix warning about implicit declaration of function 'strlcpy' 35 substituteInPlace aucatctl.c \ 36 --replace '#include <string.h>' '#include <bsd/string.h>' 37 ''; 38 39 meta = with lib; { 40 description = "Utility that allows to send MIDI messages to control sndiod and/or aucat volumes"; 41 homepage = "http://www.sndio.org"; 42 license = licenses.isc; 43 maintainers = with maintainers; [ sna ]; 44 platforms = platforms.unix; 45 mainProgram = "aucatctl"; 46 }; 47})