git.iko.soy/typeable/nixpkgs
on master help sign in
roundcube: don't resolve symlinks in update.sh

A side-effect of this is that the derivation required a rewrite in order to apply the patch properly.

commit324e6dba04ae636e10ac3cf72689fee9e578e530 authorMaximilian Bosch <maximilian@mbosch.me> dateTue 2 Apr 2019, 16:25 (8 years ago) parent6b6348e
2 files changed+42−8
pkgs/servers/roundcube/0001-Don-t-resolve-symlinks-when-trying-to-find-INSTALL_P.patch+27 pkgs/servers/roundcube/default.nix+15−8
pkgs/servers/roundcube/0001-Don-t-resolve-symlinks-when-trying-to-find-INSTALL_P.patchnew file+27
@@ -0,0 +1,27 @@
1+From c1832eabb99cec47f1714f696275285e1e28da34 Mon Sep 17 00:00:00 2001
2+From: Maximilian Bosch <maximilian@mbosch.me>
3+Date: Tue, 2 Apr 2019 16:20:50 +0200
4+Subject: [PATCH] Don't resolve symlinks when trying to find INSTALL_PATH
5+
6+Nix specific patch. This behavior breaks roundcube setups where plugins
7+are in a store path with symlinks to the actual source.
8+---
9+ bin/update.sh | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/bin/update.sh b/bin/update.sh
13+index 08e3bb5..b2ad498 100755
14+--- a/bin/update.sh
15++++ b/bin/update.sh
16+@@ -19,7 +19,7 @@
17+ +-----------------------------------------------------------------------+
18+ */
19+
20+-define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
21++define('INSTALL_PATH', __DIR__ . '/../' );
22+
23+ require_once INSTALL_PATH . 'program/include/clisetup.php';
24+
25+--
26+2.19.2
27+
pkgs/servers/roundcube/default.nix+15−8
@@ -1,14 +1,21 @@
1−{ lib, stdenv, fetchzip, buildEnv, roundcube, roundcubePlugins }:
2−let
1+{ lib, fetchurl, stdenv, buildEnv, roundcube, roundcubePlugins }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "roundcube";
35 version = "1.3.8";
4−in
5−fetchzip rec {
6− name= "roundcube-${version}";
76
8− url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz";
9− sha256 = "1lhwr13bglm8rqgamnb480b07wpqhw9bskjj2xxb0x8kdjly29ks";
7+ src = fetchurl {
8+ url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz";
9+ sha256 = "018djad7ygfl9c9f2l2j42qkg31ml3hs2f01f0dk361zckwk77n4";
10+ };
11+
12+ patches = [ ./0001-Don-t-resolve-symlinks-when-trying-to-find-INSTALL_P.patch ];
13+
14+ dontBuild = true;
1015
11− extraPostFetch = ''
16+ installPhase = ''
17+ mkdir $out
18+ cp -r * $out/
1219 ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php
1320 rm -rf $out/installer
1421 '';