aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-07 10:20:12 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-07 10:20:12 +0200
commitfffbbb5623649ca7c7b32b74558a26ec5cf11abb (patch)
treec8746e1d1072072d8b2d0480da5a3fd512d0ed03 /pkgs/webapps
parentb44b42a15197813060bf9405d5a07b8b2c699af5 (diff)
downloadNix-fffbbb5623649ca7c7b32b74558a26ec5cf11abb.tar.gz
Nix-fffbbb5623649ca7c7b32b74558a26ec5cf11abb.tar.zst
Nix-fffbbb5623649ca7c7b32b74558a26ec5cf11abb.zip
Add roundcubemail to pkgs
Diffstat (limited to 'pkgs/webapps')
-rw-r--r--pkgs/webapps/default.nix17
-rw-r--r--pkgs/webapps/roundcubemail/default.nix61
-rw-r--r--pkgs/webapps/roundcubemail/plugins/automatic_addressbook/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/carddav/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/html5_notifier/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/message_highlight/default.nix7
-rw-r--r--pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix7
10 files changed, 134 insertions, 0 deletions
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix
index f9ecd4f..073905c 100644
--- a/pkgs/webapps/default.nix
+++ b/pkgs/webapps/default.nix
@@ -50,6 +50,23 @@ rec {
50 phpldapadmin = callPackage ./phpldapadmin {}; 50 phpldapadmin = callPackage ./phpldapadmin {};
51 rompr = callPackage ./rompr { inherit mylibs; }; 51 rompr = callPackage ./rompr { inherit mylibs; };
52 52
53 roundcubemail = callPackage ./roundcubemail {};
54 roundcubemail-with-plugins-skins = roundcubemail.withPlugins (builtins.attrValues roundcubemail-plugins) (builtins.attrValues roundcubemail-skins);
55 roundcubemail-skins = let
56 names = [];
57 in
58 lib.attrsets.genAttrs names
59 (name: callPackage (./roundcubemail/skins + "/${name}") {});
60 roundcubemail-plugins = let
61 names = [
62 "automatic_addressbook" "carddav" "contextmenu"
63 "contextmenu_folder" "html5_notifier" "ident_switch"
64 "message_highlight" "thunderbird_labels"
65 ];
66 in
67 lib.attrsets.genAttrs names
68 (name: callPackage (./roundcubemail/plugins + "/${name}") { buildPlugin = roundcubemail.buildPlugin; });
69
53 yourls = callPackage ./yourls { inherit mylibs; }; 70 yourls = callPackage ./yourls { inherit mylibs; };
54 yourls-with-plugins = yourls.withPlugins (builtins.attrValues yourls-plugins); 71 yourls-with-plugins = yourls.withPlugins (builtins.attrValues yourls-plugins);
55 yourls-plugins = let 72 yourls-plugins = let
diff --git a/pkgs/webapps/roundcubemail/default.nix b/pkgs/webapps/roundcubemail/default.nix
new file mode 100644
index 0000000..ba85f37
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/default.nix
@@ -0,0 +1,61 @@
1{ varDir ? "/var/lib/roundcubemail"
2, roundcube_config ? "/etc/roundcube/config.php"
3, stdenv, fetchurl }:
4let
5 defaultInstall = ''
6 mkdir -p $out
7 cp -R . $out/
8 cd $out
9 if [ -d skins -a -d skins/larry -a ! -d skins/elastic ]; then
10 ln -s larry skins/elastic
11 fi
12 '';
13 buildPlugin = { appName, version, url, sha256, installPhase ? defaultInstall }:
14 stdenv.mkDerivation rec {
15 name = "roundcube-${appName}-${version}";
16 inherit version;
17 phases = "unpackPhase installPhase";
18 inherit installPhase;
19 src = fetchurl { inherit url sha256; };
20 passthru.pluginName = appName;
21 };
22 withPlugins = plugins: skins: package.overrideAttrs(old: {
23 name = "${old.name}${if builtins.length skins > 0 then "-with-skins" else ""}${if builtins.length plugins > 0 then "-with-plugins" else ""}";
24 installPhase = old.installPhase +
25 builtins.concatStringsSep "\n" (
26 map (value: "ln -s ${value} $out/plugins/${value.pluginName}") plugins
27 ) +
28 builtins.concatStringsSep "\n" (
29 map (value: "ln -s ${value} $out/skins/${value.skinName}") skins
30 );
31 passthru = old.passthru // {
32 inherit plugins skins;
33 withPlugins = morePlugins: moreSkins: old.withPlugins (morePlugins ++ plugins) (morePlugins ++ skins);
34 };
35 });
36 package = stdenv.mkDerivation rec {
37 version = "1.4-rc1";
38 name = "roundcubemail-${version}";
39 src= fetchurl {
40 url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/${name}-complete.tar.gz";
41 sha256 = "0p18wffwi2prh6vxhx1bc69qd1vwybggm8gvg3shahfdknxci9i4";
42 };
43 buildPhase = ''
44 sed -i \
45 -e "s|RCUBE_INSTALL_PATH . 'temp.*|'${varDir}/cache';|" \
46 config/defaults.inc.php
47 sed -i \
48 -e "s|RCUBE_INSTALL_PATH . 'logs.*|'${varDir}/logs';|" \
49 config/defaults.inc.php
50 '';
51 installPhase = ''
52 cp -a . $out
53 ln -s ${roundcube_config} $out/config/config.inc.php
54 '';
55 passthru = {
56 plugins = [];
57 skins = [];
58 inherit withPlugins buildPlugin;
59 };
60 };
61in package
diff --git a/pkgs/webapps/roundcubemail/plugins/automatic_addressbook/default.nix b/pkgs/webapps/roundcubemail/plugins/automatic_addressbook/default.nix
new file mode 100644
index 0000000..cd9efee
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/automatic_addressbook/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "automatic_addressbook";
4 version = "0.4.3";
5 url = "https://github.com/sblaisot/${appName}/archive/${version}.tar.gz";
6 sha256 = "0bx5qjzp3a3wc72fr295bvgsy5n15949c041hq76n6c7sqdn7inc";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/carddav/default.nix b/pkgs/webapps/roundcubemail/plugins/carddav/default.nix
new file mode 100644
index 0000000..ad6856b
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/carddav/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "carddav";
4 version = "3.0.3";
5 url = "https://github.com/blind-coder/rcmcarddav/releases/download/v${version}/${appName}-${version}.tar.bz2";
6 sha256 = "0cf5rnqkhhag2vdy808zfpr4l5586fn43nvcia8ac1ha58azrxal";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix b/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix
new file mode 100644
index 0000000..c970007
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "contextmenu";
4 version = "2.3";
5 url = "https://github.com/johndoh/roundcube-${appName}/archive/${version}.tar.gz";
6 sha256 = "1rb8n821ylfniiiccfskc534vd6rczhk3g82455ks3m09q6l8hif";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix b/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix
new file mode 100644
index 0000000..e5cb46d
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "contextmenu_folder";
4 version = "1.3.3";
5 url = "https://github.com/random-cuber/${appName}/archive/${version}.tar.gz";
6 sha256 = "1ngfws1v8qrpa52rjh7kirc98alchk2vbqwra86h00agyjjlcc57";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/html5_notifier/default.nix b/pkgs/webapps/roundcubemail/plugins/html5_notifier/default.nix
new file mode 100644
index 0000000..35bff06
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/html5_notifier/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "html5_notifier";
4 version = "v0.6.2";
5 url = "https://github.com/stremlau/${appName}/archive/${version}.tar.gz";
6 sha256 = "0s1wq9ira4bcd8jvhn93nhxiqzpp92i0za2kw37kf7ksyhr0xslq";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix b/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix
new file mode 100644
index 0000000..1dfc402
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "ident_switch";
4 version = "4.0.1";
5 url = "https://bitbucket.org/BoresExpress/${appName}/get/${version}.tar.gz";
6 sha256 = "1zyy40lfq2kn7hkghbl8lgp18fb634zr4fxmmxvb1wqyvqdpdpyk";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/message_highlight/default.nix b/pkgs/webapps/roundcubemail/plugins/message_highlight/default.nix
new file mode 100644
index 0000000..dc7138a
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/message_highlight/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "message_highlight";
4 version = "4.4";
5 url = "https://github.com/corbosman/${appName}/archive/${version}.tar.gz";
6 sha256 = "12c4x47y70xdl5pgm8csh5i4yiyhpi232lvjbixmca6di4lkhh9j";
7}
diff --git a/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix b/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix
new file mode 100644
index 0000000..ca7245f
--- /dev/null
+++ b/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix
@@ -0,0 +1,7 @@
1{ buildPlugin }:
2buildPlugin rec {
3 appName = "thunderbird_labels";
4 version = "v1.3.2";
5 url = "https://github.com/mike-kfed/roundcube-${appName}/archive/${version}.tar.gz";
6 sha256 = "1q4x30w66m02v3lw2n8020g0158rmyfzs6gydfk89pa1hs28k9bg";
7}