2018-10-30 12:40:53 +01:00
|
|
|
{ stdenv, newScope, makeWrapper
|
2019-06-25 08:51:07 +02:00
|
|
|
, electron, xdg_utils, makeDesktopItem
|
2017-11-16 08:22:41 +01:00
|
|
|
, auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU"
|
2018-06-25 21:29:25 +02:00
|
|
|
, auth0Domain ? "nixpkgs.auth0.com" }:
|
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 {};
|
2017-11-16 08:22:41 +01:00
|
|
|
rambox-bare = callPackage ./bare.nix {
|
2018-06-25 21:29:25 +02:00
|
|
|
inherit auth0ClientID auth0Domain;
|
2017-11-16 08:22:41 +01:00
|
|
|
};
|
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
|
|
|
|
2019-06-25 08:52:54 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-09-07 20:10:50 +02:00
|
|
|
|
2019-06-19 17:45:34 +02:00
|
|
|
dontUnpack = true;
|
2016-10-03 15:24:35 +02:00
|
|
|
|
2018-10-30 12:40:53 +01:00
|
|
|
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
|
|
|
|
2017-11-02 16:49:28 +01:00
|
|
|
installPhase = ''
|
2018-10-30 12:40:53 +01:00
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2019-06-25 08:51:07 +02:00
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/rambox \
|
2017-11-02 16:49:28 +01:00
|
|
|
--add-flags "${rambox-bare} --without-update" \
|
|
|
|
--prefix PATH : ${xdg_utils}/bin
|
2016-11-19 16:16:18 +01:00
|
|
|
'';
|
2018-08-06 12:19:13 +02:00
|
|
|
|
2020-01-15 19:16:59 +01:00
|
|
|
meta = rambox-bare.meta // {
|
2018-08-06 18:29:54 +02:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2020-01-15 19:16:59 +01:00
|
|
|
};
|
2016-10-03 15:24:35 +02:00
|
|
|
}
|