2018-06-28 20:54:44 +01:00
|
|
|
{ stdenv, fetchurl, unzip, dataPath ? "/etc/rainloop" }: let
|
|
|
|
common = { edition, sha256 }:
|
|
|
|
stdenv.mkDerivation (rec {
|
|
|
|
name = "rainloop-${edition}-${version}";
|
2019-08-20 23:10:19 +01:00
|
|
|
version = "1.13.0";
|
2018-06-28 20:54:44 +01:00
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir rainloop
|
|
|
|
unzip -q -d rainloop $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/RainLoop/rainloop-webmail/releases/download/v${version}/rainloop-${edition}${stdenv.lib.optionalString (edition != "") "-"}${version}.zip";
|
|
|
|
sha256 = sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r rainloop/* $out
|
|
|
|
rm -rf $out/data
|
|
|
|
ln -s ${dataPath} $out/data
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple, modern & fast web-based email client";
|
|
|
|
homepage = "https://www.rainloop.net";
|
|
|
|
downloadPage = https://github.com/RainLoop/rainloop-webmail/releases;
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ das_j ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
rainloop-community = common {
|
|
|
|
edition = "community";
|
2019-08-20 23:10:19 +01:00
|
|
|
sha256 = "1skwq6bn98142xf8r77b818fy00nb4x0s1ii3mw5849ih94spx40";
|
2018-06-28 20:54:44 +01:00
|
|
|
};
|
|
|
|
rainloop-standard = common {
|
|
|
|
edition = "";
|
2019-08-25 12:31:04 +01:00
|
|
|
sha256 = "e3ec8209cb3b9f092938a89094e645ef27659763432bedbe7fad4fa650554222";
|
2018-06-28 20:54:44 +01:00
|
|
|
};
|
|
|
|
}
|