summary refs log tree commit diff
path: root/nixos/modules/services/web-servers
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/web-servers')
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/mediawiki-postgresql-fixes.patch22
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/mediawiki.nix6
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/phabricator.nix61
-rw-r--r--nixos/modules/services/web-servers/tomcat.nix11
4 files changed, 47 insertions, 53 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki-postgresql-fixes.patch b/nixos/modules/services/web-servers/apache-httpd/mediawiki-postgresql-fixes.patch
deleted file mode 100644
index c46d492dc7a..00000000000
--- a/nixos/modules/services/web-servers/apache-httpd/mediawiki-postgresql-fixes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php
-index f739d3b..fdd8db3 100644
---- a/includes/specials/SpecialActiveusers.php
-+++ b/includes/specials/SpecialActiveusers.php
-@@ -112,7 +112,7 @@ class ActiveUsersPager extends UsersPager {
- 		return array(
- 			'tables' => array( 'querycachetwo', 'user', 'recentchanges' ),
- 			'fields' => array( 'user_name', 'user_id', 'recentedits' => 'COUNT(*)', 'qcc_title' ),
--			'options' => array( 'GROUP BY' => array( 'qcc_title' ) ),
-+			'options' => array( 'GROUP BY' => array( 'qcc_title', 'user_name', 'user_id' ) ),
- 			'conds' => $conds
- 		);
- 	}
-@@ -349,7 +349,7 @@ class SpecialActiveUsers extends SpecialPage {
- 			__METHOD__,
- 			array(
- 				'GROUP BY' => array( 'rc_user_text' ),
--				'ORDER BY' => 'NULL' // avoid filesort
-+				'ORDER BY' => 'lastedittime DESC'
- 			)
- 		);
- 		$names = array();
diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
index bb066aa6c47..d7bdd81b7eb 100644
--- a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
@@ -72,15 +72,13 @@ let
 
   # Unpack Mediawiki and put the config file in its root directory.
   mediawikiRoot = pkgs.stdenv.mkDerivation rec {
-    name= "mediawiki-1.23.1";
+    name= "mediawiki-1.23.3";
 
     src = pkgs.fetchurl {
       url = "http://download.wikimedia.org/mediawiki/1.23/${name}.tar.gz";
-      sha256 = "07z5j8d988cdg4ml4n0vs9fwmj0p594ibbqdid16faxwqm52dkhl";
+      sha256 = "0l6798jwjwk2khfnm84mgc65ij53a8pnv30wdnn15ys4ivia4bpf";
     };
 
-    patches = [ ./mediawiki-postgresql-fixes.patch ];
-
     skins = config.skins;
 
     buildPhase =
diff --git a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix b/nixos/modules/services/web-servers/apache-httpd/phabricator.nix
index c7a9bdf68c5..e4e3aac8d41 100644
--- a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/phabricator.nix
@@ -1,35 +1,30 @@
 { config, lib, pkgs, ... }:
+
+with lib;
+
 let
-  phabricatorRoot = pkgs.stdenv.mkDerivation rec {
-    version = "2014-05-12";
-    name = "phabricator-${version}";
-    srcLibphutil = pkgs.fetchgit {
-        url = git://github.com/facebook/libphutil.git;
-        rev = "2f3b5a1cf6ea464a0250d4b1c653a795a90d2716";
-        sha256 = "9598cec400984dc149162f1e648814a54ea0cd34fcd529973dc83f5486fdd9fd";
-    };
-    srcArcanist = pkgs.fetchgit {
-        url = git://github.com/facebook/arcanist.git;
-        rev = "54c377448db8dbc40f0ca86d43c837d30e493485";
-        sha256 = "086db3c0d1154fbad23e7c6def31fd913384ee20247b329515838b669c3028e0";
-    };
-    srcPhabricator = pkgs.fetchgit {
-        url = git://github.com/facebook/phabricator.git;
-        rev = "1644ef185ecf1e9fca3eb6b16351ef46b19d110f";
-        sha256 = "e1135e4ba76d53f48aad4161563035414ed7e878f39a8a34a875a01b41b2a084";
-    };
-    
-    buildCommand = ''
-      mkdir -p $out
-      cp -R ${srcLibphutil} $out/libphutil
-      cp -R ${srcArcanist} $out/arcanist
-      cp -R ${srcPhabricator} $out/phabricator
-    '';
-  };
+  phabricatorRoot = pkgs.phabricator;
 in {
+
   enablePHP = true;
   extraApacheModules = [ "mod_rewrite" ];
   DocumentRoot = "${phabricatorRoot}/phabricator/webroot";
+
+  options = {
+      git = mkOption {
+          default = true;
+          description = "Enable git repositories.";
+      };
+      mercurial = mkOption {
+          default = true;
+          description = "Enable mercurial repositories.";
+      };
+      subversion = mkOption {
+          default = true;
+          description = "Enable subversion repositories.";
+      };
+  };
+
   extraConfig = ''
       DocumentRoot ${phabricatorRoot}/phabricator/webroot
 
@@ -38,4 +33,18 @@ in {
       RewriteRule ^/favicon.ico - [L,QSA]
       RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
   '';
+
+  extraServerPath = [
+      "${pkgs.which}"
+      "${pkgs.diffutils}"
+      ] ++
+      (if config.mercurial then ["${pkgs.mercurial}"] else []) ++
+      (if config.subversion then ["${pkgs.subversion}"] else []) ++
+      (if config.git then ["${pkgs.git}"] else []);
+
+  startupScript = pkgs.writeScript "activatePhabricator" ''
+      mkdir -p /var/repo
+      chown wwwrun /var/repo
+  '';
+
 }
diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix
index c2f464014ae..99460a48835 100644
--- a/nixos/modules/services/web-servers/tomcat.nix
+++ b/nixos/modules/services/web-servers/tomcat.nix
@@ -5,7 +5,7 @@ with lib;
 let
 
   cfg = config.services.tomcat;
-  tomcat = pkgs.tomcat6;
+  tomcat = cfg.package;
 in
 
 {
@@ -21,6 +21,15 @@ in
         description = "Whether to enable Apache Tomcat";
       };
 
+      package = mkOption {
+        type = types.package;
+        default = pkgs.tomcat7;
+        example = lib.literalExample "pkgs.tomcat8";
+        description = ''
+          Which tomcat package to use.
+        '';
+      };
+
       baseDir = mkOption {
         default = "/var/tomcat";
         description = "Location where Tomcat stores configuration files, webapplications and logfiles";