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

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

121 lines
2.3 KiB
Nix
Raw Normal View History

2022-07-27 03:29:23 +00:00
{ stdenv
2019-08-28 05:24:53 +00:00
, lib
, fetchFromGitHub
, cmake
, pkg-config
2022-07-27 03:29:23 +00:00
, wrapQtAppsHook
, alsa-lib
2019-08-28 05:24:53 +00:00
, boost
, chromaprint
, fftw
, gnutls
, libcdio
, libmtp
, libpthreadstubs
, libtasn1
, libXdmcp
, ninja
2019-08-28 05:24:53 +00:00
, pcre
, protobuf
, sqlite
, taglib
, libgpod
2022-07-27 03:29:23 +00:00
, libidn2
2021-07-22 00:18:02 +00:00
, libpulseaudio
, libselinux
, libsepol
, p11-kit
, util-linux
2019-08-28 05:24:53 +00:00
, qtbase
2022-07-27 03:29:23 +00:00
, qtx11extras ? null # doesn't exist in qt6
2019-08-28 05:24:53 +00:00
, qttools
, withGstreamer ? true
2021-07-21 18:12:41 +00:00
, glib-networking
2021-07-22 00:18:02 +00:00
, gst_all_1
2019-08-28 05:24:53 +00:00
, withVlc ? true
2021-07-22 00:18:02 +00:00
, libvlc
2019-08-28 05:24:53 +00:00
}:
2022-07-27 03:29:23 +00:00
let
inherit (lib) optionals;
in
stdenv.mkDerivation rec {
2019-08-28 05:24:53 +00:00
pname = "strawberry";
2023-07-06 06:18:01 +00:00
version = "1.0.18";
2019-08-28 05:24:53 +00:00
src = fetchFromGitHub {
owner = "jonaski";
repo = pname;
rev = version;
2023-07-06 06:18:01 +00:00
hash = "sha256-vOay9xPSwgSYurFgL9f4OdBPzGJkV4t+7lJgeCeT0c4=";
2019-08-28 05:24:53 +00:00
};
2022-05-26 15:41:38 +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
'';
2019-08-28 05:24:53 +00:00
buildInputs = [
alsa-lib
2019-08-28 05:24:53 +00:00
boost
chromaprint
fftw
gnutls
libcdio
2022-07-27 03:29:23 +00:00
libidn2
2019-08-28 05:24:53 +00:00
libmtp
libpthreadstubs
libtasn1
libXdmcp
pcre
protobuf
sqlite
taglib
qtbase
qtx11extras
2022-07-27 03:29:23 +00:00
] ++ optionals stdenv.isLinux [
libgpod
2019-08-28 05:24:53 +00:00
libpulseaudio
libselinux
libsepol
2019-11-23 20:27:27 +00:00
p11-kit
2022-07-27 03:29:23 +00:00
] ++ optionals withGstreamer (with gst_all_1; [
2021-07-21 18:12:41 +00:00
glib-networking
2019-08-28 05:24:53 +00:00
gstreamer
gst-libav
2019-08-28 05:24:53 +00:00
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
2021-07-22 00:18:02 +00:00
]) ++ lib.optional withVlc libvlc;
2019-08-28 05:24:53 +00:00
nativeBuildInputs = [
2021-07-14 15:34:42 +00:00
cmake
ninja
pkg-config
qttools
2022-07-27 03:29:23 +00:00
wrapQtAppsHook
] ++ optionals stdenv.isLinux [
util-linux
];
2019-08-28 05:24:53 +00:00
2021-07-21 18:12:41 +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"
)
'';
2019-08-28 05:24:53 +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";
license = licenses.gpl3Only;
2019-08-28 05:24:53 +00:00
maintainers = with maintainers; [ peterhoeg ];
2019-11-29 15:29:40 +00:00
# upstream says darwin should work but they lack maintainers as of 0.6.6
2019-08-28 05:24:53 +00:00
platforms = platforms.linux;
};
}