Merge pull request #207464 from thiagokokada/apache-modules-py3

mod_python: 3.5.0 -> unstable-2022-10-18, mod_wsgi2: remove, mod_wsgi: refactor derivation
This commit is contained in:
Thiago Kenji Okada 2022-12-25 14:08:27 +00:00 committed by GitHub
commit 188392e7e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 28 deletions

View file

@ -1,36 +1,32 @@
{ lib, stdenv, fetchurl, apacheHttpd, python2, libintl }:
{ lib, stdenv, fetchFromGitHub, apacheHttpd, python3, libintl }:
stdenv.mkDerivation rec {
pname = "mod_python";
version = "3.5.0";
version = "unstable-2022-10-18";
src = fetchurl {
url = "http://dist.modpython.org/dist/${pname}-${version}.tgz";
sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f";
src = fetchFromGitHub {
owner = "grisha";
repo = pname;
rev = "d066b07564d2194839eceb535485eb1ba0c292d8";
hash = "sha256-EH8wrXqUAOFWyPKfysGeiIezgrVc789RYO4AHeSA6t4=";
};
patches = [ ./install.patch ];
postPatch = ''
substituteInPlace dist/version.sh \
--replace 'GIT=`git describe --always`' "" \
--replace '-$GIT' ""
'';
installFlags = [ "LIBEXECDIR=${placeholder "out"}/modules" ];
preInstall = ''
mkdir -p $out/modules $out/bin
'';
installFlags = [
"LIBEXECDIR=$(out)/modules"
"BINDIR=$(out)/bin"
];
passthru = { inherit apacheHttpd; };
buildInputs = [ apacheHttpd python2 ]
buildInputs = [ apacheHttpd python3 ]
++ lib.optional stdenv.isDarwin libintl;
meta = {
meta = with lib; {
homepage = "http://modpython.org/";
description = "An Apache module that embeds the Python interpreter within the server";
platforms = lib.platforms.unix;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}

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

@ -951,7 +951,7 @@ mapAliases ({
moby = throw "moby has been removed, merged into linuxkit in 2018. Use linuxkit instead";
module_init_tools = throw "'module_init_tools' has been renamed to/replaced by 'kmod'"; # Converted to throw 2022-02-22
monero = monero-cli; # Added 2021-11-28
monodevelop = throw "monodevelop has been removed from nixpgks"; # Added 2022-01-15
monodevelop = throw "monodevelop has been removed from nixpkgs"; # Added 2022-01-15
mopidy-gmusic = throw "mopidy-gmusic has been removed because Google Play Music was discontinued"; # Added 2021-03-07
mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18
mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18

View file

@ -23717,8 +23717,8 @@ with pkgs;
mod_tile = callPackage ../servers/http/apache-modules/mod_tile { };
mod_wsgi = self.mod_wsgi2;
mod_wsgi2 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python2; ncurses = null; };
mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python3; };
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 { };
mod_itk = callPackage ../servers/http/apache-modules/mod_itk { };