about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/http/apache-modules/mod_wsgi/default.nix26
1 files changed, 26 insertions, 0 deletions
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..ff71e460b2ac
--- /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.7";
+
+  src = fetchurl {
+    url = "https://github.com/GrahamDumpleton/mod_wsgi/archive/${version}.tar.gz";
+    sha256 = "1j8pqn0xhd502ardlmkqx8y85s1npmk9nifqps60wjh29nny03f2";
+  };
+
+  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;
+  };
+}