about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/http/apache-modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/http/apache-modules')
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix39
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch30
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_dnssd/default.nix33
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_evasive/default.nix35
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix47
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_perl/default.nix25
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix33
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_python/install.patch12
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix26
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix33
10 files changed, 313 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix
new file mode 100644
index 000000000000..8a773631ee6c
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, apacheHttpd, autoconf, automake, autoreconfHook, curl, fetchFromGitHub, glib, lasso, libtool, libxml2, libxslt, openssl, pkgconfig, xmlsec }:
+
+stdenv.mkDerivation rec {
+
+  name = "mod_auth_mellon-${version}";
+  version = "0.13.1";
+
+  src = fetchFromGitHub {
+    owner = "UNINETT";
+    repo = "mod_auth_mellon";
+    rev = "v${version}";
+    sha256 = "16b43y5a5p8g1287x04rv923230cy8dfs2j18cx6208n4bv4dvnk";
+  };
+
+  patches = [
+    ./fixdeps.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ apacheHttpd autoconf automake curl glib lasso libtool libxml2 libxslt openssl xmlsec ];
+
+  configureFlags = ["--with-apxs2=${apacheHttpd.dev}/bin/apxs" "--exec-prefix=$out"];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ./mellon_create_metadata.sh $out/bin
+    mkdir -p $out/modules
+    cp ./.libs/mod_auth_mellon.so $out/modules
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/UNINETT/mod_auth_mellon;
+    description = "An Apache module with a simple SAML 2.0 service provider";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ womfoo ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch b/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch
new file mode 100644
index 000000000000..63b69fb142f6
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch
@@ -0,0 +1,30 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,6 +74,16 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12])
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ 
++#include <libxml/uri.h>
++PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
++AC_SUBST(LIBXML2_CFLAGS)
++AC_SUBST(LIBXML2_LIBS)
++
++#include <xmlsec/xmlenc.h>
++PKG_CHECK_MODULES(XMLSEC, xmlsec1-openssl)
++AC_SUBST(XMLSEC_CFLAGS)
++AC_SUBST(XMLSEC_LIBS)
++
+ # Test to see if we can include lasso/utils.h
+ # AC_CHECK_HEADER won't work correctly unless we specifiy the include directories
+ # found in the LASSO_CFLAGS. Save and restore CFLAGS and CPPFLAGS.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,7 +25,7 @@
+ all:	mod_auth_mellon.la
+ 
+ mod_auth_mellon.la: $(SRC) auth_mellon.h auth_mellon_compat.h
+-	@APXS2@ -Wc,"-std=c99 @OPENSSL_CFLAGS@ @LASSO_CFLAGS@ @CURL_CFLAGS@ @GLIB_CFLAGS@ @CFLAGS@" -Wl,"@OPENSSL_LIBS@ @LASSO_LIBS@ @CURL_LIBS@ @GLIB_LIBS@" -Wc,-Wall -Wc,-g -c $(SRC)
++	@APXS2@ -Wc,"-std=c99 @OPENSSL_CFLAGS@ @LASSO_CFLAGS@ @CURL_CFLAGS@ @GLIB_CFLAGS@ @CFLAGS@ @LIBXML2_CFLAGS@ @XMLSEC_CFLAGS@ @CFLAGS@" -Wl,"@OPENSSL_LIBS@ @LASSO_LIBS@ @CURL_LIBS@ @GLIB_LIBS@ @LIBXML2_LIBS@ @XMLSEC_LIBS@" -Wc,-Wall -Wc,-g -c $(SRC)
+ 
+ 
+ # Building configure (for distribution)
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_dnssd/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_dnssd/default.nix
new file mode 100644
index 000000000000..d681146eee5d
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_dnssd/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, fetchpatch, pkgconfig, apacheHttpd, apr, avahi }:
+
+stdenv.mkDerivation rec {
+  name = "mod_dnssd-0.6";
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/mod_dnssd/${name}.tar.gz";
+    sha256 = "2cd171d76eba398f03c1d5bcc468a1756f4801cd8ed5bd065086e4374997c5aa";
+  };
+
+  configureFlags = [ "--disable-lynx" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ apacheHttpd avahi apr ];
+
+  patches = [ (fetchpatch {
+    url = "http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/mod-dnssd/vivid/download/package-import%40ubuntu.com-20130530193334-kqebiy78q534or5k/portforapache2.4.pat-20130530222510-7tlw5btqchd04edb-3/port-for-apache2.4.patch";
+    sha256 = "1hgcxwy1q8fsxfqyg95w8m45zbvxzskf1jxd87ljj57l7x1wwp4r";
+  }) ];
+
+  installPhase = ''
+    mkdir -p $out/modules
+    cp src/.libs/mod_dnssd.so $out/modules
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://0pointer.de/lennart/projects/mod_dnssd;
+    description = "Provide Zeroconf support via DNS-SD using Avahi";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ lethalman ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_evasive/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_evasive/default.nix
new file mode 100644
index 000000000000..2b8693f7379d
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_evasive/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, apacheHttpd }:
+
+if lib.versionAtLeast (lib.getVersion apacheHttpd) "2.4" then
+
+  throw "mod_evasive is not supported on Apache httpd 2.4"
+
+else
+
+stdenv.mkDerivation {
+  name = "mod_evasive-1.10.1";
+
+  src = fetchurl {
+    url = http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz;
+    sha256 = "0rsnx50rjv6xygbp9r0gyss7xqdkcb0hy3wh9949jf1im8wm3i07";
+  };
+
+  buildInputs = [ apacheHttpd ];
+
+  buildPhase = ''
+    export APACHE_LIBEXECDIR=$out/modules
+    export makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
+    apxs -ca mod_evasive20.c
+  '';
+
+  installPhase = ''
+    mkdir -p $out/modules
+    cp .libs/mod_evasive20.so $out/modules
+  '';
+
+  meta = {
+    homepage = http://www.zdziarski.com/blog/?page_id=442;
+    description = "Evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix
new file mode 100644
index 000000000000..ff767d9ad437
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, apacheHttpd }:
+
+let
+  version = "2.4.7.1";
+
+  apache-24-patch = fetchurl {
+      name = "compile-against-apache24.diff";
+      url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/compile-against-apache24.diff?h=packages/mod_fastcgi&id=81c7cb99d15682df3bdb1edcaeea5259e9e43a42";
+      sha256 = "000qvrf5jb979i37rimrdivcgjijcffgrpkx38c0rn62z9jz61g4";
+    };
+in
+stdenv.mkDerivation {
+  name = "mod_fastcgi-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/FastCGI-Archives/mod_fastcgi/archive/${version}.tar.gz";
+    sha256 = "12g6vcfl9jl8rqf8lzrkdxg2ngca310d3d6an563xqcgrkp8ga55";
+  };
+
+  patches = [ apache-24-patch ];
+
+  buildInputs = [ apacheHttpd ];
+
+  preBuild = ''
+    cp Makefile.AP2 Makefile
+    makeFlags="top_dir=${apacheHttpd.dev}/share prefix=$out"
+  '';
+
+  meta = {
+    homepage = https://github.com/FastCGI-Archives/mod_fastcgi;
+    description = "Provide support for the FastCGI protocol";
+
+    longDescription = ''
+      mod_fastcgi is a module for the Apache web server that enables
+      FastCGI - a standards based protocol for communicating with
+      applications that generate dynamic content for web pages. FastCGI
+      provides a superset of CGI functionality, but a subset of the
+      functionality of programming for a particular web server API.
+      Nonetheless, the feature set is rich enough for programming
+      virtually any type of web application, but the result is generally
+      more scalable.
+    '';
+
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.peti ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_perl/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_perl/default.nix
new file mode 100644
index 000000000000..04746d678c52
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_perl/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, apacheHttpd, perl }:
+
+stdenv.mkDerivation rec {
+  name = "mod_perl-2.0.10";
+
+  src = fetchurl {
+    url = "mirror://apache/perl/${name}.tar.gz";
+    sha256 = "0r1bhzwl5gr0202r6448943hjxsickzn55kdmb7dzad39vnq7kyi";
+  };
+
+  buildInputs = [ apacheHttpd perl ];
+  buildPhase = ''
+    perl Makefile.PL \
+      MP_APXS=${apacheHttpd.dev}/bin/apxs
+    make
+  '';
+  installPhase = ''
+    mkdir -p $out
+    make install DESTDIR=$out
+    mv $out${apacheHttpd}/* $out
+    mv $out${apacheHttpd.dev}/* $out
+    mv $out${perl}/* $out
+    rm $out/nix -rf
+  '';
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix
new file mode 100644
index 000000000000..f947bf535cc9
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, apacheHttpd, python2 }:
+
+stdenv.mkDerivation rec {
+  name = "mod_python-3.5.0";
+
+  src = fetchurl {
+    url = "http://dist.modpython.org/dist/${name}.tgz";
+    sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f";
+  };
+
+  patches = [ ./install.patch ];
+
+  postPatch = ''
+    substituteInPlace dist/version.sh \
+        --replace 'GIT=`git describe --always`' "" \
+        --replace '-$GIT' ""
+  '';
+
+  preInstall = ''
+    installFlags="LIBEXECDIR=$out/modules $installFlags"
+    mkdir -p $out/modules $out/bin
+  '';
+
+  passthru = { inherit apacheHttpd; };
+
+  buildInputs = [ apacheHttpd python2 ];
+
+  meta = {
+    homepage = http://modpython.org/;
+    description = "An Apache module that embeds the Python interpreter within the server";
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_python/install.patch b/nixpkgs/pkgs/servers/http/apache-modules/mod_python/install.patch
new file mode 100644
index 000000000000..29667e11ed8e
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_python/install.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' mod_python-3.5.0-orig/dist/Makefile.in mod_python-3.5.0/dist/Makefile.in
+--- mod_python-3.5.0-orig/dist/Makefile.in	2013-11-12 04:21:34.000000000 +0100
++++ mod_python-3.5.0/dist/Makefile.in	2014-11-07 11:28:24.466377733 +0100
+@@ -34,7 +34,7 @@
+ install_py_lib: mod_python src
+ 	@cd src; $(MAKE) psp_parser.c
+ 	if test -z "$(DESTDIR)" ; then \
+-		$(PYTHON_BIN) setup.py install --optimize 2 --force ; \
++		$(PYTHON_BIN) setup.py install --optimize 2 --force --prefix $(out) ; \
+ 	else \
+ 		$(PYTHON_BIN) setup.py install --optimize 2 --force --root $(DESTDIR) ; \
+ 	fi
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
new file mode 100644
index 000000000000..f51574e68e7d
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, apacheHttpd, python2 }:
+
+stdenv.mkDerivation rec {
+  name = "mod_wsgi-${version}";
+  version = "4.6.6";
+
+  src = fetchurl {
+    url = "https://github.com/GrahamDumpleton/mod_wsgi/archive/${version}.tar.gz";
+    sha256 = "1ic5lafqlwpld5jz2irj3yws883xhxldjyyh514w1lad1v085sbq";
+  };
+
+  buildInputs = [ apacheHttpd python2 ];
+
+  patchPhase = ''
+    sed -r -i -e "s|^LIBEXECDIR=.*$|LIBEXECDIR=$out/modules|" \
+      ${if stdenv.isDarwin then "-e 's|/usr/bin/lipo|lipo|'" else ""} \
+      configure
+  '';
+
+  meta = {
+    homepage = https://github.com/GrahamDumpleton/mod_wsgi;
+    description = "Host Python applications in Apache through the WSGI interface";
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix b/nixpkgs/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix
new file mode 100644
index 000000000000..138864aec7d0
--- /dev/null
+++ b/nixpkgs/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, apacheHttpd, jdk }:
+
+stdenv.mkDerivation rec {
+  name = "tomcat-connectors-1.2.46";
+
+  src = fetchurl {
+    url = "mirror://apache/tomcat/tomcat-connectors/jk/${name}-src.tar.gz";
+    sha256 = "1sfbcsmshjkj4wc969ngjcxhjyp4mbkjprbs111d1b0x3l7547by";
+  };
+
+  configureFlags = [
+    "--with-apxs=${apacheHttpd.dev}/bin/apxs"
+    "--with-java-home=${jdk}"
+  ];
+
+  setSourceRoot = ''
+    sourceRoot=$(echo */native)
+  '';
+
+  installPhase = ''
+    mkdir -p $out/modules
+    cp apache-2.0/mod_jk.so $out/modules
+  '';
+
+  buildInputs = [ apacheHttpd jdk ];
+
+  meta = with stdenv.lib; {
+    description = "Provides web server plugins to connect web servers with Tomcat";
+    homepage = https://tomcat.apache.org/download-connectors.cgi;
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}