about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2024-03-07 01:45:56 -0500
committerGitHub <noreply@github.com>2024-03-07 01:45:56 -0500
commit62624b3f113fc8e951212158aba744727c35843a (patch)
tree6fe5223e23330e15b6733e724811ef24d2dc1bf3 /pkgs/applications/audio
parent65d1a901318aeaa9b67f7e1a1064ee3a6efbf3aa (diff)
parent978bb765826145a718292b7f4d2753d98a4c33a7 (diff)
downloadnixlib-62624b3f113fc8e951212158aba744727c35843a.tar
nixlib-62624b3f113fc8e951212158aba744727c35843a.tar.gz
nixlib-62624b3f113fc8e951212158aba744727c35843a.tar.bz2
nixlib-62624b3f113fc8e951212158aba744727c35843a.tar.lz
nixlib-62624b3f113fc8e951212158aba744727c35843a.tar.xz
nixlib-62624b3f113fc8e951212158aba744727c35843a.tar.zst
nixlib-62624b3f113fc8e951212158aba744727c35843a.zip
Merge pull request #267502 from liff/ncspot+desktop
ncspot: install desktop file and add `updateScript`
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/ncspot/default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix
index 1135404a43ea..9410a9a2d18f 100644
--- a/pkgs/applications/audio/ncspot/default.nix
+++ b/pkgs/applications/audio/ncspot/default.nix
@@ -12,6 +12,9 @@
 , withPulseAudio ? false, libpulseaudio
 , withPortAudio ? false, portaudio
 , withMPRIS ? true, withNotify ? true, dbus
+, nix-update-script
+, testers
+, ncspot
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -53,12 +56,22 @@ rustPlatform.buildRustPackage rec {
     ++ lib.optional withMPRIS "mpris"
     ++ lib.optional withNotify "notify";
 
+  postInstall = ''
+    install -D --mode=444 $src/misc/ncspot.desktop $out/share/applications/${pname}.desktop
+    install -D --mode=444 $src/images/logo.svg $out/share/icons/hicolor/scalable/apps/${pname}.png
+  '';
+
+  passthru = {
+    updateScript = nix-update-script { };
+    tests.version = testers.testVersion { package = ncspot; };
+  };
+
   meta = with lib; {
     description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes";
     homepage = "https://github.com/hrkfdn/ncspot";
     changelog = "https://github.com/hrkfdn/ncspot/releases/tag/v${version}";
     license = licenses.bsd2;
-    maintainers = [ maintainers.marsam ];
+    maintainers = with maintainers; [ marsam liff ];
     mainProgram = "ncspot";
   };
 }