From b337251b1807f5d503cbdf82e1fda8e23203a4c5 Mon Sep 17 00:00:00 2001 From: lyranico Date: Tue, 4 Feb 2025 21:01:43 +0800 Subject: [PATCH 1/3] clementine: format --- .../applications/audio/clementine/default.nix | 150 +++++++++--------- 1 file changed, 76 insertions(+), 74 deletions(-) diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix index c0f7c3cbc82a..363ac4f323ef 100644 --- a/pkgs/applications/audio/clementine/default.nix +++ b/pkgs/applications/audio/clementine/default.nix @@ -1,45 +1,44 @@ -{ lib -, mkDerivation -, fetchFromGitHub -, boost -, cmake -, chromaprint -, gettext -, gst_all_1 -, liblastfm -, qtbase -, qtx11extras -, qttools -, taglib -, fftw -, glew -, qjson -, sqlite -, libgpod -, libplist -, usbmuxd -, libmtp -, libpulseaudio -, gvfs -, libcdio -, pcre -, projectm -, protobuf -, qca-qt5 -, pkg-config -, sparsehash -, config -, makeWrapper -, gst_plugins - -, util-linux -, libunwind -, libselinux -, elfutils -, libsepol -, orc - -, alsa-lib +{ + lib, + mkDerivation, + fetchFromGitHub, + boost, + cmake, + chromaprint, + gettext, + gst_all_1, + liblastfm, + qtbase, + qtx11extras, + qttools, + taglib, + fftw, + glew, + qjson, + sqlite, + libgpod, + libplist, + usbmuxd, + libmtp, + libpulseaudio, + gvfs, + libcdio, + pcre, + projectm, + protobuf, + qca-qt5, + pkg-config, + sparsehash, + config, + makeWrapper, + gst_plugins, + util-linux, + libunwind, + libselinux, + elfutils, + libsepol, + orc, + alsa-lib, }: let @@ -63,7 +62,6 @@ mkDerivation { cmake pkg-config makeWrapper - util-linux libunwind libselinux @@ -72,37 +70,41 @@ mkDerivation { orc ]; - buildInputs = [ - boost - chromaprint - fftw - gettext - glew - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-bad - gst_all_1.gstreamer - gvfs - liblastfm - libpulseaudio - pcre - projectm - protobuf - qca-qt5 - qjson - qtbase - qtx11extras - qttools - sqlite - taglib - - alsa-lib - ] - # gst_plugins needed for setup-hooks - ++ gst_plugins - ++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ] - ++ lib.optionals (withMTP) [ libmtp ] - ++ lib.optionals (withCD) [ libcdio ] - ++ lib.optionals (withCloud) [ sparsehash ]; + buildInputs = + [ + boost + chromaprint + fftw + gettext + glew + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-bad + gst_all_1.gstreamer + gvfs + liblastfm + libpulseaudio + pcre + projectm + protobuf + qca-qt5 + qjson + qtbase + qtx11extras + qttools + sqlite + taglib + alsa-lib + ] + # gst_plugins needed for setup-hooks + ++ gst_plugins + ++ lib.optionals (withIpod) [ + libgpod + libplist + usbmuxd + ] + ++ lib.optionals (withMTP) [ libmtp ] + ++ lib.optionals (withCD) [ libcdio ] + ++ lib.optionals (withCloud) [ sparsehash ]; postPatch = '' sed -i src/CMakeLists.txt \ From 0a89369b248b99b9e87cd292a600e97a616d4651 Mon Sep 17 00:00:00 2001 From: lyranico Date: Tue, 4 Feb 2025 21:04:34 +0800 Subject: [PATCH 2/3] clementine: refactor --- pkgs/applications/audio/clementine/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix index 363ac4f323ef..886d52a948eb 100644 --- a/pkgs/applications/audio/clementine/default.nix +++ b/pkgs/applications/audio/clementine/default.nix @@ -1,6 +1,6 @@ { lib, - mkDerivation, + stdenv, fetchFromGitHub, boost, cmake, @@ -47,7 +47,7 @@ let withCD = config.clementine.cd or true; withCloud = config.clementine.cloud or true; in -mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "clementine"; version = "1.4.rc2-unstable-2024-05-12"; @@ -55,7 +55,7 @@ mkDerivation { owner = "clementine-player"; repo = "Clementine"; rev = "7607ddcb96e79d373c4b60d9de21f3315719c7d8"; - sha256 = "sha256-yOG/Je6N8YEsu5AOtxOFgDl3iqb97assYMZYMSwQqqk="; + hash = "sha256-yOG/Je6N8YEsu5AOtxOFgDl3iqb97assYMZYMSwQqqk="; }; nativeBuildInputs = [ @@ -130,11 +130,11 @@ mkDerivation { --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" ''; - meta = with lib; { + meta = { homepage = "https://www.clementine-player.org"; description = "Multiplatform music player"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = [ maintainers.ttuegel ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ ttuegel ]; }; -} +}) From f524f3b3ecd443fb7391285d28f6da34da4b9366 Mon Sep 17 00:00:00 2001 From: lyranico Date: Wed, 5 Feb 2025 04:11:23 +0800 Subject: [PATCH 3/3] clementine: 1.4.rc2-unstable-2024-05-12 -> 1.4.1 --- pkgs/applications/audio/clementine/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix index 886d52a948eb..f175071aa40d 100644 --- a/pkgs/applications/audio/clementine/default.nix +++ b/pkgs/applications/audio/clementine/default.nix @@ -30,7 +30,7 @@ pkg-config, sparsehash, config, - makeWrapper, + wrapQtAppsHook, gst_plugins, util-linux, libunwind, @@ -49,19 +49,19 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "clementine"; - version = "1.4.rc2-unstable-2024-05-12"; + version = "1.4.1"; src = fetchFromGitHub { owner = "clementine-player"; repo = "Clementine"; - rev = "7607ddcb96e79d373c4b60d9de21f3315719c7d8"; - hash = "sha256-yOG/Je6N8YEsu5AOtxOFgDl3iqb97assYMZYMSwQqqk="; + tag = finalAttrs.version; + hash = "sha256-ges7PHsv/J0R5dqmKvS5BpYxOgy9YB8hZMXOIe16M6A="; }; nativeBuildInputs = [ cmake pkg-config - makeWrapper + wrapQtAppsHook util-linux libunwind libselinux @@ -125,8 +125,10 @@ stdenv.mkDerivation (finalAttrs: { "-DSPOTIFY_BLOB=OFF" ]; + dontWrapQtApps = true; + postInstall = '' - wrapProgram $out/bin/clementine \ + wrapQtApp $out/bin/clementine \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" '';