1{
2 apacheHttpd,
3 ensureNewerSourcesForZipFilesHook,
4 fetchFromGitHub,
5 lib,
6 libintl,
7 nix-update-script,
8 python3,
9 stdenv,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "mod_python";
14 version = "3.5.0.4";
15
16 src = fetchFromGitHub {
17 owner = "grisha";
18 repo = "mod_python";
19 tag = finalAttrs.version;
20 hash = "sha256-bZ0w61+0If70KD3UW24JllY6vD0vQX2C7FssYG1YLPI=";
21 };
22
23 patches = [ ./install.patch ];
24
25 installFlags = [
26 "LIBEXECDIR=$(out)/modules"
27 "BINDIR=$(out)/bin"
28 ];
29
30 nativeBuildInputs = [
31 ensureNewerSourcesForZipFilesHook
32 ];
33
34 buildInputs = [
35 apacheHttpd
36 (python3.withPackages (
37 ps: with ps; [
38 distutils
39 packaging
40 setuptools
41 ]
42 ))
43 ]
44 ++ lib.optionals stdenv.hostPlatform.isDarwin [
45 libintl
46 ];
47
48 passthru = {
49 inherit apacheHttpd;
50 updateScript = nix-update-script { };
51 };
52
53 meta = {
54 homepage = "https://modpython.org/";
55 changelog = "https://github.com/grisha/mod_python/blob/master/NEWS";
56 description = "Apache module that embeds the Python interpreter within the server";
57 mainProgram = "mod_python";
58 platforms = lib.platforms.unix;
59 maintainers = [ ];
60 broken = stdenv.hostPlatform.isDarwin;
61 };
62})