git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #31434 from gnidorah/rambox

rambox: add menu item

commit605453c61bb6ed36ad7605ab6850dc64be031c7b authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 9 Nov 2017, 11:30 (9 years ago) parentfb7c730e9c42f2
2 files changed+13−1
pkgs/applications/networking/instant-messengers/rambox/default.nix+11−1 pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix+2
pkgs/applications/networking/instant-messengers/rambox/default.nix+11−1
@@ -1,4 +1,4 @@
1−{ stdenv, newScope, makeWrapper, electron, xdg_utils }:
1+{ stdenv, newScope, makeWrapper, electron, xdg_utils, makeDesktopItem }:
22
33let
44 callPackage = newScope self;
@@ -7,6 +7,14 @@ let
77 rambox-bare = callPackage ./bare.nix {};
88 sencha = callPackage ./sencha {};
99 };
10+ desktopItem = makeDesktopItem rec {
11+ name = "Rambox";
12+ exec = "rambox";
13+ icon = "${self.rambox-bare}/resources/Icon.png";
14+ desktopName = name;
15+ genericName = "Rambox messenger";
16+ categories = "Network;";
17+ };
1018in
1119
1220with self;
@@ -22,5 +30,7 @@ stdenv.mkDerivation {
2230 makeWrapper ${electron}/bin/electron $out/bin/rambox \
2331 --add-flags "${rambox-bare} --without-update" \
2432 --prefix PATH : ${xdg_utils}/bin
33+ mkdir -p $out/share/applications
34+ ln -s ${desktopItem}/share/applications/* $out/share/applications
2535 '';
2636}
pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix+2
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
3131
3232 installPhase = ''
3333 ./SenchaCmd*.sh -q -dir $out -varfile response.varfile
34+ # disallow sencha writing into /nix/store/repo
35+ echo "repo.local.dir=$TMP/repo" >> $out/sencha.cfg
3436 rm $out/shell-wrapper.sh $out/Uninstaller
3537 '';
3638