1{ stdenv, fetchurl, apacheHttpd, python2 }:
2
3stdenv.mkDerivation rec {
4 name = "mod_python-3.5.0";
5
6 src = fetchurl {
7 url = "http://dist.modpython.org/dist/${name}.tgz";
8 sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f";
9 };
10
11 patches = [ ./install.patch ];
12
13 postPatch = ''
14 substituteInPlace dist/version.sh \
15 --replace 'GIT=`git describe --always`' "" \
16 --replace '-$GIT' ""
17 '';
18
19 installFlags = [ "LIBEXECDIR=${placeholder "out"}/modules" ];
20
21 preInstall = ''
22 mkdir -p $out/modules $out/bin
23 '';
24
25 passthru = { inherit apacheHttpd; };
26
27 buildInputs = [ apacheHttpd python2 ];
28
29 meta = {
30 homepage = "http://modpython.org/";
31 description = "An Apache module that embeds the Python interpreter within the server";
32 platforms = stdenv.lib.platforms.unix;
33 };
34}