2017-12-16 18:36:33 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchNodeModules, nodejs-8_x, ruby, sencha
|
2018-06-25 20:29:25 +01:00
|
|
|
, auth0ClientID, auth0Domain }:
|
2017-11-02 15:49:28 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rambox-bare-${version}";
|
2018-12-06 05:04:03 +00:00
|
|
|
version = "0.6.3";
|
2017-11-02 15:49:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-10-24 12:24:21 +01:00
|
|
|
owner = "ramboxapp";
|
|
|
|
repo = "community-edition";
|
2017-11-02 15:49:28 +00:00
|
|
|
rev = version;
|
2018-12-06 05:04:03 +00:00
|
|
|
sha256 = "1ghk29d0x6i3j8b1b4xxgyf961lp17qsvvhnilnkh1nhmvxpwmw5";
|
2017-11-02 15:49:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ nodejs-8_x ruby sencha ];
|
|
|
|
|
|
|
|
node_modules = fetchNodeModules {
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
nodejs = nodejs-8_x;
|
2019-01-10 04:50:10 +00:00
|
|
|
sha256 = "1m883gjxcihnik88fyj54f4z4m786pwl3a90k151v9bnbslf3k6i";
|
2017-11-02 15:49:28 +00:00
|
|
|
};
|
|
|
|
|
2018-06-25 20:29:25 +01:00
|
|
|
patches = [ ./isDev.patch ];
|
2017-11-02 15:49:28 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
echo 'var auth0Cfg = { clientID: "${auth0ClientID}", domain: "${auth0Domain}" };' > env.js
|
|
|
|
ln -s ${node_modules} node_modules
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir ../rambox-build
|
|
|
|
npm run sencha:compile:build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mv ../rambox-build/ $out
|
|
|
|
|
|
|
|
# https://github.com/saenzramiro/rambox/issues/1281
|
|
|
|
echo '{"name": "rambox", "version": "${version}", "main": "electron/main.js"}' > $out/package.json
|
|
|
|
|
|
|
|
# https://github.com/saenzramiro/rambox/issues/1282
|
|
|
|
cp --parents ext/packages/ext-locale/build/ext-locale-*.js $out
|
|
|
|
|
|
|
|
# Symbolic link causes `Uncaught Error: Cannot find module 'immutable'`
|
|
|
|
cp -r ${node_modules} $out/node_modules
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Messaging and emailing app that combines common web applications into one";
|
|
|
|
homepage = http://rambox.pro;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ gnidorah ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|