2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2022-08-12 12:06:08 +00:00
|
|
|
, wrapQtAppsHook
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, boost
|
|
|
|
, chromaprint
|
|
|
|
, fftw
|
|
|
|
, gnutls
|
|
|
|
, libcdio
|
|
|
|
, libmtp
|
|
|
|
, libpthreadstubs
|
|
|
|
, libtasn1
|
|
|
|
, libXdmcp
|
|
|
|
, ninja
|
|
|
|
, pcre
|
|
|
|
, protobuf
|
|
|
|
, sqlite
|
|
|
|
, taglib
|
2022-04-03 18:54:34 +00:00
|
|
|
, libgpod
|
2022-08-12 12:06:08 +00:00
|
|
|
, libidn2
|
2021-07-24 12:14:16 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, libselinux
|
|
|
|
, libsepol
|
|
|
|
, p11-kit
|
|
|
|
, util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtbase
|
2022-08-12 12:06:08 +00:00
|
|
|
, qtx11extras ? null # doesn't exist in qt6
|
2020-04-24 23:36:52 +00:00
|
|
|
, qttools
|
|
|
|
, withGstreamer ? true
|
2021-07-24 12:14:16 +00:00
|
|
|
, glib-networking
|
|
|
|
, gst_all_1
|
2020-04-24 23:36:52 +00:00
|
|
|
, withVlc ? true
|
2021-07-24 12:14:16 +00:00
|
|
|
, libvlc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
|
|
|
inherit (lib) optionals;
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "strawberry";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.0.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonaski";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-/utd2uYoxPHQ4kQwA0tZW5HwmN90vXL23EiNFh3wXoE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# the big strawberry shown in the context menu is *very* much in your face, so use the grey version instead
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/context/contextalbum.cpp \
|
|
|
|
--replace pictures/strawberry.png pictures/strawberry-grey.png
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
boost
|
|
|
|
chromaprint
|
|
|
|
fftw
|
|
|
|
gnutls
|
|
|
|
libcdio
|
2022-08-12 12:06:08 +00:00
|
|
|
libidn2
|
2020-04-24 23:36:52 +00:00
|
|
|
libmtp
|
|
|
|
libpthreadstubs
|
|
|
|
libtasn1
|
|
|
|
libXdmcp
|
|
|
|
pcre
|
|
|
|
protobuf
|
|
|
|
sqlite
|
|
|
|
taglib
|
|
|
|
qtbase
|
|
|
|
qtx11extras
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ optionals stdenv.isLinux [
|
2022-04-03 18:54:34 +00:00
|
|
|
libgpod
|
2020-04-24 23:36:52 +00:00
|
|
|
libpulseaudio
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
p11-kit
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ optionals withGstreamer (with gst_all_1; [
|
2021-07-24 12:14:16 +00:00
|
|
|
glib-networking
|
2020-04-24 23:36:52 +00:00
|
|
|
gstreamer
|
2022-04-27 09:35:20 +00:00
|
|
|
gst-libav
|
2020-04-24 23:36:52 +00:00
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
2022-02-10 20:34:41 +00:00
|
|
|
gst-plugins-bad
|
2020-04-24 23:36:52 +00:00
|
|
|
gst-plugins-ugly
|
2021-07-24 12:14:16 +00:00
|
|
|
]) ++ lib.optional withVlc libvlc;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
nativeBuildInputs = [
|
2021-07-21 07:28:18 +00:00
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
qttools
|
2022-08-12 12:06:08 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
] ++ optionals stdenv.isLinux [
|
2021-04-05 15:23:46 +00:00
|
|
|
util-linux
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
postInstall = lib.optionalString withGstreamer ''
|
|
|
|
qtWrapperArgs+=(
|
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
|
|
|
--prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules"
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Music player and music collection organizer";
|
|
|
|
homepage = "https://www.strawberrymusicplayer.org/";
|
|
|
|
changelog = "https://raw.githubusercontent.com/jonaski/strawberry/${version}/Changelog";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
# upstream says darwin should work but they lack maintainers as of 0.6.6
|
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "strawberry";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|