diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix index 7185b1c81270..497cc5b1ea0a 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81b30300845a..58ccfeecf805 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23711,7 +23711,7 @@ with pkgs; mod_wsgi = self.mod_wsgi2; mod_wsgi2 = throw "mod_wsgi2 has been removed since Python 2 is EOL. Use mod_wsgi3 instead"; - mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python3; }; + mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { }; mod_itk = callPackage ../servers/http/apache-modules/mod_itk { };