From 8a325c4dff5022c0ad3920818210d1c1ad955e72 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Thu, 16 Nov 2017 11:33:39 +0000 Subject: zotero: add desktop entry --- pkgs/applications/office/zotero/default.nix | 38 +++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/zotero/default.nix b/pkgs/applications/office/zotero/default.nix index 4d66d3dd349a..b259623bf91e 100644 --- a/pkgs/applications/office/zotero/default.nix +++ b/pkgs/applications/office/zotero/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, buildFHSUserEnv, writeTextFile, bash, wrapGAppsHook, gsettings_desktop_schemas, gtk3, gnome3 }: +{ stdenv, fetchurl, buildFHSUserEnv, makeDesktopItem, runCommand, bash, wrapGAppsHook, gsettings_desktop_schemas, gtk3, gnome3 }: let version = "5.0.25"; @@ -37,12 +37,30 @@ fhsEnv = buildFHSUserEnv { ]; }; -in writeTextFile { - name = "zotero"; - destination = "/bin/zotero"; - executable = true; - text = '' - #!${bash}/bin/bash - ${fhsEnv}/bin/zotero-fhs-env ${zoteroSrc}/bin/zotero - ''; -} // {inherit meta; } +desktopItem = makeDesktopItem rec { + name = "zotero-${version}"; + exec = "zotero -url %U"; + icon = "zotero"; + type = "Application"; + comment = meta.description; + desktopName = "Zotero"; + genericName = "Reference Management"; + categories = "Office;Database;"; + startupNotify = "true"; +}; + +in runCommand "zotero-${version}" { inherit meta; } '' + mkdir -p $out/bin $out/share/applications + cat >$out/bin/zotero <