]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - pkgs/webapps/roundcubemail/default.nix
Upgrade roundcube
[perso/Immae/Config/Nix.git] / pkgs / webapps / roundcubemail / default.nix
index ba85f3720700cfee90536d7ec942f671fc71cccc..4f288b8882389bd4ed0344b06a226d3ef00f9b57 100644 (file)
@@ -1,6 +1,6 @@
 { varDir ? "/var/lib/roundcubemail"
 , roundcube_config ? "/etc/roundcube/config.php"
-, stdenv, fetchurl }:
+, stdenv, fetchurl, jre, unzip }:
 let
   defaultInstall = ''
     mkdir -p $out
@@ -33,14 +33,23 @@ let
       withPlugins = morePlugins: moreSkins: old.withPlugins (morePlugins ++ plugins) (morePlugins ++ skins);
     };
   });
+  shrinker = fetchurl {
+    url = "http://dl.google.com/closure-compiler/compiler-latest.zip";
+    sha256 = "0naf3kflhlkm17ls1x7mgddd3b01f8yzbbbdjqwy5m12jmkzl2d5";
+  };
   package = stdenv.mkDerivation rec {
-    version = "1.4-rc1";
+    version = "1.4.4";
     name = "roundcubemail-${version}";
     src= fetchurl {
       url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/${name}-complete.tar.gz";
-      sha256 = "0p18wffwi2prh6vxhx1bc69qd1vwybggm8gvg3shahfdknxci9i4";
+      sha256 = "1my726p0wmsn21nbdsjx02h6hnbh8nidzipzdy0gk0qgda1j729b";
     };
+    patches = [ ./add_all.patch ]; # This patch includes js modification which requires to re-run the jsshrink below
+    buildInputs = [ unzip jre ];
     buildPhase = ''
+      mkdir -p /tmp
+      unzip -p "${shrinker}" "*.jar" > "/tmp/compiler.jar"
+      ./bin/jsshrink.sh
       sed -i \
         -e "s|RCUBE_INSTALL_PATH . 'temp.*|'${varDir}/cache';|" \
         config/defaults.inc.php