2023-02-22 10:55:15 +00:00
|
|
|
{ asio
|
2023-02-02 18:25:31 +00:00
|
|
|
, cmake
|
2020-04-24 23:36:52 +00:00
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2021-05-03 20:48:10 +00:00
|
|
|
, ffmpeg
|
2022-04-27 09:35:20 +00:00
|
|
|
, gnutls
|
2020-04-24 23:36:52 +00:00
|
|
|
, lame
|
2023-02-22 10:55:15 +00:00
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, libev
|
2023-02-02 18:25:31 +00:00
|
|
|
, game-music-emu
|
2020-04-24 23:36:52 +00:00
|
|
|
, libmicrohttpd
|
2022-08-12 12:06:08 +00:00
|
|
|
, libopenmpt
|
|
|
|
, mpg123
|
2020-04-24 23:36:52 +00:00
|
|
|
, ncurses
|
2023-02-22 10:55:15 +00:00
|
|
|
, pkg-config
|
|
|
|
, portaudio
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, taglib
|
2022-05-18 14:49:53 +00:00
|
|
|
# Linux Dependencies
|
|
|
|
, alsa-lib
|
2023-03-04 12:14:45 +00:00
|
|
|
, pipewireSupport ? !stdenv.hostPlatform.isDarwin, pipewire
|
2022-05-18 14:49:53 +00:00
|
|
|
, pulseaudio
|
2023-02-22 10:55:15 +00:00
|
|
|
, sndioSupport ? true, sndio
|
2021-12-30 13:39:12 +00:00
|
|
|
, systemd
|
2023-02-22 10:55:15 +00:00
|
|
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
2022-05-18 14:49:53 +00:00
|
|
|
# Darwin Dependencies
|
|
|
|
, Cocoa
|
|
|
|
, SystemConfiguration
|
2023-03-04 12:14:45 +00:00
|
|
|
, coreaudioSupport ? stdenv.hostPlatform.isDarwin, CoreAudio
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "musikcube";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clangen";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha512-IakZy6XsAE39awjzQI+R11JCPeQSaibx6+uX8Iea5WdlCundeovnPwSAi6RzzZl9dr2UftzzEiF4Aun8VMtqVA==";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
asio
|
2020-04-24 23:36:52 +00:00
|
|
|
curl
|
2021-05-03 20:48:10 +00:00
|
|
|
ffmpeg
|
2022-04-27 09:35:20 +00:00
|
|
|
gnutls
|
2020-04-24 23:36:52 +00:00
|
|
|
lame
|
|
|
|
libev
|
2023-02-02 18:25:31 +00:00
|
|
|
game-music-emu
|
2020-04-24 23:36:52 +00:00
|
|
|
libmicrohttpd
|
2022-08-12 12:06:08 +00:00
|
|
|
libopenmpt
|
|
|
|
mpg123
|
2020-04-24 23:36:52 +00:00
|
|
|
ncurses
|
2023-02-22 10:55:15 +00:00
|
|
|
portaudio
|
2020-04-24 23:36:52 +00:00
|
|
|
taglib
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals systemdSupport [
|
2022-05-18 14:49:53 +00:00
|
|
|
systemd
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-05-18 14:49:53 +00:00
|
|
|
alsa-lib pulseaudio
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-03-04 12:14:45 +00:00
|
|
|
Cocoa SystemConfiguration
|
|
|
|
] ++ lib.optionals coreaudioSupport [
|
|
|
|
CoreAudio
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals sndioSupport [
|
2023-02-22 10:55:15 +00:00
|
|
|
sndio
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals pipewireSupport [
|
2023-02-22 10:55:15 +00:00
|
|
|
pipewire
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DDISABLE_STRIP=true"
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
2022-08-21 13:32:41 +00:00
|
|
|
install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname}
|
|
|
|
install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname}d
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = {
|
2023-04-29 16:46:19 +00:00
|
|
|
description = "Terminal-based music player, library, and streaming audio server";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://musikcube.com/";
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with lib.maintainers; [ aanderse srapenne afh ];
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|