From 7813e1f32abcae12c00ce936b3efbcb254a490b0 Mon Sep 17 00:00:00 2001 From: PassiveLemon Date: Sun, 9 Jun 2024 20:33:57 -0400 Subject: [PATCH] onthespot: desktop file --- pkgs/by-name/on/onthespot/package.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index 7e52d4892fa5..138ac6e94b7c 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -4,6 +4,7 @@ , makeDesktopItem , python3 , libsForQt5 +, ffmpeg }: python3.pkgs.buildPythonApplication rec { @@ -27,6 +28,7 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ charset-normalizer defusedxml + ffmpeg librespot music-tag packaging @@ -52,16 +54,32 @@ python3.pkgs.buildPythonApplication rec { pythonRelaxDeps = true; + postInstall = '' + install -Dm444 $src/src/onthespot/resources/icon.png $out/share/icons/hicolor/256x256/apps/onthespot.png + ''; + preFixup = '' makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; + desktopItems = [ + (makeDesktopItem { + name = "Onthespot"; + exec = "onthespot_gui"; + icon = "onthespot"; + desktopName = "Onthespot"; + comment = meta.description; + categories = [ "Audio" ]; + }) + ]; + meta = with lib; { - description = " QT based Spotify music downloader written in Python"; + description = "QT based Spotify music downloader written in Python"; homepage = "https://github.com/casualsnek/onthespot"; changelog = "https://github.com/casualsnek/onthespot/releases/tag/v${version}"; license = licenses.gpl2Only; maintainers = with maintainers; [ onny ]; platforms = platforms.linux; + mainProgram = "onthespot_gui"; }; }