mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
timidity: enable darwin support
This commit is contained in:
parent
5d043aa517
commit
55b68d3188
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, alsa-lib, libjack2, ncurses, pkg-config }:
|
||||
{ lib, stdenv, fetchurl, alsa-lib, libjack2, CoreAudio, ncurses, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "timidity";
|
||||
@ -12,9 +12,24 @@ stdenv.mkDerivation rec {
|
||||
patches = [ ./timidity-iA-Oj.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ alsa-lib libjack2 ncurses ];
|
||||
buildInputs = [
|
||||
libjack2
|
||||
ncurses
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
CoreAudio
|
||||
];
|
||||
|
||||
configureFlags = [ "--enable-audio=oss,alsa,jack" "--enable-alsaseq" "--with-default-output=alsa" "--enable-ncurses" ];
|
||||
configureFlags = [
|
||||
"--enable-ncurses"
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
"--enable-audio=oss,alsa,jack"
|
||||
"--enable-alsaseq"
|
||||
"--with-default-output=alsa"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"--enable-audio=darwin,jack"
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-ljack -L${libjack2}/lib";
|
||||
|
||||
@ -29,12 +44,14 @@ stdenv.mkDerivation rec {
|
||||
cp ${./timidity.cfg} $out/share/timidity/timidity.cfg
|
||||
tar --strip-components=1 -xf $instruments -C $out/share/timidity/
|
||||
'';
|
||||
# This fixup step is unnecessary and fails on Darwin
|
||||
dontRewriteSymlinks = stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://sourceforge.net/projects/timidity/";
|
||||
license = licenses.gpl2;
|
||||
description = "A software MIDI renderer";
|
||||
maintainers = [ maintainers.marcweber ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -28333,7 +28333,9 @@ with pkgs;
|
||||
|
||||
timg = callPackage ../tools/graphics/timg { };
|
||||
|
||||
timidity = callPackage ../tools/misc/timidity { };
|
||||
timidity = callPackage ../tools/misc/timidity {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
};
|
||||
|
||||
tint2 = callPackage ../applications/misc/tint2 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user