summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/interpreters/php/default.nix2
-rw-r--r--pkgs/servers/http/apache-modules/mod_python/builder.sh7
-rw-r--r--pkgs/servers/http/apache-modules/mod_python/default.nix17
-rw-r--r--pkgs/servers/http/apache-modules/mod_python/install.patch20
-rw-r--r--pkgs/system/all-packages-generic.nix4
5 files changed, 49 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 60323525482..b107e96b7c3 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   inherit flex bison libxml2 apacheHttpd;
 
   buildInputs = [flex bison libxml2 apacheHttpd];
-  builder = ./builder.sh ;
+  builder = ./builder.sh;
 
   patches = [./fix.patch];
 }
diff --git a/pkgs/servers/http/apache-modules/mod_python/builder.sh b/pkgs/servers/http/apache-modules/mod_python/builder.sh
new file mode 100644
index 00000000000..77377caa854
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_python/builder.sh
@@ -0,0 +1,7 @@
+source $stdenv/setup
+
+installFlags="LIBEXECDIR=$out/modules $installFlags"
+
+ensureDir $out/modules
+
+genericBuild
diff --git a/pkgs/servers/http/apache-modules/mod_python/default.nix b/pkgs/servers/http/apache-modules/mod_python/default.nix
new file mode 100644
index 00000000000..3684377cf10
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_python/default.nix
@@ -0,0 +1,17 @@
+{stdenv, fetchurl, apacheHttpd, python}:
+
+stdenv.mkDerivation {
+  name = "mod_python-3.1.4";
+
+  builder = ./builder.sh;
+
+  src = fetchurl {
+    url = http://apache.mirror.intouch.nl/httpd/modpython/mod_python-3.1.4.tgz;
+    md5 = "607175958137b06bcda91110414c82a1";
+  };
+
+  patches = [./install.patch];
+
+  inherit apacheHttpd;
+  buildInputs = [apacheHttpd python];
+}
diff --git a/pkgs/servers/http/apache-modules/mod_python/install.patch b/pkgs/servers/http/apache-modules/mod_python/install.patch
new file mode 100644
index 00000000000..28a36edbc23
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_python/install.patch
@@ -0,0 +1,20 @@
+diff -rc mod_python-3.1.4-orig/dist/Makefile.in mod_python-3.1.4/dist/Makefile.in
+*** mod_python-3.1.4-orig/dist/Makefile.in	2005-01-29 22:25:28.000000000 +0100
+--- mod_python-3.1.4/dist/Makefile.in	2006-01-15 12:07:40.000000000 +0100
+***************
+*** 34,40 ****
+  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 ; \
+  	else \
+  		$(PYTHON_BIN) setup.py install --optimize 2 --force --root $(DESTDIR) ; \
+  	fi
+--- 34,40 ----
+  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 --prefix $(out) ; \
+  	else \
+  		$(PYTHON_BIN) setup.py install --optimize 2 --force --root $(DESTDIR) ; \
+  	fi
diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix
index 56f66244759..ed021da80c0 100644
--- a/pkgs/system/all-packages-generic.nix
+++ b/pkgs/system/all-packages-generic.nix
@@ -1447,6 +1447,10 @@ rec {
     db4Support = true;
   };
 
+  mod_python = import ../servers/http/apache-modules/mod_python {
+    inherit fetchurl stdenv apacheHttpd python;
+  };
+
   xorg = import ../servers/x11/xorg {
     inherit fetchurl stdenv pkgconfig freetype fontconfig
       expat libdrm libpng zlib perl mesa;