From b6e15bde7a48f9ee1b0e44b0def6b3d20e241a93 Mon Sep 17 00:00:00 2001 From: Emmanuel Rosa Date: Sun, 9 Jul 2017 15:04:47 -0400 Subject: [PATCH] pgadmin: make desktop item This change adds the .desktop file so that pgAdmin shows up in the menu system of desktop environments (ex. GNOME, XFCE, etc). Closes #27067 --- pkgs/applications/misc/pgadmin/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/pgadmin/default.nix b/pkgs/applications/misc/pgadmin/default.nix index fba7b6371f67..968071e454e2 100644 --- a/pkgs/applications/misc/pgadmin/default.nix +++ b/pkgs/applications/misc/pgadmin/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, postgresql, wxGTK, libxml2, libxslt, openssl, zlib }: +{ stdenv, fetchurl, postgresql, wxGTK, libxml2, libxslt, openssl, zlib, makeDesktopItem }: stdenv.mkDerivation rec { name = "pgadmin3-${version}"; @@ -29,4 +29,21 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ domenkozar wmertens ]; platforms = platforms.unix; }; + + postFixup = let + desktopItem = makeDesktopItem { + name = "pgAdmin"; + desktopName = "pgAdmin III"; + genericName = "SQL Administration"; + exec = "pgadmin3"; + icon = "pgAdmin3"; + type = "Application"; + categories = "Application;Development;"; + mimeType = "text/html"; + }; + in '' + mkdir -p $out/share/pixmaps; + cp pgadmin/include/images/pgAdmin3.png $out/share/pixmaps/; + cp -rv ${desktopItem}/share/applications $out/share/ + ''; }