mod_wsgi3: refactor derivation

This commit is contained in:
Thiago Kenji Okada 2022-12-23 20:16:56 +00:00
parent 7ba34e662a
commit b8230ffa2e
2 changed files with 9 additions and 7 deletions

View file

@ -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";

View file

@ -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 { };