about summary refs log tree commit diff
path: root/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/apache-modules/mod_wsgi/default.nix')
-rw-r--r--pkgs/servers/http/apache-modules/mod_wsgi/default.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
index 7185b1c81270a..497cc5b1ea0ae 100644
--- a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, apacheHttpd, python, ncurses }:
+{ lib, stdenv, fetchFromGitHub, apacheHttpd, python3, ncurses }:
 
 stdenv.mkDerivation rec {
   pname = "mod_wsgi";
@@ -11,14 +11,16 @@ stdenv.mkDerivation rec {
     hash = "sha256-6rRHdgdTb94kqIpWJOJOwoIsaXb/c4XY3q331GwQyf0=";
   };
 
-  buildInputs = [ apacheHttpd python ncurses ];
+  buildInputs = [ apacheHttpd python3 ncurses ];
 
-  patchPhase = ''
-    sed -r -i -e "s|^LIBEXECDIR=.*$|LIBEXECDIR=$out/modules|" \
-      ${if stdenv.isDarwin then "-e 's|/usr/bin/lipo|lipo|'" else ""} \
-      configure
+  postPatch = ''
+    substituteInPlace configure --replace '/usr/bin/lipo' 'lipo'
   '';
 
+  makeFlags = [
+    "LIBEXECDIR=$(out)/modules"
+  ];
+
   meta = {
     homepage = "https://github.com/GrahamDumpleton/mod_wsgi";
     description = "Host Python applications in Apache through the WSGI interface";