nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix
Johannes Bornhold 2ed4587b61 mod_python: Avoid that git is called to generate a version
This failed when building mod_python and resulted in a broken
value being included in the file "version.py".
2015-05-25 18:24:22 +02:00

33 lines
775 B
Nix

{ stdenv, fetchurl, apacheHttpd, python }:
stdenv.mkDerivation rec {
name = "mod_python-3.5.0";
src = fetchurl {
url = "http://dist.modpython.org/dist/${name}.tgz";
sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f";
};
patches = [ ./install.patch ];
postPatch = ''
substituteInPlace dist/version.sh \
--replace 'GIT=`git describe --always`' "" \
--replace '-$GIT' ""
'';
preInstall = ''
installFlags="LIBEXECDIR=$out/modules $installFlags"
mkdir -p $out/modules $out/bin
'';
passthru = { inherit apacheHttpd; };
buildInputs = [ apacheHttpd python ];
meta = {
homepage = http://modpython.org/;
description = "An Apache module that embeds the Python interpreter within the server";
};
}