From 37515f7df0e7f5ef6c032ff1b817c17c7dc00752 Mon Sep 17 00:00:00 2001 From: Pierre Labadens Date: Sun, 4 Apr 2021 17:22:20 +0200 Subject: [PATCH] free42: add desktop items Add a desktop item for both the `free42bin1 and `free42dec` variant of Free42. --- pkgs/applications/misc/free42/default.nix | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/free42/default.nix b/pkgs/applications/misc/free42/default.nix index c48e151e8ae..51867a6acee 100644 --- a/pkgs/applications/misc/free42/default.nix +++ b/pkgs/applications/misc/free42/default.nix @@ -1,6 +1,8 @@ { lib , stdenv , fetchFromGitHub +, makeDesktopItem +, copyDesktopItems , pkg-config , gtk3 , alsaLib @@ -17,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-Htk2NHgYVL622URx67BUtounAUopLTahaSqfAqd3+ZI="; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ copyDesktopItems pkg-config ]; buildInputs = [ gtk3 alsaLib ]; postPatch = '' @@ -55,6 +57,29 @@ stdenv.mkDerivation rec { runHook postInstall ''; + desktopItems = [ + (makeDesktopItem { + name = "com.thomasokken.free42bin"; + desktopName = "Free42Bin"; + genericName = "Calculator"; + exec = "free42bin"; + type = "Application"; + comment = meta.description; + categories = "Utility;Calculator;"; + terminal = "false"; + }) + (makeDesktopItem { + name = "com.thomasokken.free42dec"; + desktopName = "Free42Dec"; + genericName = "Calculator"; + exec = "free42dec"; + type = "Application"; + comment = meta.description; + categories = "Utility;Calculator;"; + terminal = "false"; + }) + ]; + meta = with lib; { homepage = "https://github.com/thomasokken/free42"; description = "A software clone of HP-42S Calculator";