treewide: install missing desktopItems

This commit is contained in:
h7x4 2023-12-01 22:17:20 +01:00
parent 5171694860
commit efdec26090
No known key found for this signature in database
GPG Key ID: 9F2F7D8250F35146
26 changed files with 143 additions and 0 deletions

View File

@ -36,6 +36,11 @@ stdenv.mkDerivation rec {
mkdir -p $out/share/cheesecutter/example_tunes
cp -r tunes/* $out/share/cheesecutter/example_tunes
install -Dm444 arch/fd/ccutter.desktop -t $out/share/applications
for res in $(ls icons | sed -e 's/cc//g' -e 's/.png//g'); do
install -Dm444 icons/cc$res.png $out/share/icons/hicolor/''${res}x''${res}/apps/cheesecutter.png
done
'';
postFixup =

View File

@ -36,6 +36,17 @@ mkDerivation rec {
PREFIXSHORTCUT=$out"
'';
postInstall = ''
mkdir -p $out/share/applications
ln -s $out/fmit.desktop $out/share/applications/fmit.desktop
mkdir -p $out/share/icons/hicolor/128x128/apps
ln -s $out/fmit.png $out/share/icons/hicolor/128x128/apps/fmit.png
mkdir -p $out/share/icons/hicolor/scalable/apps
ln -s $out/fmit.svg $out/share/icons/hicolor/scalable/apps/fmit.svg
'';
meta = with lib; {
description = "Free Musical Instrument Tuner";
longDescription = ''

View File

@ -55,6 +55,11 @@ python3.pkgs.buildPythonApplication rec {
librsvg
];
postInstall = ''
install -Dm444 gspeech.desktop -t $out/share/applications
install -Dm444 icons/*.svg -t $out/share/icons/hicolor/scalable/apps
'';
postFixup = ''
wrapProgram $out/bin/gspeech --prefix PATH : ${lib.makeBinPath [ picotts sox ]}
wrapProgram $out/bin/gspeech-cli --prefix PATH : ${lib.makeBinPath [ picotts sox ]}

View File

@ -56,6 +56,8 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cp in-formant $out/bin
install -Dm444 $src/dist-res/in-formant.desktop -t $out/share/applications
install -Dm444 $src/dist-res/in-formant.png -t $out/share/icons/hicolor/512x512/apps
'';
meta = with lib; {

View File

@ -47,6 +47,11 @@ stdenv.mkDerivation (finalAttrs: {
runHook preInstall
install -Dt $out/bin praat
install -Dm444 main/praat.desktop -t $out/share/applications
install -Dm444 main/praat-32.ico $out/share/icons/hicolor/32x32/apps/praat.ico
install -Dm444 main/praat-256.ico $out/share/icons/hicolor/256x256/apps/praat.ico
install -Dm444 main/praat-480.png $out/share/icons/hicolor/480x480/apps/praat.png
install -Dm444 main/praat-480.svg $out/share/icons/hicolor/scalable/apps/praat.svg
runHook postInstall
'';

View File

@ -20,6 +20,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ SDL2 ] ++ lib.optional stdenv.isLinux alsa-lib;
postInstall = ''
install -Dm444 "$src/release/other/Freedesktop.org Resources/ProTracker 2 clone.desktop" \
-t $out/share/applications
install -Dm444 "$src/release/other/Freedesktop.org Resources/ProTracker 2 clone.png" \
-t $out/share/icons/hicolor/512x512/apps
'';
passthru.tests = {
pt2-clone-opens = nixosTests.pt2-clone;
};

View File

@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
ruby
];
postInstall = ''
cp -r share $out/
'';
postFixup = ''
wrapProgram $out/bin/rrip_cli \
--prefix PATH : ${lib.makeBinPath [ cddiscid cdparanoia ruby ]}

View File

@ -95,6 +95,15 @@ mkDerivation rec {
dontWrapGApps = true;
postInstall = ''
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.png -t $out/share/icons/hicolor/256x256/apps
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/{ccViewer,cloudcompare}.desktop \
--replace 'Exec=cloudcompare.' 'Exec=' \
--replace 'Icon=''${SNAP}/meta/gui/' 'Icon=' \
--replace '.png' ""
'';
# fix file dialogs crashing on non-NixOS (and avoid double wrapping)
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")

View File

@ -41,6 +41,12 @@ rustPlatform.buildRustPackage rec {
AppKit
];
postInstall = ''
install -Dm444 assets/epick.desktop -t $out/share/applications
install -Dm444 assets/icon.svg $out/share/icons/hicolor/scalable/apps/epick.svg
install -Dm444 assets/icon.png $out/share/icons/hicolor/48x48/apps/epick.png
'';
postFixup = lib.optionalString stdenv.isLinux ''
patchelf $out/bin/epick --add-rpath ${lib.makeLibraryPath [ libGL ]}
'';

View File

@ -21,6 +21,14 @@ stdenv.mkDerivation rec {
installPhase = ''
install -D ./goxel $out/bin/goxel
for res in $(ls data/icons | sed -e 's/icon//g' -e 's/.png//g'); do
install -Dm444 data/icons/icon$res.png $out/share/icons/hicolor/''${res}x''${res}/apps/goxel.png
done
install -Dm444 snap/gui/goxel.desktop -t $out/share/applications
substituteInPlace $out/share/applications/goxel.desktop \
--replace 'Icon=''${SNAP}/icon.png' 'Icon=goxel'
'';
meta = with lib; {

View File

@ -66,6 +66,11 @@ rustPlatform.buildRustPackage rec {
"--skip=bench"
];
postInstall = ''
install -Dm444 $src/res/oculante.png -t $out/share/icons/hicolor/128x128/apps/
install -Dm444 $src/res/oculante.desktop -t $out/share/applications
'';
postFixup = lib.optionalString stdenv.isLinux ''
patchelf $out/bin/oculante --add-rpath ${lib.makeLibraryPath [ libxkbcommon libX11 ]}
'';

View File

@ -30,6 +30,15 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ gtk3-x11 atk glib librsvg ];
postInstall = ''
install -Dm444 res/icons/tk.categulario.pizarra.svg $out/share/icons/hicolor/scalable/apps/pizarra.svg
install -Dm444 res/pizarra.desktop -t $out/share/applications
substituteInPlace $out/share/applications/pizarra.desktop \
--replace "TryExec=/usr/bin/" "TryExec=" \
--replace "Exec=/usr/bin/" "Exec=" \
--replace "Icon=/usr/share/icons/hicolor/scalable/apps/pizarra.svg" "Icon=pizarra"
'';
meta = with lib; {
description = "A simple blackboard written in GTK";
longDescription = ''

View File

@ -52,6 +52,11 @@ stdenv.mkDerivation (finalAttrs: {
cp activate-linux $out/bin
cp activate-linux.1 $out/share/man/man1
install -Dm444 res/icon.png $out/share/icons/hicolor/128x128/apps/activate-linux.png
install -Dm444 res/activate-linux.desktop -t $out/share/applications
substituteInPlace $out/share/applications/activate-linux.desktop \
--replace 'Icon=icon' 'Icon=activate-linux'
runHook postInstall
'';

View File

@ -46,6 +46,11 @@ python3.pkgs.buildPythonApplication rec {
pygobject3
];
postInstall = ''
install -Dm444 fluxboxlauncher.desktop -t $out/share/applications
install -Dm444 fluxboxlauncher.svg -t $out/share/icons/hicolor/scalable/apps
'';
meta = with lib; {
description = "A Gui editor (gtk) to configure applications launching on a fluxbox session";
homepage = "https://github.com/mothsART/fluxboxlauncher";

View File

@ -43,6 +43,9 @@ mkDerivation rec {
postBuild = ''
mkdir $out/bin
mv $out/lib/klayout $out/bin/
install -Dm444 etc/klayout.desktop -t $out/share/applications
install -Dm444 etc/logo.png $out/share/icons/hicolor/256x256/apps/klayout.png
'';
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ];

View File

@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
install -d $out/bin
install build/llpp $out/bin
install misc/llpp.inotify $out/bin/llpp.inotify
install -Dm444 misc/llpp.desktop -t $out/share/applications
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/llpp \
--prefix PATH ":" "${xclip}/bin"

View File

@ -46,6 +46,11 @@ python310Packages.buildPythonApplication rec {
dontWrapGApps = true;
postInstall = ''
install -Dm444 nwg-displays.svg -t $out/share/icons/hicolor/scalable/apps
install -Dm444 nwg-displays.desktop -t $out/share/applications
'';
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}");
'';

View File

@ -55,6 +55,11 @@ python3Packages.buildPythonApplication rec {
doCheck = false; # there are no tests
postInstall = ''
install -Dm444 org.skytemple.SkyTemple.desktop -t $out/share/applications
install -Dm444 installer/skytemple.ico $out/share/icons/hicolor/256x256/apps/org.skytemple.SkyTemple.ico
'';
meta = with lib; {
homepage = "https://github.com/SkyTemple/skytemple";
description = "ROM hacking tool for Pokémon Mystery Dungeon Explorers of Sky";

View File

@ -30,6 +30,11 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-S4+cS4m69nqDN2h0vwyO35fFFBEa0Rcxx0XDBfSNLp0=";
postInstall = ''
install -Dm444 linux/com.system76.keyboardconfigurator.desktop -t $out/share/applications
cp -r data/icons $out/share
'';
meta = with lib; {
description = "Keyboard configuration application for System76 keyboards and laptops";
homepage = "https://github.com/pop-os/keyboard-configurator";

View File

@ -26,6 +26,10 @@ stdenv.mkDerivation rec {
wrapQtApp $out/XyGrib/XyGrib
mkdir -p $out/bin
ln -s $out/XyGrib/XyGrib $out/bin/xygrib
install -Dm444 $src/debian/xygrib.png -t $out/share/icons/hicolor/32x32/apps
install -Dm444 $src/debian/xygrib.desktop -t $out/share/applications
substituteInPlace $out/share/applications/xygrib.desktop \
--replace 'Exec=XyGrib' 'Exec=xygrib'
'';
meta = with lib; {

View File

@ -37,6 +37,8 @@ buildGoModule rec {
postInstall = ''
mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge # The cli is named like that in other distro packages
install -Dm444 dist/proton-bridge.desktop -t $out/share/applications
install -Dm444 dist/bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge.svg
'';
meta = with lib; {

View File

@ -41,6 +41,15 @@ buildGoModule rec {
IOKit
];
postInstall = ''
for res in $(ls internal/assets/icons | sed -e 's/icon-//g' -e 's/.png//g'); do
install -Dm444 internal/assets/icons/icon-$res.png \
$out/share/icons/hicolor/''${res}x''${res}/apps/io.github.jacalz.rymdport.png
done
install -Dm444 internal/assets/svg/icon.svg $out/share/icons/hicolor/scalable/apps/io.github.jacalz.rymdport.svg
install -Dm444 internal/assets/unix/io.github.jacalz.rymdport.desktop -t $out/share/applications
'';
meta = {
description = "Easy encrypted file, folder, and text sharing between devices";
homepage = "https://github.com/Jacalz/rymdport";

View File

@ -50,6 +50,16 @@ rustPlatform.buildRustPackage rec {
"--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github"
];
postInstall = ''
for res in $(ls resources/packaging/linux/graphics | sed -e 's/sniffnet_//g' -e 's/x.*//g'); do
install -Dm444 resources/packaging/linux/graphics/sniffnet_''${res}x''${res}.png \
$out/share/icons/hicolor/''${res}x''${res}/apps/sniffnet.png
done
install -Dm444 resources/packaging/linux/sniffnet.desktop -t $out/share/applications
substituteInPlace $out/share/applications/sniffnet.desktop \
--replace 'Exec=/usr/bin/sniffnet' 'Exec=sniffnet'
'';
postFixup = lib.optionalString stdenv.isLinux ''
patchelf $out/bin/sniffnet \
--add-rpath ${lib.makeLibraryPath [ vulkan-loader xorg.libX11 ]}

View File

@ -35,6 +35,8 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
install -Dm644 -t $out/lib/udev/rules.d 95-{3,}dscapture.rules
install -Dm444 -t $out/share/applications Cute{3,}DSCapture.desktop
install -Dm444 -t $out/share/icons/hicolor/128x128/apps Cute{3,}DSCapture.png
'';
meta = with lib; {

View File

@ -67,6 +67,11 @@ buildPerlModule rec {
];
dontWrapGApps = true;
postInstall = ''
cp -r share/* $out/share
'';
postFixup = ''
wrapProgram "$out/bin/pipe-viewer" \
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}"

View File

@ -70,6 +70,12 @@ in rustPlatform.buildRustPackage rec {
libxkbcommon
];
postInstall = ''
mkdir -p $out/share
cp -r resources/logo $out/share/icons
install -Dm444 resources/linux/ajour.desktop -t $out/share/applications
'';
fixupPhase = ''
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}:$(patchelf --print-rpath $out/bin/ajour)" $out/bin/ajour
wrapProgram $out/bin/ajour --prefix PATH ":" ${lib.makeBinPath [ zenity kdialog ]}