2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, chromaprint
|
|
|
|
, gettext
|
|
|
|
, gst_all_1
|
|
|
|
, liblastfm
|
|
|
|
, qtbase
|
|
|
|
, qtx11extras
|
|
|
|
, qttools
|
|
|
|
, taglib
|
|
|
|
, fftw
|
|
|
|
, glew
|
|
|
|
, qjson
|
|
|
|
, sqlite
|
|
|
|
, libgpod
|
|
|
|
, libplist
|
|
|
|
, usbmuxd
|
|
|
|
, libmtp
|
|
|
|
, libpulseaudio
|
|
|
|
, gvfs
|
|
|
|
, libcdio
|
|
|
|
, pcre
|
|
|
|
, projectm
|
|
|
|
, protobuf
|
2022-06-16 17:23:12 +00:00
|
|
|
, qca-qt5
|
2021-05-28 09:39:13 +00:00
|
|
|
, pkg-config
|
|
|
|
, sparsehash
|
|
|
|
, config
|
|
|
|
, makeWrapper
|
|
|
|
, gst_plugins
|
|
|
|
|
|
|
|
, util-linux
|
|
|
|
, libunwind
|
|
|
|
, libselinux
|
|
|
|
, elfutils
|
|
|
|
, libsepol
|
|
|
|
, orc
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
withIpod = config.clementine.ipod or false;
|
|
|
|
withMTP = config.clementine.mtp or true;
|
|
|
|
withCD = config.clementine.cd or true;
|
|
|
|
withCloud = config.clementine.cloud or true;
|
2022-06-16 17:23:12 +00:00
|
|
|
in mkDerivation {
|
|
|
|
pname = "clementine";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "unstable-2022-04-11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clementine-player";
|
|
|
|
repo = "Clementine";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "250024e117fbe5fae7c62b9c8e655d66412a6ed7";
|
|
|
|
sha256 = "06fcbs3wig3mh711iypyj49qm5246f7qhvgvv8brqfrd8cqyh6qf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
|
|
|
|
util-linux
|
|
|
|
libunwind
|
|
|
|
libselinux
|
|
|
|
elfutils
|
|
|
|
libsepol
|
|
|
|
orc
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
chromaprint
|
|
|
|
fftw
|
|
|
|
gettext
|
|
|
|
glew
|
|
|
|
gst_all_1.gst-plugins-base
|
2022-05-18 14:49:53 +00:00
|
|
|
gst_all_1.gst-plugins-bad
|
2020-04-24 23:36:52 +00:00
|
|
|
gst_all_1.gstreamer
|
|
|
|
gvfs
|
|
|
|
liblastfm
|
|
|
|
libpulseaudio
|
|
|
|
pcre
|
|
|
|
projectm
|
|
|
|
protobuf
|
2022-06-16 17:23:12 +00:00
|
|
|
qca-qt5
|
2020-04-24 23:36:52 +00:00
|
|
|
qjson
|
2020-06-18 07:06:33 +00:00
|
|
|
qtbase
|
|
|
|
qtx11extras
|
2021-05-20 23:08:51 +00:00
|
|
|
qttools
|
2020-04-24 23:36:52 +00:00
|
|
|
sqlite
|
|
|
|
taglib
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
2022-06-16 17:23:12 +00:00
|
|
|
# gst_plugins needed for setup-hooks
|
|
|
|
++ gst_plugins
|
2021-05-28 09:39:13 +00:00
|
|
|
++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ]
|
|
|
|
++ lib.optionals (withMTP) [ libmtp ]
|
|
|
|
++ lib.optionals (withCD) [ libcdio ]
|
|
|
|
++ lib.optionals (withCloud) [ sparsehash ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i src/CMakeLists.txt \
|
|
|
|
-e 's,-Werror,,g' \
|
|
|
|
-e 's,-Wno-unknown-warning-option,,g' \
|
|
|
|
-e 's,-Wno-unused-private-field,,g'
|
|
|
|
sed -i CMakeLists.txt \
|
|
|
|
-e 's,libprotobuf.a,protobuf,g'
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preConfigure = ''
|
|
|
|
rm -rf ext/{,lib}clementine-spotifyblob
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_PROJECTM=ON"
|
|
|
|
"-DSPOTIFY_BLOB=OFF"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/clementine \
|
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.clementine-player.org";
|
|
|
|
description = "A multiplatform music player";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ttuegel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
}
|