diff --git a/pkgs/applications/audio/musikcube/0001-apple-cmake.patch b/pkgs/applications/audio/musikcube/0001-apple-cmake.patch new file mode 100644 index 00000000000..3c4630af4aa --- /dev/null +++ b/pkgs/applications/audio/musikcube/0001-apple-cmake.patch @@ -0,0 +1,14 @@ +diff --git a/src/musikcube/CMakeLists.txt b/src/musikcube/CMakeLists.txt +index f42748aa..ae339946 100644 +--- a/src/musikcube/CMakeLists.txt ++++ b/src/musikcube/CMakeLists.txt +@@ -98,9 +98,6 @@ else() + endif() + + if (APPLE) +- message(STATUS "[ncurses] detected Darwin, linking statically") +- set(CURSES_LIBRARY_NAME "lib${CURSES_LIBRARY_NAME}.a") +- set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a") + else() + message(STATUS "[ncurses] not Darwin! will attempt to link against libtinfo") + find_library(LIBTINFO NAMES tinfo) diff --git a/pkgs/applications/audio/musikcube/default.nix b/pkgs/applications/audio/musikcube/default.nix index ce51206b12d..0557ee2e676 100644 --- a/pkgs/applications/audio/musikcube/default.nix +++ b/pkgs/applications/audio/musikcube/default.nix @@ -1,6 +1,5 @@ { cmake , pkg-config -, alsa-lib , boost , curl , fetchFromGitHub @@ -11,12 +10,17 @@ , libev , libmicrohttpd , ncurses -, pulseaudio , lib , stdenv , taglib +# Linux Dependencies +, alsa-lib +, pulseaudio , systemdSupport ? stdenv.isLinux , systemd +# Darwin Dependencies +, Cocoa +, SystemConfiguration }: stdenv.mkDerivation rec { @@ -38,14 +42,15 @@ stdenv.mkDerivation rec { url = "https://github.com/clangen/musikcube/commit/1240720e27232fdb199a4da93ca6705864442026.patch"; sha256 = "0bhjgwnj6d24wb1m9xz1vi1k9xk27arba1absjbcimggn54pinid"; }) + ./0001-apple-cmake.patch ]; nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ - alsa-lib boost curl ffmpeg @@ -54,9 +59,14 @@ stdenv.mkDerivation rec { libev libmicrohttpd ncurses - pulseaudio taglib - ] ++ lib.optional systemdSupport systemd; + ] ++ lib.optional systemdSupport [ + systemd + ] ++ lib.optional stdenv.isLinux [ + alsa-lib pulseaudio + ] ++ lib.optional stdenv.isDarwin [ + Cocoa SystemConfiguration + ]; cmakeFlags = [ "-DDISABLE_STRIP=true" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d6d6aba138..76c56740605 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27002,7 +27002,9 @@ with pkgs; marker = callPackage ../applications/editors/marker { }; - musikcube = callPackage ../applications/audio/musikcube {}; + musikcube = callPackage ../applications/audio/musikcube { + inherit (darwin.apple_sdk.frameworks) Cocoa SystemConfiguration; + }; libmt32emu = callPackage ../applications/audio/munt/libmt32emu.nix { };