diff options
Diffstat (limited to 'virtual/packages/infcloud.nix')
-rw-r--r-- | virtual/packages/infcloud.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/virtual/packages/infcloud.nix b/virtual/packages/infcloud.nix new file mode 100644 index 0000000..876578b --- /dev/null +++ b/virtual/packages/infcloud.nix | |||
@@ -0,0 +1,38 @@ | |||
1 | { stdenv, fetchzip, ed }: | ||
2 | let | ||
3 | infcloud = rec { | ||
4 | webRoot = stdenv.mkDerivation rec { | ||
5 | version = "0.13.1"; | ||
6 | name = "InfCloud-${version}"; | ||
7 | src = fetchzip { | ||
8 | url = "https://www.inf-it.com/InfCloud_${version}.zip"; | ||
9 | sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq"; | ||
10 | }; | ||
11 | buildPhase = '' | ||
12 | ./cache_update.sh | ||
13 | rm config.js | ||
14 | ''; | ||
15 | installPhase = '' | ||
16 | cp -a . $out | ||
17 | ln -s ${./infcloud_config.js} $out/config.js | ||
18 | ''; | ||
19 | buildInputs = [ ed ]; | ||
20 | }; | ||
21 | apache = { | ||
22 | user = "wwwrun"; | ||
23 | group = "wwwrun"; | ||
24 | vhostConf = '' | ||
25 | Alias /carddavmate ${webRoot} | ||
26 | Alias /caldavzap ${webRoot} | ||
27 | Alias /infcloud ${webRoot} | ||
28 | <Directory ${webRoot}> | ||
29 | AllowOverride All | ||
30 | Options FollowSymlinks | ||
31 | Require all granted | ||
32 | DirectoryIndex index.html | ||
33 | </Directory> | ||
34 | ''; | ||
35 | }; | ||
36 | }; | ||
37 | in | ||
38 | infcloud | ||