2021-05-05 16:19:59 +01: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
|
|
|
|
, libechonest
|
|
|
|
, libspotify
|
|
|
|
, pcre
|
|
|
|
, projectm
|
|
|
|
, protobuf
|
|
|
|
, qca2
|
|
|
|
, pkg-config
|
|
|
|
, sparsehash
|
|
|
|
, config
|
|
|
|
, makeWrapper
|
|
|
|
, gst_plugins
|
2021-05-05 16:20:19 +01:00
|
|
|
|
|
|
|
, util-linux
|
|
|
|
, libunwind
|
|
|
|
, libselinux
|
|
|
|
, elfutils
|
|
|
|
, libsepol
|
|
|
|
, orc
|
|
|
|
|
2021-06-10 03:57:09 +01:00
|
|
|
, alsa-lib
|
2021-05-05 16:19:59 +01:00
|
|
|
}:
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2015-05-02 19:30:53 +01:00
|
|
|
let
|
2017-03-16 23:47:37 +00:00
|
|
|
withIpod = config.clementine.ipod or false;
|
|
|
|
withMTP = config.clementine.mtp or true;
|
|
|
|
withCD = config.clementine.cd or true;
|
|
|
|
withCloud = config.clementine.cloud or true;
|
2015-05-05 03:07:56 +01:00
|
|
|
|
2021-03-25 13:07:56 +00:00
|
|
|
# On the update after all 1.4rc, qt5.15 and protobuf 3.15 will be supported.
|
2020-06-08 18:19:18 +01:00
|
|
|
version = "1.4.0rc1";
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2019-01-27 12:03:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clementine-player";
|
|
|
|
repo = "Clementine";
|
|
|
|
rev = version;
|
2020-06-08 18:19:18 +01:00
|
|
|
sha256 = "1rqk0hrsn8f8bjk0j0vq1af0ygy6xx7qi9fw0jjw2cmj6kzckyi2";
|
2015-05-05 03:07:56 +01:00
|
|
|
};
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2015-05-05 03:07:56 +01:00
|
|
|
patches = [
|
|
|
|
./clementine-spotify-blob.patch
|
2021-05-19 17:48:18 +01:00
|
|
|
(fetchpatch {
|
|
|
|
# "short-term" fix for execution on wayland (1.4.0rc1-131-g2179027a6)
|
|
|
|
# for https://github.com/clementine-player/Clementine/issues/6587
|
|
|
|
url = "https://github.com/clementine-player/Clementine/commit/2179027a6d97530c857e43be873baacd696ff332.patch";
|
|
|
|
sha256 = "0344bfcyvjim5ph8w4km6zkg96rj5g9ybp9x14qgyw2gkdksimn6";
|
|
|
|
})
|
2015-05-05 03:07:56 +01:00
|
|
|
];
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2021-05-05 16:19:59 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
2021-05-05 16:20:19 +01:00
|
|
|
|
|
|
|
util-linux
|
|
|
|
libunwind
|
|
|
|
libselinux
|
|
|
|
elfutils
|
|
|
|
libsepol
|
|
|
|
orc
|
2021-05-05 16:19:59 +01:00
|
|
|
];
|
2017-08-28 11:52:18 +01:00
|
|
|
|
2015-05-05 03:07:56 +01:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
2017-08-03 03:54:50 +01:00
|
|
|
chromaprint
|
2015-05-05 03:07:56 +01:00
|
|
|
fftw
|
|
|
|
gettext
|
|
|
|
glew
|
2017-08-03 03:54:50 +01:00
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gstreamer
|
2015-05-05 03:07:56 +01:00
|
|
|
gvfs
|
2017-08-03 03:54:50 +01:00
|
|
|
libechonest
|
2015-05-05 03:07:56 +01:00
|
|
|
liblastfm
|
2017-08-03 03:54:50 +01:00
|
|
|
libpulseaudio
|
|
|
|
pcre
|
2017-08-28 11:52:18 +01:00
|
|
|
projectm
|
2015-05-05 03:07:56 +01:00
|
|
|
protobuf
|
|
|
|
qca2
|
|
|
|
qjson
|
2020-06-08 18:19:18 +01:00
|
|
|
qtbase
|
|
|
|
qtx11extras
|
2021-05-04 12:20:40 +01:00
|
|
|
qttools
|
2015-05-05 03:07:56 +01:00
|
|
|
sqlite
|
|
|
|
taglib
|
2021-05-05 16:20:19 +01:00
|
|
|
|
2021-06-10 03:57:09 +01:00
|
|
|
alsa-lib
|
2017-03-16 23:47:37 +00:00
|
|
|
]
|
2021-05-05 16:19:59 +01:00
|
|
|
++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ]
|
|
|
|
++ lib.optionals (withMTP) [ libmtp ]
|
|
|
|
++ lib.optionals (withCD) [ libcdio ]
|
|
|
|
++ lib.optionals (withCloud) [ sparsehash ];
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2017-09-08 19:24:14 +01: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'
|
|
|
|
'';
|
|
|
|
|
2020-06-08 18:19:18 +01:00
|
|
|
free = mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "clementine-free";
|
|
|
|
inherit version;
|
2018-04-24 22:27:45 +01:00
|
|
|
inherit src patches nativeBuildInputs postPatch;
|
|
|
|
|
2018-06-21 01:52:36 +01:00
|
|
|
# gst_plugins needed for setup-hooks
|
2021-02-07 09:17:39 +00:00
|
|
|
buildInputs = buildInputs ++ gst_plugins;
|
2017-08-28 11:52:18 +01:00
|
|
|
|
2020-06-08 18:19:18 +01:00
|
|
|
preConfigure = ''
|
|
|
|
rm -rf ext/{,lib}clementine-spotifyblob
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_PROJECTM=ON"
|
|
|
|
"-DSPOTIFY_BLOB=OFF"
|
|
|
|
];
|
2017-08-28 11:52:18 +01:00
|
|
|
|
2018-04-06 16:16:31 +01:00
|
|
|
passthru.unfree = unfree;
|
|
|
|
|
2018-04-24 22:27:45 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/clementine \
|
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 15:55:31 +01:00
|
|
|
homepage = "https://www.clementine-player.org";
|
2015-05-05 03:07:56 +01:00
|
|
|
description = "A multiplatform music player";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ttuegel ];
|
|
|
|
};
|
|
|
|
};
|
2015-04-28 05:18:00 +01:00
|
|
|
|
2018-04-06 16:16:31 +01:00
|
|
|
# Unfree Spotify blob for Clementine
|
2020-06-08 18:19:18 +01:00
|
|
|
unfree = mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "clementine-blob";
|
|
|
|
inherit version;
|
2015-05-05 03:07:56 +01:00
|
|
|
# Use the same patches and sources as Clementine
|
2020-06-08 18:19:18 +01:00
|
|
|
inherit src nativeBuildInputs patches postPatch;
|
2017-08-03 03:54:50 +01:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
buildInputs = buildInputs ++ [ libspotify ];
|
2015-05-05 03:07:56 +01:00
|
|
|
# Only build and install the Spotify blob
|
|
|
|
preBuild = ''
|
|
|
|
cd ext/clementine-spotifyblob
|
|
|
|
'';
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/libexec/clementine
|
|
|
|
mv $out/bin/clementine-spotifyblob $out/libexec/clementine
|
|
|
|
rmdir $out/bin
|
2018-04-06 16:16:31 +01:00
|
|
|
|
|
|
|
makeWrapper ${free}/bin/clementine $out/bin/clementine \
|
2018-04-24 22:27:45 +01:00
|
|
|
--set CLEMENTINE_SPOTIFYBLOB $out/libexec/clementine
|
2018-04-06 16:16:31 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share
|
|
|
|
for dir in applications icons kde4; do
|
2020-03-15 23:41:12 +00:00
|
|
|
ln -s "${free}/share/$dir" "$out/share/$dir"
|
2018-04-06 16:16:31 +01:00
|
|
|
done
|
2015-05-05 03:07:56 +01:00
|
|
|
'';
|
2021-01-03 09:43:56 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 19:32:21 +01:00
|
|
|
homepage = "https://www.clementine-player.org";
|
2015-05-05 03:07:56 +01:00
|
|
|
description = "Spotify integration for Clementine";
|
|
|
|
# The blob itself is Apache-licensed, although libspotify is unfree.
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ttuegel ];
|
|
|
|
};
|
2015-04-28 05:18:00 +01:00
|
|
|
};
|
2013-12-31 13:51:11 +00:00
|
|
|
|
2021-05-05 16:19:59 +01:00
|
|
|
in
|
|
|
|
free
|