Merge pull request #31434 from gnidorah/rambox

rambox: add menu item
This commit is contained in:
Jörg Thalheim 2017-11-09 11:30:49 +00:00 committed by GitHub
commit 605453c61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

@ -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
'';
}

@ -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
'';