17 pname = "MellowPlayer";
20 src = fetchFromGitLab {
21 owner = "ColinDuquesnoy";
22 repo = "MellowPlayer";
24 hash = "sha256-rsF2xQet7U8d4oGU/HgghvE3vvmkxjlGXPBlLD9mWTk=";
27 nativeBuildInputs = [ cmake pkg-config ];
41 cmakeFlags = [ "-DBUILD_TESTS=ON" ];
44 # Running the tests requires a location at the home directory for logging.
45 export HOME="$NIX_BUILD_TOP/home"
46 mkdir -p "$HOME/.local/share/MellowPlayer.Tests/MellowPlayer.Tests/Logs"
48 # Without this, the tests fail because they cannot create the QT Window
49 export QT_QPA_PLATFORM=offscreen
51 # TODO: The tests are failing because it can't locate QT plugins. Is there a better way to do this?
52 + (builtins.concatStringsSep "\n" (lib.lists.flatten (builtins.map
54 (lib.optionalString (pkg ? qtPluginPrefix) ''
55 export QT_PLUGIN_PATH="${pkg}/${pkg.qtPluginPrefix}"''${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
58 (lib.optionalString (pkg ? qtQmlPrefix) ''
59 export QML2_IMPORT_PATH="${pkg}/${pkg.qtQmlPrefix}"''${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
64 inherit (qtbase.meta) platforms;
65 broken = stdenv.hostPlatform.isDarwin; # test build fails, but the project is not maintained anymore
67 description = "Cloud music integration for your desktop";
68 mainProgram = "MellowPlayer";
69 homepage = "https://gitlab.com/ColinDuquesnoy/MellowPlayer";
70 license = licenses.gpl2;
71 maintainers = with maintainers; [ kalbasit ];