Merge pull request #168173 from afh/musikcube-darwin

musikcube: fix Darwin build
main
Sandro 2 years ago committed by GitHub
commit 0ce06bcec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      pkgs/applications/audio/musikcube/0001-apple-cmake.patch
  2. 20
      pkgs/applications/audio/musikcube/default.nix
  3. 4
      pkgs/top-level/all-packages.nix

@ -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)

@ -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"

@ -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 { };

Loading…
Cancel
Save