diff options
author | h7x4 <h7x4@nani.wtf> | 2024-06-12 23:12:37 +0200 |
---|---|---|
committer | h7x4 <h7x4@nani.wtf> | 2024-06-12 23:12:37 +0200 |
commit | 7e3f2952c1a29c176c52644b51668b5b1c1795bd (patch) | |
tree | fa4445248665a38180003f88c830465855585875 /pkgs/by-name/sh | |
parent | ccaa736c45510015f175537ffd6b57b8759529b0 (diff) |
show-midi: add desktop item
Diffstat (limited to 'pkgs/by-name/sh')
-rw-r--r-- | pkgs/by-name/sh/show-midi/package.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/by-name/sh/show-midi/package.nix b/pkgs/by-name/sh/show-midi/package.nix index 4e3029921321c..f3f64967e627b 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 [ |