about summary refs log tree commit diff
path: root/pkgs/by-name/zx/zxtune/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/zx/zxtune/package.nix')
-rw-r--r--pkgs/by-name/zx/zxtune/package.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/by-name/zx/zxtune/package.nix b/pkgs/by-name/zx/zxtune/package.nix
index 436a241533662..11a283a4eb2ba 100644
--- a/pkgs/by-name/zx/zxtune/package.nix
+++ b/pkgs/by-name/zx/zxtune/package.nix
@@ -25,6 +25,8 @@
 , withQt ? true
 , qt5
 , zip
+, makeDesktopItem
+, copyDesktopItems
 }:
 let
   dlopenBuildInputs = []
@@ -41,7 +43,7 @@ let
     ++ lib.optional withQt (if (supportWayland) then qt5.qtwayland else qt5.qtbase);
 in stdenv.mkDerivation rec {
   pname = "zxtune";
-  version = "5056";
+  version = "5061";
 
   outputs = [ "out" ];
 
@@ -49,7 +51,7 @@ in stdenv.mkDerivation rec {
     owner = "zxtune";
     repo = "zxtune";
     rev = "r${version}";
-    hash = "sha256-zvLbgS8AFW4kkvTccGXcr1KEw3EH47XcHwzq6CKzusQ=";
+    hash = "sha256-KhGxVq0dDvsAMdnr/MRiVbw6mhl/3Vv7D+NSb+fDhgk=";
   };
 
   passthru.updateScript = nix-update-script {
@@ -58,7 +60,11 @@ in stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  nativeBuildInputs = lib.optionals withQt [ zip qt5.wrapQtAppsHook ];
+  nativeBuildInputs = lib.optionals withQt [
+    zip
+    qt5.wrapQtAppsHook
+    copyDesktopItems
+  ];
 
   buildInputs = staticBuildInputs ++ dlopenBuildInputs;
 
@@ -118,6 +124,7 @@ in stdenv.mkDerivation rec {
     install -Dm755 bin/linux/release/zxtune123 -t $out/bin
   '' + lib.optionalString withQt ''
     install -Dm755 bin/linux/release/zxtune-qt -t $out/bin
+    install -Dm755 apps/zxtune-qt/res/theme_default/zxtune.png -t $out/share/icons/hicolor/48x48/apps
   '' + ''
     runHook postInstall
   '';
@@ -128,6 +135,17 @@ in stdenv.mkDerivation rec {
     wrapQtApp "$out/bin/zxtune-qt"
   '';
 
+  desktopItems = lib.optionals withQt [(makeDesktopItem {
+    name = "ZXTune";
+    exec = "zxtune-qt";
+    icon = "zxtune";
+    desktopName = "ZXTune";
+    genericName = "ZXTune";
+    comment = meta.description;
+    categories = [ "Audio" ];
+    type = "Application";
+  })];
+
   meta = with lib; {
     description = "Crossplatform chiptunes player";
     longDescription = ''