about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorNathanael Robbins <nejrobbins@gmail.com>2022-08-30 14:17:12 -0400
committerNathanael Robbins <nejrobbins@gmail.com>2022-08-30 14:18:28 -0400
commit4e5a4eb4d617575f3163228ebb0feab41c24eb5d (patch)
tree29206d22147a523879db1b73b15ab6d920511086 /pkgs/applications/audio
parent324c8aaf25b2f2027af7798e5582ce3040a793b6 (diff)
downloadnixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar.gz
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar.bz2
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar.lz
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar.xz
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.tar.zst
nixlib-4e5a4eb4d617575f3163228ebb0feab41c24eb5d.zip
psst: add .desktop file
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/psst/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/applications/audio/psst/default.nix b/pkgs/applications/audio/psst/default.nix
index 5d41661b6d53..a3d05f97e45e 100644
--- a/pkgs/applications/audio/psst/default.nix
+++ b/pkgs/applications/audio/psst/default.nix
@@ -1,5 +1,17 @@
-{ lib, fetchFromGitHub, rustPlatform, alsa-lib, atk, cairo, dbus, gdk-pixbuf, glib, gtk3, pango, pkg-config }:
+{ lib, fetchFromGitHub, rustPlatform, alsa-lib, atk, cairo, dbus, gdk-pixbuf, glib, gtk3, pango, pkg-config, makeDesktopItem }:
 
+let
+  desktopItem = makeDesktopItem {
+    name = "Psst";
+    exec = "psst-gui";
+    comment = "Fast and multi-platform Spotify client with native GUI";
+    desktopName = "Psst";
+    type = "Application";
+    categories = [ "Audio" "AudioVideo" ];
+    icon = "psst";
+    terminal = false;
+  };
+in
 rustPlatform.buildRustPackage rec {
   pname = "psst";
   version = "unstable-2022-05-19";
@@ -29,7 +41,10 @@ rustPlatform.buildRustPackage rec {
   ];
 
   postInstall = ''
-    install -Dm444 psst-gui/assets/logo_512.png $out/share/icons/${pname}.png
+    mkdir -pv $out/share/icons/hicolor/512x512/apps
+    install -Dm444 psst-gui/assets/logo_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
+    mkdir -pv $out/share/applications
+    ln -s ${desktopItem}/share/applications/* $out/share/applications
   '';
 
   meta = with lib; {