Skip to content

Commit

Permalink
apacheHttpdPackages.mod_python: fix build with python3.12 (#353031)
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored Nov 2, 2024
2 parents c31aee6 + cb47906 commit e7168d0
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions pkgs/servers/http/apache-modules/mod_python/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
apacheHttpd,
ensureNewerSourcesForZipFilesHook,
fetchFromGitHub,
lib,
libintl,
Expand All @@ -8,15 +9,15 @@
stdenv,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "mod_python";
version = "3.5.0.2";

src = fetchFromGitHub {
owner = "grisha";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-EH8wrXqUAOFWyPKfysGeiIezgrVc789RYO4AHeSA6t4=";
repo = "mod_python";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-++yHNKVe1u3w47DaB0zvYyuTrBcQdmuDm22areAeejs=";
};

patches = [ ./install.patch ];
Expand All @@ -26,24 +27,34 @@ stdenv.mkDerivation rec {
"BINDIR=$(out)/bin"
];

buildInputs = [
apacheHttpd
python3
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libintl
nativeBuildInputs = [
ensureNewerSourcesForZipFilesHook
];

buildInputs =
[
apacheHttpd
(python3.withPackages (ps: with ps; [
distutils
packaging
setuptools
]))
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libintl
];

passthru = {
inherit apacheHttpd;
updateScript = nix-update-script { };
};

meta = with lib; {
meta = {
homepage = "https://modpython.org/";
changelog = "https://github.com/grisha/mod_python/blob/${version}/NEWS";
changelog = "https://github.com/grisha/mod_python/blob/master/NEWS";
description = "Apache module that embeds the Python interpreter within the server";
mainProgram = "mod_python";
platforms = platforms.unix;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
})

0 comments on commit e7168d0

Please sign in to comment.