diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-04 00:27:59 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-04 00:27:59 +0200 |
commit | 452c23140ea93ce301e7fafdc37d28009bd6f613 (patch) | |
tree | 96a4148e4cf7484c4972c48f788ba62e5acbeaa0 | |
parent | eb14b9763b48f7fad798087e9b9af776b3182a00 (diff) | |
download | Nix-452c23140ea93ce301e7fafdc37d28009bd6f613.tar.gz Nix-452c23140ea93ce301e7fafdc37d28009bd6f613.tar.zst Nix-452c23140ea93ce301e7fafdc37d28009bd6f613.zip |
Move dav packages to pkgs
-rw-r--r-- | nixops/modules/websites/tools/dav/davical.nix | 272 | ||||
-rw-r--r-- | nixops/modules/websites/tools/dav/default.nix | 21 | ||||
-rw-r--r-- | nixops/modules/websites/tools/dav/infcloud.nix | 40 | ||||
-rw-r--r-- | pkgs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/webapps/awl/default.nix | 16 | ||||
-rw-r--r-- | pkgs/webapps/davical/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch (renamed from nixops/modules/websites/tools/dav/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch) | 0 | ||||
-rw-r--r-- | pkgs/webapps/davical/default.nix | 20 | ||||
-rw-r--r-- | pkgs/webapps/default.nix | 7 | ||||
-rw-r--r-- | pkgs/webapps/infcloud/default.nix | 18 | ||||
-rw-r--r-- | pkgs/webapps/infcloud/infcloud_config.js (renamed from nixops/modules/websites/tools/dav/infcloud_config.js) | 0 |
10 files changed, 198 insertions, 200 deletions
diff --git a/nixops/modules/websites/tools/dav/davical.nix b/nixops/modules/websites/tools/dav/davical.nix index 1e3893f..6b37f11 100644 --- a/nixops/modules/websites/tools/dav/davical.nix +++ b/nixops/modules/websites/tools/dav/davical.nix | |||
@@ -1,169 +1,133 @@ | |||
1 | { stdenv, fetchurl, gettext, writeText, env }: | 1 | { stdenv, fetchurl, gettext, writeText, env, awl, davical }: |
2 | let | 2 | rec { |
3 | awl = stdenv.mkDerivation rec { | 3 | keys = [{ |
4 | version = "0.59"; | 4 | dest = "webapps/dav-davical"; |
5 | name = "awl-${version}"; | 5 | user = apache.user; |
6 | src = fetchurl { | 6 | group = apache.group; |
7 | url = "https://www.davical.org/downloads/awl_${version}.orig.tar.xz"; | 7 | permissions = "0400"; |
8 | sha256 = "01b7km7ga3ggbpp8axkc55nizgk5c35fl2z93iydb3hwbxmsvnjp"; | 8 | text = '' |
9 | }; | 9 | <?php |
10 | unpackCmd = '' | 10 | $c->pg_connect[] = "dbname=${env.postgresql.database} user=${env.postgresql.user} host=${env.postgresql.socket} password=${env.postgresql.password}"; |
11 | tar --one-top-level -xf $curSrc | ||
12 | ''; | ||
13 | installPhase = '' | ||
14 | mkdir -p $out | ||
15 | cp -ra dba docs inc scripts tests $out | ||
16 | ''; | ||
17 | }; | ||
18 | davical = rec { | ||
19 | keys = [{ | ||
20 | dest = "webapps/dav-davical"; | ||
21 | user = apache.user; | ||
22 | group = apache.group; | ||
23 | permissions = "0400"; | ||
24 | text = '' | ||
25 | <?php | ||
26 | $c->pg_connect[] = "dbname=${env.postgresql.database} user=${env.postgresql.user} host=${env.postgresql.socket} password=${env.postgresql.password}"; | ||
27 | 11 | ||
28 | $c->readonly_webdav_collections = false; | 12 | $c->readonly_webdav_collections = false; |
29 | 13 | ||
30 | $c->admin_email ='davical@tools.immae.eu'; | 14 | $c->admin_email ='davical@tools.immae.eu'; |
31 | 15 | ||
32 | $c->restrict_setup_to_admin = true; | 16 | $c->restrict_setup_to_admin = true; |
33 | 17 | ||
34 | $c->collections_always_exist = false; | 18 | $c->collections_always_exist = false; |
35 | 19 | ||
36 | $c->external_refresh = 60; | 20 | $c->external_refresh = 60; |
37 | 21 | ||
38 | $c->enable_scheduling = true; | 22 | $c->enable_scheduling = true; |
39 | 23 | ||
40 | $c->iMIP = (object) array("send_email" => true); | 24 | $c->iMIP = (object) array("send_email" => true); |
41 | 25 | ||
42 | $c->authenticate_hook['optional'] = false; | 26 | $c->authenticate_hook['optional'] = false; |
43 | $c->authenticate_hook['call'] = 'LDAP_check'; | 27 | $c->authenticate_hook['call'] = 'LDAP_check'; |
44 | $c->authenticate_hook['config'] = array( | 28 | $c->authenticate_hook['config'] = array( |
45 | 'host' => 'ldap.immae.eu', | 29 | 'host' => 'ldap.immae.eu', |
46 | 'port' => '389', | 30 | 'port' => '389', |
47 | 'startTLS' => 'yes', | 31 | 'startTLS' => 'yes', |
48 | 'bindDN'=> 'cn=davical,ou=services,dc=immae,dc=eu', | 32 | 'bindDN'=> 'cn=davical,ou=services,dc=immae,dc=eu', |
49 | 'passDN'=> '${env.ldap.password}', | 33 | 'passDN'=> '${env.ldap.password}', |
50 | 'protocolVersion' => '3', | 34 | 'protocolVersion' => '3', |
51 | 'baseDNUsers'=> array('ou=users,dc=immae,dc=eu', 'ou=group_users,dc=immae,dc=eu'), | 35 | 'baseDNUsers'=> array('ou=users,dc=immae,dc=eu', 'ou=group_users,dc=immae,dc=eu'), |
52 | 'filterUsers' => 'memberOf=cn=users,cn=davical,ou=services,dc=immae,dc=eu', | 36 | 'filterUsers' => 'memberOf=cn=users,cn=davical,ou=services,dc=immae,dc=eu', |
53 | 'baseDNGroups' => 'ou=groups,dc=immae,dc=eu', | 37 | 'baseDNGroups' => 'ou=groups,dc=immae,dc=eu', |
54 | 'filterGroups' => 'memberOf=cn=groups,cn=davical,ou=services,dc=immae,dc=eu', | 38 | 'filterGroups' => 'memberOf=cn=groups,cn=davical,ou=services,dc=immae,dc=eu', |
55 | 'mapping_field' => array( | 39 | 'mapping_field' => array( |
56 | "username" => "uid", | 40 | "username" => "uid", |
57 | "fullname" => "cn", | 41 | "fullname" => "cn", |
58 | "email" => "mail", | 42 | "email" => "mail", |
59 | "modified" => "modifyTimestamp", | 43 | "modified" => "modifyTimestamp", |
60 | ), | 44 | ), |
61 | 'format_updated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)), | 45 | 'format_updated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)), |
62 | /** used to set default value for all users, will be overcharged by ldap if defined also in mapping_field **/ | 46 | /** used to set default value for all users, will be overcharged by ldap if defined also in mapping_field **/ |
63 | // 'default_value' => array("date_format_type" => "E","locale" => "fr_FR"), | 47 | // 'default_value' => array("date_format_type" => "E","locale" => "fr_FR"), |
64 | 'group_mapping_field' => array( | 48 | 'group_mapping_field' => array( |
65 | "username" => "cn", | 49 | "username" => "cn", |
66 | "updated" => "modifyTimestamp", | 50 | "updated" => "modifyTimestamp", |
67 | "fullname" => "givenName", | 51 | "fullname" => "givenName", |
68 | "displayname" => "givenName", | 52 | "displayname" => "givenName", |
69 | "members" => "memberUid", | 53 | "members" => "memberUid", |
70 | "email" => "mail", | 54 | "email" => "mail", |
71 | ), | 55 | ), |
72 | ); | 56 | ); |
73 | 57 | ||
74 | $c->do_not_sync_from_ldap = array('admin' => true); | 58 | $c->do_not_sync_from_ldap = array('admin' => true); |
75 | include('drivers_ldap.php'); | 59 | include('drivers_ldap.php'); |
76 | ''; | 60 | ''; |
77 | }]; | 61 | }]; |
78 | webapp = stdenv.mkDerivation rec { | 62 | webapp = davical.override { config = "/var/secrets/webapps/dav-davical"; }; |
79 | version = "1.1.7"; | 63 | webRoot = "${webapp}/htdocs"; |
80 | name = "davical-${version}"; | 64 | apache = rec { |
81 | src = fetchurl { | 65 | user = "wwwrun"; |
82 | url = "https://www.davical.org/downloads/davical_${version}.orig.tar.xz"; | 66 | group = "wwwrun"; |
83 | sha256 = "1ar5m2dxr92b204wkdi8z33ir9vz2jbh5k1p74icpv9ywifvjjp9"; | 67 | modules = [ "proxy_fcgi" ]; |
84 | }; | 68 | webappName = "tools_davical"; |
85 | unpackCmd = '' | 69 | root = "/run/current-system/webapps/${webappName}"; |
86 | tar --one-top-level -xf $curSrc | 70 | vhostConf = '' |
87 | ''; | 71 | Alias /davical "${root}" |
88 | makeFlags = "all"; | 72 | Alias /caldav.php "${root}/caldav.php" |
89 | patches = [ ./davical_19eb79ebf9250e5f339675319902458c40ed1755.patch ]; | 73 | <Directory "${root}"> |
90 | installPhase = '' | 74 | DirectoryIndex index.php index.html |
91 | mkdir -p $out | 75 | AcceptPathInfo On |
92 | cp -ra config dba docs htdocs inc locale po scripts testing zonedb $out | 76 | AllowOverride None |
93 | ln -s /var/secrets/webapps/dav-davical $out/config/config.php | 77 | Require all granted |
94 | ''; | ||
95 | buildInputs = [ gettext ]; | ||
96 | }; | ||
97 | webRoot = "${webapp}/htdocs"; | ||
98 | apache = rec { | ||
99 | user = "wwwrun"; | ||
100 | group = "wwwrun"; | ||
101 | modules = [ "proxy_fcgi" ]; | ||
102 | webappName = "tools_davical"; | ||
103 | root = "/run/current-system/webapps/${webappName}"; | ||
104 | vhostConf = '' | ||
105 | Alias /davical "${root}" | ||
106 | Alias /caldav.php "${root}/caldav.php" | ||
107 | <Directory "${root}"> | ||
108 | DirectoryIndex index.php index.html | ||
109 | AcceptPathInfo On | ||
110 | AllowOverride None | ||
111 | Require all granted | ||
112 | 78 | ||
113 | <FilesMatch "\.php$"> | 79 | <FilesMatch "\.php$"> |
114 | CGIPassAuth on | 80 | CGIPassAuth on |
115 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 81 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
116 | </FilesMatch> | 82 | </FilesMatch> |
117 | 83 | ||
118 | RewriteEngine On | 84 | RewriteEngine On |
119 | <IfModule mod_headers.c> | 85 | <IfModule mod_headers.c> |
120 | Header unset Access-Control-Allow-Origin | 86 | Header unset Access-Control-Allow-Origin |
121 | Header unset Access-Control-Allow-Methods | 87 | Header unset Access-Control-Allow-Methods |
122 | Header unset Access-Control-Allow-Headers | 88 | Header unset Access-Control-Allow-Headers |
123 | Header unset Access-Control-Allow-Credentials | 89 | Header unset Access-Control-Allow-Credentials |
124 | Header unset Access-Control-Expose-Headers | 90 | Header unset Access-Control-Expose-Headers |
125 | 91 | ||
126 | Header always set Access-Control-Allow-Origin "*" | 92 | Header always set Access-Control-Allow-Origin "*" |
127 | Header always set Access-Control-Allow-Methods "GET,POST,OPTIONS,PROPFIND,PROPPATCH,REPORT,PUT,MOVE,DELETE,LOCK,UNLOCK" | 93 | Header always set Access-Control-Allow-Methods "GET,POST,OPTIONS,PROPFIND,PROPPATCH,REPORT,PUT,MOVE,DELETE,LOCK,UNLOCK" |
128 | Header always set Access-Control-Allow-Headers "User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With" | 94 | Header always set Access-Control-Allow-Headers "User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With" |
129 | Header always set Access-Control-Allow-Credentials false | 95 | Header always set Access-Control-Allow-Credentials false |
130 | Header always set Access-Control-Expose-Headers "Etag,Preference-Applied" | 96 | Header always set Access-Control-Expose-Headers "Etag,Preference-Applied" |
131 | 97 | ||
132 | RewriteCond %{HTTP:Access-Control-Request-Method} !^$ | 98 | RewriteCond %{HTTP:Access-Control-Request-Method} !^$ |
133 | RewriteCond %{REQUEST_METHOD} OPTIONS | 99 | RewriteCond %{REQUEST_METHOD} OPTIONS |
134 | RewriteRule ^(.*)$ $1 [R=200,L] | 100 | RewriteRule ^(.*)$ $1 [R=200,L] |
135 | </IfModule> | 101 | </IfModule> |
136 | </Directory> | 102 | </Directory> |
137 | ''; | 103 | ''; |
138 | }; | 104 | }; |
139 | phpFpm = rec { | 105 | phpFpm = rec { |
140 | serviceDeps = [ "postgresql.service" "openldap.service" ]; | 106 | serviceDeps = [ "postgresql.service" "openldap.service" ]; |
141 | basedir = builtins.concatStringsSep ":" [ webapp "/var/secrets/webapps/dav-davical" awl ]; | 107 | basedir = builtins.concatStringsSep ":" [ webapp "/var/secrets/webapps/dav-davical" awl ]; |
142 | socket = "/var/run/phpfpm/davical.sock"; | 108 | socket = "/var/run/phpfpm/davical.sock"; |
143 | pool = '' | 109 | pool = '' |
144 | listen = ${socket} | 110 | listen = ${socket} |
145 | user = ${apache.user} | 111 | user = ${apache.user} |
146 | group = ${apache.group} | 112 | group = ${apache.group} |
147 | listen.owner = ${apache.user} | 113 | listen.owner = ${apache.user} |
148 | listen.group = ${apache.group} | 114 | listen.group = ${apache.group} |
149 | pm = dynamic | 115 | pm = dynamic |
150 | pm.max_children = 60 | 116 | pm.max_children = 60 |
151 | pm.start_servers = 2 | 117 | pm.start_servers = 2 |
152 | pm.min_spare_servers = 1 | 118 | pm.min_spare_servers = 1 |
153 | pm.max_spare_servers = 10 | 119 | pm.max_spare_servers = 10 |
154 | 120 | ||
155 | ; Needed to avoid clashes in browser cookies (same domain) | 121 | ; Needed to avoid clashes in browser cookies (same domain) |
156 | php_value[session.name] = DavicalPHPSESSID | 122 | php_value[session.name] = DavicalPHPSESSID |
157 | php_admin_value[open_basedir] = "${basedir}:/tmp:/var/lib/php/sessions/davical" | 123 | php_admin_value[open_basedir] = "${basedir}:/tmp:/var/lib/php/sessions/davical" |
158 | php_admin_value[include_path] = "${awl}/inc:${webapp}/inc" | 124 | php_admin_value[include_path] = "${awl}/inc:${webapp}/inc" |
159 | php_admin_value[session.save_path] = "/var/lib/php/sessions/davical" | 125 | php_admin_value[session.save_path] = "/var/lib/php/sessions/davical" |
160 | php_flag[magic_quotes_gpc] = Off | 126 | php_flag[magic_quotes_gpc] = Off |
161 | php_flag[register_globals] = Off | 127 | php_flag[register_globals] = Off |
162 | php_admin_value[error_reporting] = "E_ALL & ~E_NOTICE" | 128 | php_admin_value[error_reporting] = "E_ALL & ~E_NOTICE" |
163 | php_admin_value[default_charset] = "utf-8" | 129 | php_admin_value[default_charset] = "utf-8" |
164 | php_flag[magic_quotes_runtime] = Off | 130 | php_flag[magic_quotes_runtime] = Off |
165 | ''; | 131 | ''; |
166 | }; | ||
167 | }; | 132 | }; |
168 | in | 133 | } |
169 | davical | ||
diff --git a/nixops/modules/websites/tools/dav/default.nix b/nixops/modules/websites/tools/dav/default.nix index 2a82a1d..c24f8db 100644 --- a/nixops/modules/websites/tools/dav/default.nix +++ b/nixops/modules/websites/tools/dav/default.nix | |||
@@ -1,8 +1,23 @@ | |||
1 | { lib, pkgs, config, myconfig, mylibs, ... }: | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
2 | let | 2 | let |
3 | infcloud = pkgs.callPackage ./infcloud.nix {}; | 3 | infcloud = rec { |
4 | webappName = "tools_infcloud"; | ||
5 | root = "/run/current-system/webapps/${webappName}"; | ||
6 | vhostConf = '' | ||
7 | Alias /carddavmate ${root} | ||
8 | Alias /caldavzap ${root} | ||
9 | Alias /infcloud ${root} | ||
10 | <Directory ${root}> | ||
11 | AllowOverride All | ||
12 | Options FollowSymlinks | ||
13 | Require all granted | ||
14 | DirectoryIndex index.html | ||
15 | </Directory> | ||
16 | ''; | ||
17 | }; | ||
4 | davical = pkgs.callPackage ./davical.nix { | 18 | davical = pkgs.callPackage ./davical.nix { |
5 | env = myconfig.env.tools.davical; | 19 | env = myconfig.env.tools.davical; |
20 | inherit (pkgs.webapps) davical awl; | ||
6 | }; | 21 | }; |
7 | 22 | ||
8 | cfg = config.services.myWebsites.tools.dav; | 23 | cfg = config.services.myWebsites.tools.dav; |
@@ -22,7 +37,7 @@ in { | |||
22 | hosts = ["dav.immae.eu" ]; | 37 | hosts = ["dav.immae.eu" ]; |
23 | root = null; | 38 | root = null; |
24 | extraConfig = [ | 39 | extraConfig = [ |
25 | infcloud.apache.vhostConf | 40 | infcloud.vhostConf |
26 | davical.apache.vhostConf | 41 | davical.apache.vhostConf |
27 | ]; | 42 | ]; |
28 | }; | 43 | }; |
@@ -34,7 +49,7 @@ in { | |||
34 | system.extraSystemBuilderCmds = '' | 49 | system.extraSystemBuilderCmds = '' |
35 | mkdir -p $out/webapps | 50 | mkdir -p $out/webapps |
36 | ln -s ${davical.webRoot} $out/webapps/${davical.apache.webappName} | 51 | ln -s ${davical.webRoot} $out/webapps/${davical.apache.webappName} |
37 | ln -s ${infcloud.webRoot} $out/webapps/${infcloud.apache.webappName} | 52 | ln -s ${pkgs.webapps.infcloud} $out/webapps/${infcloud.webappName} |
38 | ''; | 53 | ''; |
39 | }; | 54 | }; |
40 | } | 55 | } |
diff --git a/nixops/modules/websites/tools/dav/infcloud.nix b/nixops/modules/websites/tools/dav/infcloud.nix deleted file mode 100644 index f1204ab..0000000 --- a/nixops/modules/websites/tools/dav/infcloud.nix +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
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 = rec { | ||
22 | user = "wwwrun"; | ||
23 | group = "wwwrun"; | ||
24 | webappName = "tools_infcloud"; | ||
25 | root = "/run/current-system/webapps/${webappName}"; | ||
26 | vhostConf = '' | ||
27 | Alias /carddavmate ${root} | ||
28 | Alias /caldavzap ${root} | ||
29 | Alias /infcloud ${root} | ||
30 | <Directory ${root}> | ||
31 | AllowOverride All | ||
32 | Options FollowSymlinks | ||
33 | Require all granted | ||
34 | DirectoryIndex index.html | ||
35 | </Directory> | ||
36 | ''; | ||
37 | }; | ||
38 | }; | ||
39 | in | ||
40 | infcloud | ||
diff --git a/pkgs/default.nix b/pkgs/default.nix index d1d8fa4..0833cc2 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix | |||
@@ -34,7 +34,5 @@ in | |||
34 | mpd = (callPackage ../pkgs/mpd_0_21 {}).mpd; | 34 | mpd = (callPackage ../pkgs/mpd_0_21 {}).mpd; |
35 | mpd-small = (callPackage ../pkgs/mpd_0_21 {}).mpd-small; | 35 | mpd-small = (callPackage ../pkgs/mpd_0_21 {}).mpd-small; |
36 | 36 | ||
37 | webapps = { | 37 | webapps = callPackage ./webapps { inherit mylibs; }; |
38 | mastodon = (callPackage ./webapps/mastodon { inherit mylibs; }); | ||
39 | }; | ||
40 | } | 38 | } |
diff --git a/pkgs/webapps/awl/default.nix b/pkgs/webapps/awl/default.nix new file mode 100644 index 0000000..8564fc3 --- /dev/null +++ b/pkgs/webapps/awl/default.nix | |||
@@ -0,0 +1,16 @@ | |||
1 | { stdenv, fetchurl }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | version = "0.59"; | ||
4 | name = "awl-${version}"; | ||
5 | src = fetchurl { | ||
6 | url = "https://www.davical.org/downloads/awl_${version}.orig.tar.xz"; | ||
7 | sha256 = "01b7km7ga3ggbpp8axkc55nizgk5c35fl2z93iydb3hwbxmsvnjp"; | ||
8 | }; | ||
9 | unpackCmd = '' | ||
10 | tar --one-top-level -xf $curSrc | ||
11 | ''; | ||
12 | installPhase = '' | ||
13 | mkdir -p $out | ||
14 | cp -ra dba docs inc scripts tests $out | ||
15 | ''; | ||
16 | } | ||
diff --git a/nixops/modules/websites/tools/dav/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch b/pkgs/webapps/davical/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch index 2a08a5c..2a08a5c 100644 --- a/nixops/modules/websites/tools/dav/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch +++ b/pkgs/webapps/davical/davical_19eb79ebf9250e5f339675319902458c40ed1755.patch | |||
diff --git a/pkgs/webapps/davical/default.nix b/pkgs/webapps/davical/default.nix new file mode 100644 index 0000000..fefc00f --- /dev/null +++ b/pkgs/webapps/davical/default.nix | |||
@@ -0,0 +1,20 @@ | |||
1 | { config ? "/etc/davical/config.php", stdenv, fetchurl, gettext }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | version = "1.1.7"; | ||
4 | name = "davical-${version}"; | ||
5 | src = fetchurl { | ||
6 | url = "https://www.davical.org/downloads/davical_${version}.orig.tar.xz"; | ||
7 | sha256 = "1ar5m2dxr92b204wkdi8z33ir9vz2jbh5k1p74icpv9ywifvjjp9"; | ||
8 | }; | ||
9 | unpackCmd = '' | ||
10 | tar --one-top-level -xf $curSrc | ||
11 | ''; | ||
12 | makeFlags = "all"; | ||
13 | patches = [ ./davical_19eb79ebf9250e5f339675319902458c40ed1755.patch ]; | ||
14 | installPhase = '' | ||
15 | mkdir -p $out | ||
16 | cp -ra config dba docs htdocs inc locale po scripts testing zonedb $out | ||
17 | ln -s ${config} $out/config/config.php | ||
18 | ''; | ||
19 | buildInputs = [ gettext ]; | ||
20 | } | ||
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix new file mode 100644 index 0000000..94d2157 --- /dev/null +++ b/pkgs/webapps/default.nix | |||
@@ -0,0 +1,7 @@ | |||
1 | { callPackage, mylibs }: | ||
2 | { | ||
3 | mastodon = callPackage ./mastodon { inherit mylibs; }; | ||
4 | awl = callPackage ./awl {}; | ||
5 | davical = callPackage ./davical {}; | ||
6 | infcloud = callPackage ./infcloud {}; | ||
7 | } | ||
diff --git a/pkgs/webapps/infcloud/default.nix b/pkgs/webapps/infcloud/default.nix new file mode 100644 index 0000000..0d73f52 --- /dev/null +++ b/pkgs/webapps/infcloud/default.nix | |||
@@ -0,0 +1,18 @@ | |||
1 | { infcloud_config ? ./infcloud_config.js, stdenv, fetchzip, ed }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | version = "0.13.1"; | ||
4 | name = "InfCloud-${version}"; | ||
5 | src = fetchzip { | ||
6 | url = "https://www.inf-it.com/InfCloud_${version}.zip"; | ||
7 | sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq"; | ||
8 | }; | ||
9 | buildPhase = '' | ||
10 | ./cache_update.sh | ||
11 | rm config.js | ||
12 | ''; | ||
13 | installPhase = '' | ||
14 | cp -a . $out | ||
15 | ln -s ${infcloud_config} $out/config.js | ||
16 | ''; | ||
17 | buildInputs = [ ed ]; | ||
18 | } | ||
diff --git a/nixops/modules/websites/tools/dav/infcloud_config.js b/pkgs/webapps/infcloud/infcloud_config.js index ba73860..ba73860 100644 --- a/nixops/modules/websites/tools/dav/infcloud_config.js +++ b/pkgs/webapps/infcloud/infcloud_config.js | |||