git.iko.soy/typeable/nixpkgs
on master help sign in
mellowplayer: init at 3.6.4 (#92653)
commit21104fcabdb61366db4f9ac9cef0880e813c5ee0 authorWael Nasreddine <wael.nasreddine@gmail.com> dateMon 13 Jul 2020, 09:23 (6 years ago) parentb8e3f27
2 files changed+72
pkgs/applications/audio/mellowplayer/default.nix+70 pkgs/top-level/all-packages.nix+2
pkgs/applications/audio/mellowplayer/default.nixnew file+70
@@ -0,0 +1,70 @@
1+{ cmake
2+, fetchFromGitLab
3+, lib
4+, libnotify
5+, mkDerivation
6+, pkgconfig
7+, qtbase
8+, qtdeclarative
9+, qtgraphicaleffects
10+, qtquickcontrols2
11+, qttools
12+, qtwebengine
13+}:
14+
15+mkDerivation rec {
16+ pname = "MellowPlayer";
17+ version = "3.6.4";
18+
19+ src = fetchFromGitLab {
20+ owner = "ColinDuquesnoy";
21+ repo = "MellowPlayer";
22+ rev = version;
23+ sha256 = "1ss7s3kal4vzhz7ld0yy2kvp1rk2w3i6fya0z3xd7nff9p31gqvw";
24+ };
25+
26+ nativeBuildInputs = [ cmake pkgconfig ];
27+
28+ buildInputs = [
29+ libnotify
30+ qtbase
31+ qtdeclarative
32+ qtgraphicaleffects
33+ qtquickcontrols2
34+ qttools
35+ qtwebengine
36+ ];
37+
38+ doCheck = true;
39+
40+ cmakeFlags = [ "-DBUILD_TESTS=ON" ];
41+
42+ preCheck = ''
43+ # Running the tests requires a location at the home directory for logging.
44+ export HOME="$NIX_BUILD_TOP/home"
45+ mkdir -p "$HOME/.local/share/MellowPlayer.Tests/MellowPlayer.Tests/Logs"
46+
47+ # Without this, the tests fail because they cannot create the QT Window
48+ export QT_QPA_PLATFORM=offscreen
49+ ''
50+ # TODO: The tests are failing because it can't locate QT plugins. Is there a better way to do this?
51+ + (builtins.concatStringsSep "\n" (lib.lists.flatten (builtins.map
52+ (pkg: [
53+ (lib.optionalString (pkg ? qtPluginPrefix) ''
54+ export QT_PLUGIN_PATH="${pkg}/${pkg.qtPluginPrefix}"''${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
55+ '')
56+
57+ (lib.optionalString (pkg ? qtQmlPrefix) ''
58+ export QML2_IMPORT_PATH="${pkg}/${pkg.qtQmlPrefix}"''${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
59+ '')
60+ ]) buildInputs)));
61+
62+ meta = with lib; {
63+ inherit (qtbase.meta) platforms;
64+
65+ description = "Cloud music integration for your desktop.";
66+ homepage = "https://gitlab.com/ColinDuquesnoy/MellowPlayer";
67+ license = licenses.gpl2;
68+ maintainers = with maintainers; [ kalbasit ];
69+ };
70+}
pkgs/top-level/all-packages.nix+2
@@ -2559,6 +2559,8 @@ in
25592559
25602560 clementineUnfree = clementine.unfree;
25612561
2562+ mellowplayer = libsForQt5.callPackage ../applications/audio/mellowplayer { };
2563+
25622564 ciopfs = callPackage ../tools/filesystems/ciopfs { };
25632565
25642566 circleci-cli = callPackage ../development/tools/misc/circleci-cli { };