diff options
author | Joachim Fasting <joachifm@users.noreply.github.com> | 2016-05-27 16:57:32 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@users.noreply.github.com> | 2016-05-27 16:57:32 +0200 |
commit | 39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85 (patch) | |
tree | 83ede1393d04abcacbe6ad1e8c1cb9ac2efdcafe | |
parent | 0eaea886b99f352358490863e24aae1eb17c1593 (diff) | |
parent | 79a50c0473d83e8c76dbf4a5a5473feeee4e151c (diff) | |
download | nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar.gz nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar.bz2 nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar.lz nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar.xz nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.tar.zst nixlib-39d7f65a33b034dc6a33ce07a4b1d5deb9d8ea85.zip |
Merge pull request #15710 from chris-martin/sublime-desktop-item
sublime: add a desktop item and icons
-rw-r--r-- | pkgs/applications/editors/sublime/default.nix | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pkgs/applications/editors/sublime/default.nix b/pkgs/applications/editors/sublime/default.nix index a002d14c98c8..1f4be1ac5085 100644 --- a/pkgs/applications/editors/sublime/default.nix +++ b/pkgs/applications/editors/sublime/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, glib, xorg, cairo, gtk}: +{ fetchurl, stdenv, glib, xorg, cairo, gtk, makeDesktopItem }: let libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk cairo]; in @@ -31,8 +31,27 @@ stdenv.mkDerivation rec { --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ $out/sublime/sublime_text + + mkdir -p $out/share/icons + + for x in $(ls $out/sublime/Icon); do + mkdir -p $out/share/icons/hicolor/$x/apps + cp -v $out/sublime/Icon/$x/* $out/share/icons/hicolor/$x/apps + done + + ln -sv "${desktopItem}/share/applications" $out/share ''; + desktopItem = makeDesktopItem { + name = "sublime2"; + exec = "sublime2 %F"; + comment = meta.description; + desktopName = "Sublime Text"; + genericName = "Text Editor"; + categories = "TextEditor;Development;"; + icon = "sublime_text"; + }; + meta = { description = "Sophisticated text editor for code, markup and prose"; license = stdenv.lib.licenses.unfree; |