nixpkgs-suyu/pkgs/applications/networking/instant-messengers/rambox/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, newScope, makeWrapper, electron, xdg_utils, makeDesktopItem
, auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU"
2017-12-16 19:36:33 +01:00
, auth0Domain ? "nixpkgs.auth0.com"
, disableTooltips ? false }:
2016-10-03 15:24:35 +02:00
2016-10-12 08:54:47 +02:00
let
2017-11-02 16:49:28 +01:00
callPackage = newScope self;
self = {
fetchNodeModules = callPackage ./fetchNodeModules.nix {};
rambox-bare = callPackage ./bare.nix {
2017-12-16 19:36:33 +01:00
inherit auth0ClientID auth0Domain disableTooltips;
};
2017-11-02 16:49:28 +01:00
sencha = callPackage ./sencha {};
2016-10-03 15:24:35 +02:00
};
2017-11-08 20:57:23 +01:00
desktopItem = makeDesktopItem rec {
name = "Rambox";
exec = "rambox";
icon = "${self.rambox-bare}/resources/Icon.png";
desktopName = name;
genericName = "Rambox messenger";
categories = "Network;";
};
2017-11-02 16:49:28 +01:00
in
2016-10-03 15:24:35 +02:00
2017-11-02 16:49:28 +01:00
with self;
2016-10-03 15:24:35 +02:00
2017-11-02 16:49:28 +01:00
stdenv.mkDerivation {
name = "rambox-${rambox-bare.version}";
2017-09-07 20:10:50 +02:00
2017-11-02 16:49:28 +01:00
nativeBuildInputs = [ makeWrapper ];
2017-09-07 20:10:50 +02:00
2017-11-02 16:49:28 +01:00
unpackPhase = ":";
2016-10-03 15:24:35 +02:00
2017-11-02 16:49:28 +01:00
installPhase = ''
makeWrapper ${electron}/bin/electron $out/bin/rambox \
--add-flags "${rambox-bare} --without-update" \
--prefix PATH : ${xdg_utils}/bin
2017-11-08 20:57:23 +01:00
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications
'';
2016-10-03 15:24:35 +02:00
}