diff --git a/pkgs/by-name/cr/cryptor/package.nix b/pkgs/by-name/cr/cryptor/package.nix index edbaa0903b0a..b48662b2992f 100644 --- a/pkgs/by-name/cr/cryptor/package.nix +++ b/pkgs/by-name/cr/cryptor/package.nix @@ -42,6 +42,10 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' wrapProgram $out/bin/cryptor \ --prefix PATH : "${lib.makeBinPath [ gocryptfs ]}" + + install -Dm444 $src/resources/misc/cryptor.desktop -t $out/share/applications + substituteInPlace $out/share/applications/cryptor.desktop \ + --replace-warn '/usr/bin/cryptor' 'cryptor' ''; meta = { diff --git a/pkgs/by-name/sh/show-midi/package.nix b/pkgs/by-name/sh/show-midi/package.nix index 4e3029921321..f3f64967e627 100644 --- a/pkgs/by-name/sh/show-midi/package.nix +++ b/pkgs/by-name/sh/show-midi/package.nix @@ -9,6 +9,8 @@ , libXinerama , libXext , libXcursor +, makeDesktopItem +, copyDesktopItems }: stdenv.mkDerivation (finalAttrs: { @@ -23,7 +25,10 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + copyDesktopItems + ]; buildInputs = [ alsa-lib freetype @@ -53,6 +58,8 @@ stdenv.mkDerivation (finalAttrs: { install -Dt $out/share/ShowMIDI/themes Themes/* + install -D Design/icon.png $out/share/icons/hicolor/1024x1024/apps/show-midi.png + mkdir -p $out/bin $out/lib/lv2 $out/lib/vst3 cd Builds/LinuxMakefile/build/ cp -r ShowMIDI.lv2 $out/lib/lv2 @@ -62,6 +69,16 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + desktopItems = [(makeDesktopItem { + name = "ShowMIDI"; + exec = finalAttrs.meta.mainProgram; + comment = finalAttrs.meta.description; + type = "Application"; + icon = "show-midi"; + desktopName = "ShowMIDI"; + categories = [ "Audio" ]; + })]; + # JUCE dlopens these, make sure they are in rpath # Otherwise, segfault will happen env.NIX_LDFLAGS = toString [ diff --git a/pkgs/by-name/un/unciv/package.nix b/pkgs/by-name/un/unciv/package.nix index ab6ba743e75c..2f41aa57ecba 100644 --- a/pkgs/by-name/un/unciv/package.nix +++ b/pkgs/by-name/un/unciv/package.nix @@ -15,9 +15,15 @@ let exec = "unciv"; comment = "An open-source Android/Desktop remake of Civ V"; desktopName = "Unciv"; + icon = "unciv"; categories = [ "Game" ]; }; + desktopIcon = fetchurl { + url = "https://github.com/yairm210/Unciv/blob/4.11.16/extraImages/Icons/Unciv%20icon%20v6.png?raw=true"; + hash = "sha256-Zuz+HGfxjGviGBKTiHdIFXF8UMRLEIfM8f+LIB/xonk="; + }; + envLibPath = lib.makeLibraryPath (lib.optionals stdenv.isLinux [ libGL libpulseaudio @@ -46,6 +52,8 @@ stdenv.mkDerivation rec { --prefix PATH : ${lib.makeBinPath [ jre ]} \ --add-flags "-jar ${src}" + install -Dm444 ${desktopIcon} $out/share/icons/hicolor/512x512/apps/unciv.png + runHook postInstall ''; diff --git a/pkgs/by-name/yt/yt-dlg/package.nix b/pkgs/by-name/yt/yt-dlg/package.nix index e245cba7c2a2..8cc4d65b2a91 100644 --- a/pkgs/by-name/yt/yt-dlg/package.nix +++ b/pkgs/by-name/yt/yt-dlg/package.nix @@ -40,6 +40,11 @@ python3Packages.buildPythonApplication rec { wxpython ]; + postInstall = '' + install -Dm444 yt-dlg.desktop -t $out/share/applications + cp -r youtube_dl_gui/data/* $out/share + ''; + meta = { description = "Cross platform front-end GUI of the popular youtube-dl written in wxPython"; homepage = "https://oleksis.github.io/youtube-dl-gui"; diff --git a/pkgs/by-name/zx/zxtune/package.nix b/pkgs/by-name/zx/zxtune/package.nix index e406afbb681b..11a283a4eb2b 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 = [] @@ -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 = ''