1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

rainloop: 1.13.0 -> 1.14.0

- update version
- change mechanism to set the data folder outside the nix store
This commit is contained in:
Stephane 2020-02-23 21:18:49 +01:00 committed by Stephane Schitter
parent 24720dd250
commit fd18ed96f2

View file

@ -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";
};
}