about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorStephane <stephane@github.frozenid.net>2020-02-23 21:18:49 +0100
committerStephane Schitter <stephane@github.frozenid.net>2020-03-02 22:00:09 +0100
commitfd18ed96f2ff51bddc21f174b2e43efecc17cc64 (patch)
treebfe36c8ab8ac8b218c706438bf04695da6d39c47 /pkgs/servers
parent24720dd250cb26025d6dd5dbaf089d48f2493cb5 (diff)
downloadnixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar.gz
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar.bz2
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar.lz
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar.xz
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.tar.zst
nixlib-fd18ed96f2ff51bddc21f174b2e43efecc17cc64.zip
rainloop: 1.13.0 -> 1.14.0
- update version
- change mechanism to set the data folder outside the nix store
Diffstat (limited to 'pkgs/servers')
-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";
     };
   }