nixpkgs/pkgs/applications/audio/clementine/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

138 lines
2.4 KiB
Nix
Raw Normal View History

2021-05-05 15:19:59 +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-05-26 01:25:00 +00:00
, qca-qt5
2021-05-05 15:19:59 +00:00
, pkg-config
, sparsehash
, config
, makeWrapper
, gst_plugins
, util-linux
, libunwind
, libselinux
, elfutils
, libsepol
, orc
, alsa-lib
2021-05-05 15:19:59 +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-05-29 22:10:42 +00:00
in mkDerivation {
pname = "clementine";
version = "unstable-2022-04-11";
2019-01-27 12:03:57 +00:00
src = fetchFromGitHub {
owner = "clementine-player";
repo = "Clementine";
rev = "250024e117fbe5fae7c62b9c8e655d66412a6ed7";
sha256 = "06fcbs3wig3mh711iypyj49qm5246f7qhvgvv8brqfrd8cqyh6qf";
2015-05-05 02:07:56 +00:00
};
2021-05-05 15:19:59 +00:00
nativeBuildInputs = [
cmake
pkg-config
makeWrapper
util-linux
libunwind
libselinux
elfutils
libsepol
orc
2021-05-05 15:19:59 +00:00
];
2017-08-28 10:52:18 +00:00
2015-05-05 02:07:56 +00:00
buildInputs = [
boost
2017-08-03 02:54:50 +00:00
chromaprint
2015-05-05 02:07:56 +00:00
fftw
gettext
glew
2017-08-03 02:54:50 +00:00
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
2017-08-03 02:54:50 +00:00
gst_all_1.gstreamer
2015-05-05 02:07:56 +00:00
gvfs
liblastfm
2017-08-03 02:54:50 +00:00
libpulseaudio
pcre
2017-08-28 10:52:18 +00:00
projectm
2015-05-05 02:07:56 +00:00
protobuf
2022-05-26 01:25:00 +00:00
qca-qt5
2015-05-05 02:07:56 +00:00
qjson
qtbase
qtx11extras
qttools
2015-05-05 02:07:56 +00:00
sqlite
taglib
alsa-lib
]
2022-05-29 22:10:42 +00:00
# gst_plugins needed for setup-hooks
++ gst_plugins
2021-05-05 15:19:59 +00:00
++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ]
++ lib.optionals (withMTP) [ libmtp ]
++ lib.optionals (withCD) [ libcdio ]
++ lib.optionals (withCloud) [ sparsehash ];
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-05-29 22:10:42 +00:00
preConfigure = ''
rm -rf ext/{,lib}clementine-spotifyblob
'';
2022-05-29 22:10:42 +00:00
cmakeFlags = [
"-DUSE_SYSTEM_PROJECTM=ON"
"-DSPOTIFY_BLOB=OFF"
];
2022-05-29 22:10:42 +00:00
postInstall = ''
wrapProgram $out/bin/clementine \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
'';
2022-05-29 22:10:42 +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 ];
};
2022-05-29 22:10:42 +00:00
}