Skip to content

Commit b63d2c3

Browse files
Emmanuel RosaMic92
Emmanuel Rosa
authored andcommittedJul 12, 2017
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 (cherry picked from commit b6e15bd)
1 parent 7f63d3b commit b63d2c3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed
 

‎pkgs/applications/misc/pgadmin/default.nix

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchurl, postgresql, wxGTK, libxml2, libxslt, openssl, zlib }:
1+
{ stdenv, fetchurl, postgresql, wxGTK, libxml2, libxslt, openssl, zlib, makeDesktopItem }:
22

33
stdenv.mkDerivation rec {
44
name = "pgadmin3-${version}";
@@ -29,4 +29,21 @@ stdenv.mkDerivation rec {
2929
maintainers = with maintainers; [ domenkozar wmertens ];
3030
platforms = platforms.unix;
3131
};
32+
33+
postFixup = let
34+
desktopItem = makeDesktopItem {
35+
name = "pgAdmin";
36+
desktopName = "pgAdmin III";
37+
genericName = "SQL Administration";
38+
exec = "pgadmin3";
39+
icon = "pgAdmin3";
40+
type = "Application";
41+
categories = "Application;Development;";
42+
mimeType = "text/html";
43+
};
44+
in ''
45+
mkdir -p $out/share/pixmaps;
46+
cp pgadmin/include/images/pgAdmin3.png $out/share/pixmaps/;
47+
cp -rv ${desktopItem}/share/applications $out/share/
48+
'';
3249
}

0 commit comments

Comments
 (0)
Please sign in to comment.