openutau: Provide desktop file (#370443)

authored by Arne Keller and committed by GitHub 8ffa3db8 9ef81375

+27 -3
+27 -3
pkgs/applications/audio/openutau/default.nix
··· 6 6 , dbus 7 7 , fontconfig 8 8 , portaudio 9 + , copyDesktopItems 10 + , makeDesktopItem 9 11 }: 10 12 11 13 buildDotnetModule rec { ··· 18 20 rev = "build/${version}"; 19 21 hash = "sha256-HE0KxPKU7tYZbYiCL8sm6I/NZiX0MJktt+5d6qB1A2E="; 20 22 }; 23 + 24 + nativeBuildInputs = [ copyDesktopItems ]; 25 + 26 + desktopItems = [ 27 + (makeDesktopItem { 28 + name = "openutau"; 29 + desktopName = "OpenUtau"; 30 + startupWMClass = "openutau"; 31 + icon = "openutau"; 32 + genericName = "Utau"; 33 + comment = "Open source UTAU successor"; 34 + exec = "OpenUtau"; 35 + categories = [ "Music" ]; 36 + }) 37 + ]; 21 38 22 39 dotnet-sdk = dotnetCorePackages.sdk_8_0; 23 40 dotnet-runtime = dotnetCorePackages.runtime_8_0; ··· 58 75 else if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then "linux-arm64" 59 76 else if stdenv.hostPlatform.isDarwin then "osx" 60 77 else null; 61 - in lib.optionalString (runtime != null) '' 62 - cp runtimes/${runtime}/native/libworldline${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/OpenUtau/ 63 - ''; 78 + shouldInstallResampler = lib.optionalString (runtime != null) '' 79 + cp runtimes/${runtime}/native/libworldline${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/OpenUtau/ 80 + ''; 81 + shouldInstallDesktopItem = lib.optionalString stdenv.hostPlatform.isLinux '' 82 + install -Dm655 -t $out/share/icons/hicolor/scalable/apps Logo/openutau.svg 83 + ''; 84 + in '' 85 + ${shouldInstallResampler} 86 + ${shouldInstallDesktopItem} 87 + ''; 64 88 65 89 passthru.updateScript = ./update.sh; 66 90