From 55d01d690b47a2ea4ded5b3610dc6ec9ec3d9aa3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 1 Feb 2024 18:02:58 +0100 Subject: [PATCH] bristol: add desktop item --- pkgs/applications/audio/bristol/default.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix index 7884e3b7fa31..fc50691155ec 100644 --- a/pkgs/applications/audio/bristol/default.nix +++ b/pkgs/applications/audio/bristol/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, alsa-lib, libjack2, pkg-config, libpulseaudio, xorg }: +{ lib, stdenv, fetchurl, alsa-lib, libjack2, pkg-config, libpulseaudio, xorg, copyDesktopItems, makeDesktopItem }: stdenv.mkDerivation rec { pname = "bristol"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx"; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config copyDesktopItems ]; buildInputs = [ alsa-lib libjack2 @@ -34,6 +34,22 @@ stdenv.mkDerivation rec { sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol ''; + postInstall = '' + mkdir -p $out/share/icons/hicolor/scalable/apps/ + ln -s $out/share/bristol/bitmaps/bicon.svg $out/share/icons/hicolor/scalable/apps/ + ''; + + desktopItems = [ + (makeDesktopItem { + name = "Bristol"; + exec = "bristol"; + icon = "bicon"; + desktopName = "Bristol"; + comment = "Graphical user interface for the Bristol synthesizer emulator"; + categories = [ "AudioVideo" ]; + }) + ]; + meta = with lib; { description = "A range of synthesiser, electric piano and organ emulations"; homepage = "https://bristol.sourceforge.net";