diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2021-01-02 18:39:18 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2021-01-02 18:55:09 +0100 |
commit | 5ec0a5636e79ee16ea5f1a4022e77e5bd6a521b4 (patch) | |
tree | f876463f6fda5533256f4d38f2d9857b52f02aaa /pkgs/applications/audio/ft2-clone | |
parent | 62f0b749d253dc73e4063e242b7848b599c5a57d (diff) |
ft2-clone: fix darwin
Diffstat (limited to 'pkgs/applications/audio/ft2-clone')
-rw-r--r-- | pkgs/applications/audio/ft2-clone/default.nix | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/applications/audio/ft2-clone/default.nix b/pkgs/applications/audio/ft2-clone/default.nix index 6179ae71113e2..68b3871f29fea 100644 --- a/pkgs/applications/audio/ft2-clone/default.nix +++ b/pkgs/applications/audio/ft2-clone/default.nix @@ -5,6 +5,10 @@ , alsaLib , SDL2 , libiconv +, CoreAudio +, CoreMIDI +, CoreServices +, Cocoa }: stdenv.mkDerivation rec { @@ -18,10 +22,28 @@ stdenv.mkDerivation rec { sha256 = "0w3c1rgm8qlqi50gavrcjz40xb0nkis4i9mvpwmvzmdv9nipxry9"; }; + # Adapt the linux-only CMakeLists to darwin (more reliable than make-macos.sh) + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i -e 's@__LINUX_ALSA__@__MACOSX_CORE__@' -e 's@asound@@' CMakeLists.txt + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 ] ++ stdenv.lib.optional stdenv.isLinux alsaLib - ++ stdenv.lib.optional stdenv.isDarwin libiconv; + ++ stdenv.lib.optionals stdenv.isDarwin [ + libiconv + CoreAudio + CoreMIDI + CoreServices + Cocoa + ]; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin [ + "-framework CoreAudio" + "-framework CoreMIDI" + "-framework CoreServices" + "-framework Cocoa" + ]; passthru.tests = { ft2-clone-starts = nixosTests.ft2-clone; |