rambox: add menu item

This commit is contained in:
gnidorah 2017-11-08 22:57:23 +03:00
parent fb7c7304b8
commit e9c42f246f
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, newScope, makeWrapper, electron, xdg_utils }:
{ stdenv, newScope, makeWrapper, electron, xdg_utils, makeDesktopItem }:
let
callPackage = newScope self;
@ -7,6 +7,14 @@ let
rambox-bare = callPackage ./bare.nix {};
sencha = callPackage ./sencha {};
};
desktopItem = makeDesktopItem rec {
name = "Rambox";
exec = "rambox";
icon = "${self.rambox-bare}/resources/Icon.png";
desktopName = name;
genericName = "Rambox messenger";
categories = "Network;";
};
in
with self;
@ -22,5 +30,7 @@ stdenv.mkDerivation {
makeWrapper ${electron}/bin/electron $out/bin/rambox \
--add-flags "${rambox-bare} --without-update" \
--prefix PATH : ${xdg_utils}/bin
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications
'';
}

View File

@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
installPhase = ''
./SenchaCmd*.sh -q -dir $out -varfile response.varfile
# disallow sencha writing into /nix/store/repo
echo "repo.local.dir=$TMP/repo" >> $out/sencha.cfg
rm $out/shell-wrapper.sh $out/Uninstaller
'';