about summary refs log tree commit diff
path: root/pkgs/servers/rainloop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/rainloop/default.nix')
-rw-r--r--pkgs/servers/rainloop/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/servers/rainloop/default.nix b/pkgs/servers/rainloop/default.nix
index ff6cb8c98ebf..bff5d2ea3062 100644
--- a/pkgs/servers/rainloop/default.nix
+++ b/pkgs/servers/rainloop/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, unzip, dataPath ? "/etc/rainloop" }: let
+{ stdenv, fetchurl, unzip, pkgs, dataPath ? "/var/lib/rainloop" }: let
   common = { edition, sha256 }:
     stdenv.mkDerivation (rec {
       pname = "rainloop${stdenv.lib.optionalString (edition != "") "-${edition}"}";
-      version = "1.13.0";
+      version = "1.14.0";
 
       buildInputs = [ unzip ];
 
@@ -16,11 +16,23 @@
         sha256 = sha256;
       };
 
+      includeScript = pkgs.writeText "include.php" ''
+        <?php
+
+        /**
+         * @return string
+         */
+        function __get_custom_data_full_path()
+        {
+          return '${dataPath}'; // custom data folder path
+        }
+      '';
+
       installPhase = ''
         mkdir $out
         cp -r rainloop/* $out
         rm -rf $out/data
-        ln -s ${dataPath} $out/data
+        cp ${includeScript} $out/include.php
       '';
 
       meta = with stdenv.lib; {
@@ -35,10 +47,10 @@
   in {
     rainloop-community = common {
       edition = "community";
-      sha256 = "1skwq6bn98142xf8r77b818fy00nb4x0s1ii3mw5849ih94spx40";
+      sha256 = "0a8qafm4khwj8cnaiaxvjb9073w6fr63vk1b89nks4hmfv10jn6y";
     };
     rainloop-standard = common {
       edition = "";
-      sha256 = "e3ec8209cb3b9f092938a89094e645ef27659763432bedbe7fad4fa650554222";
+      sha256 = "0961g4mci080f7y98zx9r4qw620l4z3na1ivvlyhhr1v4dywqvch";
     };
   }