2020-04-05 12:40:32 +00:00
|
|
|
{ cmake
|
|
|
|
, pkg-config
|
|
|
|
, boost
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
2021-11-17 09:15:06 +00:00
|
|
|
, fetchpatch
|
2021-04-30 14:50:01 +00:00
|
|
|
, ffmpeg
|
2022-04-10 18:07:38 +00:00
|
|
|
, gnutls
|
2020-04-05 12:40:32 +00:00
|
|
|
, lame
|
|
|
|
, libev
|
|
|
|
, libmicrohttpd
|
2022-07-11 13:35:22 +00:00
|
|
|
, libopenmpt
|
|
|
|
, mpg123
|
2020-04-05 12:40:32 +00:00
|
|
|
, ncurses
|
2021-12-29 02:03:05 +00:00
|
|
|
, lib
|
|
|
|
, stdenv
|
2020-04-05 12:40:32 +00:00
|
|
|
, taglib
|
2022-04-30 16:03:44 +00:00
|
|
|
# Linux Dependencies
|
|
|
|
, alsa-lib
|
|
|
|
, pulseaudio
|
2021-12-29 02:03:05 +00:00
|
|
|
, systemdSupport ? stdenv.isLinux
|
|
|
|
, systemd
|
2022-04-30 16:03:44 +00:00
|
|
|
# Darwin Dependencies
|
|
|
|
, Cocoa
|
|
|
|
, SystemConfiguration
|
2020-04-05 12:40:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "musikcube";
|
2022-07-11 13:35:22 +00:00
|
|
|
version = "0.98.0";
|
2020-04-05 12:40:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clangen";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-07-11 13:35:22 +00:00
|
|
|
sha256 = "sha256-bnwOxEcvRXWPuqtkv8YlpclvH/6ZtQvyvHy4mqJCwik=";
|
2020-04-05 12:40:32 +00:00
|
|
|
};
|
|
|
|
|
2022-07-11 18:57:24 +00:00
|
|
|
patches = []
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Fix pending upstream inclusion for Darwin nixpkgs builds:
|
|
|
|
# https://github.com/clangen/musikcube/pull/531
|
|
|
|
(fetchpatch {
|
|
|
|
name = "darwin-build.patch";
|
|
|
|
url = "https://github.com/clangen/musikcube/commit/9077bb9fa6ddfe93ebb14bb8feebc8a0ef9b7ee4.patch";
|
|
|
|
sha256 = "sha256-Am9AGKDGMN5z+JJFJKdsBLrHf2neHFovgF/8I5EXLDA=";
|
|
|
|
})
|
|
|
|
];
|
2021-11-17 09:15:06 +00:00
|
|
|
|
2020-04-05 12:40:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-04-30 16:03:44 +00:00
|
|
|
|
2020-04-05 12:40:32 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
curl
|
2021-04-30 14:50:01 +00:00
|
|
|
ffmpeg
|
2022-04-10 18:07:38 +00:00
|
|
|
gnutls
|
2020-04-05 12:40:32 +00:00
|
|
|
lame
|
|
|
|
libev
|
|
|
|
libmicrohttpd
|
2022-07-11 13:35:22 +00:00
|
|
|
libopenmpt
|
|
|
|
mpg123
|
2020-04-05 12:40:32 +00:00
|
|
|
ncurses
|
|
|
|
taglib
|
2022-05-14 07:25:44 +00:00
|
|
|
] ++ lib.optionals systemdSupport [
|
2022-04-30 16:03:44 +00:00
|
|
|
systemd
|
2022-05-14 07:25:44 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-04-30 16:03:44 +00:00
|
|
|
alsa-lib pulseaudio
|
2022-05-14 07:25:44 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-04-30 16:03:44 +00:00
|
|
|
Cocoa SystemConfiguration
|
|
|
|
];
|
2020-04-05 12:40:32 +00:00
|
|
|
|
2020-05-27 01:16:18 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DDISABLE_STRIP=true"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-05 12:40:32 +00:00
|
|
|
description = "A fully functional terminal-based music player, library, and streaming audio server";
|
|
|
|
homepage = "https://musikcube.com/";
|
|
|
|
maintainers = [ maintainers.aanderse ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|