nixpkgs/pkgs/servers/roundcube/default.nix
Maximilian Bosch d75c296dc2
roundcube: 1.3.10 -> 1.4.0
https://roundcube.net/news/2019/11/09/roundcube-1.4.0-released

* `curl` cmd in the test can fail as roundcube returns a http/401 if
  unauthorized (and we're explicitly requesting the login form). By
  checking if the `persistent_login` plugin is loaded, the assertion is
  still valid)

* Use `$argv[0]` to determine install path in the installer script. I'm
  not exactly sure why, but it seems as `__DIR__` now resolves symlinks
  which breaks the installer if roundcube is in a `buildEnv` with
  third-party plugins.
2019-11-10 18:41:26 +01:00

35 lines
970 B
Nix

{ fetchurl, stdenv, buildEnv, roundcube, roundcubePlugins }:
stdenv.mkDerivation rec {
pname = "roundcube";
version = "1.4.0";
src = fetchurl {
url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz";
sha256 = "0b7gc342z0smn7q6cnznj9ncal0515ki4kkq1hlmqmyn0nna5lkb";
};
patches = [ ./0001-Don-t-resolve-symlinks-when-trying-to-find-INSTALL_P.patch ];
dontBuild = true;
installPhase = ''
mkdir $out
cp -r * $out/
ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php
rm -rf $out/installer
'';
passthru.withPlugins = f: buildEnv {
name = "${roundcube.name}-with-plugins";
paths = (f roundcubePlugins) ++ [ roundcube ];
};
meta = {
description = "Open Source Webmail Software";
maintainers = with stdenv.lib.maintainers; [ vskilet globin ];
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.all;
};
}