aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--virtual/packages/chloe.nix14
-rw-r--r--virtual/packages/spip_mes_options.php5
2 files changed, 9 insertions, 10 deletions
diff --git a/virtual/packages/chloe.nix b/virtual/packages/chloe.nix
index 7288558..a867bf2 100644
--- a/virtual/packages/chloe.nix
+++ b/virtual/packages/chloe.nix
@@ -23,6 +23,8 @@ let
23 ;php_admin_flag[log_errors] = on 23 ;php_admin_flag[log_errors] = on
24 php_admin_value[open_basedir] = "${./spip_mes_options.php}:${configDir}:${webRoot}:${varDir}:/tmp" 24 php_admin_value[open_basedir] = "${./spip_mes_options.php}:${configDir}:${webRoot}:${varDir}:/tmp"
25 env[SPIP_CONFIG_DIR] = "${configDir}" 25 env[SPIP_CONFIG_DIR] = "${configDir}"
26 env[SPIP_VAR_DIR] = "${varDir}"
27 env[SPIP_SITE] = "chloe-${environment}"
26 env[SPIP_LDAP_BASE] = "dc=immae,dc=eu" 28 env[SPIP_LDAP_BASE] = "dc=immae,dc=eu"
27 env[SPIP_LDAP_HOST] = "ldaps://ldap.immae.eu" 29 env[SPIP_LDAP_HOST] = "ldaps://ldap.immae.eu"
28 env[SPIP_LDAP_SEARCH_DN] = "${builtins.getEnv "NIXOPS_${varPrefix}_${envName}_LDAP_DN"}" 30 env[SPIP_LDAP_SEARCH_DN] = "${builtins.getEnv "NIXOPS_${varPrefix}_${envName}_LDAP_DN"}"
@@ -67,10 +69,6 @@ let
67 Require all granted 69 Require all granted
68 </Directory> 70 </Directory>
69 71
70 <DirectoryMatch "${varDir}/tmp">
71 Require all denied
72 </DirectoryMatch>
73
74 <DirectoryMatch "${webRoot}/squelettes"> 72 <DirectoryMatch "${webRoot}/squelettes">
75 Require all denied 73 Require all denied
76 </DirectoryMatch> 74 </DirectoryMatch>
@@ -93,7 +91,7 @@ let
93 activationScript = { 91 activationScript = {
94 deps = [ "wrappers" ]; 92 deps = [ "wrappers" ];
95 text = '' 93 text = ''
96 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} ${varDir}/tmp ${varDir}/local 94 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} ${varDir}/IMG ${varDir}/tmp ${varDir}/local
97 ''; 95 '';
98 }; 96 };
99 configDir = ./chloe_config; 97 configDir = ./chloe_config;
@@ -108,10 +106,10 @@ let
108 buildInputs = [ sassc ]; 106 buildInputs = [ sassc ];
109 }); 107 });
110 webRoot = stdenv.mkDerivation rec { 108 webRoot = stdenv.mkDerivation rec {
111 name = "spip-${version}"; 109 name = "chloe-${environment}-spip-${version}";
112 version = "3.2"; 110 version = "3.2";
113 src = fetchzip { 111 src = fetchzip {
114 url = "http://files.spip.org/spip/stable/${name}.zip"; 112 url = "http://files.spip.org/spip/stable/spip-${version}.zip";
115 sha256 = "0cacpxs9nv61i3hzd3nbmplq4mp22s886llhacp3n4923jd6snx5"; 113 sha256 = "0cacpxs9nv61i3hzd3nbmplq4mp22s886llhacp3n4923jd6snx5";
116 }; 114 };
117 paches = [ ./spip_ldap_patch.patch ]; 115 paches = [ ./spip_ldap_patch.patch ];
@@ -119,7 +117,7 @@ let
119 rm -rf IMG local tmp config/remove.txt 117 rm -rf IMG local tmp config/remove.txt
120 ln -sf ${./spip_mes_options.php} config/mes_options.php 118 ln -sf ${./spip_mes_options.php} config/mes_options.php
121 echo "Require all denied" > "config/.htaccess" 119 echo "Require all denied" > "config/.htaccess"
122 ln -sf ../../../../../${varDir}/{IMG,local,tmp} . 120 ln -sf ../../../../../${varDir}/{IMG,local} .
123 ''; 121 '';
124 installPhase = '' 122 installPhase = ''
125 cp -a . $out 123 cp -a . $out
diff --git a/virtual/packages/spip_mes_options.php b/virtual/packages/spip_mes_options.php
index 88ac449..8db8389 100644
--- a/virtual/packages/spip_mes_options.php
+++ b/virtual/packages/spip_mes_options.php
@@ -3,14 +3,15 @@
3// http://www.spip.net/fr_article3811.html 3// http://www.spip.net/fr_article3811.html
4 4
5$config_dir = getenv('SPIP_CONFIG_DIR') . '/'; 5$config_dir = getenv('SPIP_CONFIG_DIR') . '/';
6$var_dir = getenv('SPIP_VAR_DIR') . '/';
6 7
7$cookie_prefix = str_replace('.', '_', $site); 8$cookie_prefix = str_replace('.', '_', getenv("SPIP_SITE"));
8$table_prefix = 'spip'; 9$table_prefix = 'spip';
9 10
10spip_initialisation( 11spip_initialisation(
11 $config_dir, 12 $config_dir,
12 _DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES, 13 _DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES,
13 _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES, 14 $var_dir . _NOM_TEMPORAIRES_INACCESSIBLES,
14 _DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES 15 _DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES
15); 16);
16 17