From b6c5ad3349d9867af7cae997aca83bd4576a9a02 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Wed, 17 Jul 2024 18:14:26 +0200 Subject: [PATCH] lollypop: refactor Resolves errors generated by nixfmt-rfc-style. --- pkgs/applications/audio/lollypop/default.nix | 93 +++++++++++--------- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix index 5d3e0282dd71..07e777164f2e 100644 --- a/pkgs/applications/audio/lollypop/default.nix +++ b/pkgs/applications/audio/lollypop/default.nix @@ -1,27 +1,29 @@ -{ lib -, fetchFromGitLab -, nix-update-script -, meson -, ninja -, pkg-config -, python3 -, gtk3 -, gst_all_1 -, libhandy -, libsecret -, libsoup_3 -, appstream-glib -, desktop-file-utils -, totem-pl-parser -, gobject-introspection -, glib-networking -, gdk-pixbuf -, glib -, pango -, wrapGAppsHook3 -, lastFMSupport ? true -, youtubeSupport ? true -, kid3Support ? true +{ + lib, + fetchFromGitLab, + nix-update-script, + meson, + ninja, + pkg-config, + python3, + gtk3, + gst_all_1, + libhandy, + libsecret, + libsoup_3, + appstream-glib, + desktop-file-utils, + totem-pl-parser, + gobject-introspection, + glib-networking, + gdk-pixbuf, + glib, + pango, + kid3, + wrapGAppsHook3, + lastFMSupport ? true, + youtubeSupport ? true, + kid3Support ? true, }: python3.pkgs.buildPythonApplication rec { @@ -49,29 +51,38 @@ python3.pkgs.buildPythonApplication rec { wrapGAppsHook3 ]; - buildInputs = with gst_all_1; - [ - gdk-pixbuf - glib - glib-networking + buildInputs = + (with gst_all_1; [ gst-libav gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer + + ]) + ++ [ + gdk-pixbuf + glib + glib-networking gtk3 libhandy libsoup_3 pango totem-pl-parser - ] ++ lib.optional lastFMSupport libsecret; + ] + ++ lib.optional lastFMSupport libsecret; - propagatedBuildInputs = with python3.pkgs; - [ beautifulsoup4 pillow pycairo pygobject3 ] - ++ lib.optional lastFMSupport pylast - ++ lib.optional youtubeSupport yt-dlp - ++ lib.optional kid3Support pkgs.kid3; + propagatedBuildInputs = + (with python3.pkgs; [ + beautifulsoup4 + pillow + pycairo + pygobject3 + ]) + ++ lib.optional lastFMSupport python3.pkgs.pylast + ++ lib.optional youtubeSupport python3.pkgs.yt-dlp + ++ lib.optional kid3Support kid3; postPatch = '' chmod +x meson_post_install.py @@ -93,15 +104,17 @@ python3.pkgs.buildPythonApplication rec { makeWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; - passthru = { updateScript = nix-update-script { }; }; + passthru = { + updateScript = nix-update-script { }; + }; - meta = with lib; { + meta = { changelog = "https://gitlab.gnome.org/World/lollypop/tags/${version}"; description = "Modern music player for GNOME"; homepage = "https://gitlab.gnome.org/World/lollypop"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ lovesegfault ]; - platforms = platforms.linux; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ lovesegfault ]; + platforms = lib.platforms.linux; mainProgram = "lollypop"; }; }