mail2-nixos-config/pkg-roundcube.nix

34 lines
1 KiB
Nix
Raw Normal View History

2019-05-10 23:21:28 +02:00
{ stdenv, lib, fetchurl, acl, librsync, ncurses, openssl, zlib, conf ? null, temp ? null, logs ? null }:
stdenv.mkDerivation rec {
name = "roundcube-${version}";
2020-10-05 21:54:51 +02:00
version = "1.4.9";
2019-05-10 23:21:28 +02:00
url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz";
src = fetchurl {
inherit url;
curlOpts = "--location";
2020-10-05 21:54:51 +02:00
sha256 = "1cpcr3abjq1f2af0ca571y976yni48z3rh3x146c6ninl5ip9b4z";
2019-05-10 23:21:28 +02:00
};
2020-12-27 23:48:37 +01:00
preferLocalBuild = true;
2019-05-10 23:21:28 +02:00
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
cp -Rp ./ $out/
cd "$out"
${lib.optionalString (conf != null) "ln -s ${conf} $out/config/config.inc.php"}
${lib.optionalString (temp != null) "mv temp temp.dist; ln -s ${temp} $out/temp"}
${lib.optionalString (logs != null) "mv logs logs.dist; ln -s ${logs} $out/logs"}
'';
meta = with stdenv.lib; {
description = "Roundcube";
homepage = https://roundcube.net/;
license = licenses.agpl3;
maintainers = with maintainers; [ tokudan ];
platforms = platforms.all;
};
}