2020-07-13 18:23:55 +02:00
|
|
|
{ cmake
|
|
|
|
, fetchFromGitLab
|
|
|
|
, lib
|
|
|
|
, libnotify
|
|
|
|
, mkDerivation
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2020-07-13 18:23:55 +02:00
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qttools
|
|
|
|
, qtwebengine
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "MellowPlayer";
|
2021-01-21 19:33:50 +01:00
|
|
|
version = "3.6.8";
|
2020-07-13 18:23:55 +02:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ColinDuquesnoy";
|
|
|
|
repo = "MellowPlayer";
|
|
|
|
rev = version;
|
2021-01-21 19:33:50 +01:00
|
|
|
sha256 = "sha256-rsF2xQet7U8d4oGU/HgghvE3vvmkxjlGXPBlLD9mWTk=";
|
2020-07-13 18:23:55 +02:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-07-13 18:23:55 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libnotify
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtgraphicaleffects
|
|
|
|
qtquickcontrols2
|
|
|
|
qttools
|
|
|
|
qtwebengine
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=ON" ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Running the tests requires a location at the home directory for logging.
|
|
|
|
export HOME="$NIX_BUILD_TOP/home"
|
|
|
|
mkdir -p "$HOME/.local/share/MellowPlayer.Tests/MellowPlayer.Tests/Logs"
|
|
|
|
|
|
|
|
# Without this, the tests fail because they cannot create the QT Window
|
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
''
|
|
|
|
# TODO: The tests are failing because it can't locate QT plugins. Is there a better way to do this?
|
|
|
|
+ (builtins.concatStringsSep "\n" (lib.lists.flatten (builtins.map
|
|
|
|
(pkg: [
|
|
|
|
(lib.optionalString (pkg ? qtPluginPrefix) ''
|
|
|
|
export QT_PLUGIN_PATH="${pkg}/${pkg.qtPluginPrefix}"''${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
|
|
|
|
'')
|
|
|
|
|
|
|
|
(lib.optionalString (pkg ? qtQmlPrefix) ''
|
|
|
|
export QML2_IMPORT_PATH="${pkg}/${pkg.qtQmlPrefix}"''${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
|
|
|
|
'')
|
|
|
|
]) buildInputs)));
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit (qtbase.meta) platforms;
|
|
|
|
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "Cloud music integration for your desktop";
|
2020-07-13 18:23:55 +02:00
|
|
|
homepage = "https://gitlab.com/ColinDuquesnoy/MellowPlayer";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ kalbasit ];
|
|
|
|
};
|
|
|
|
}
|