nixpkgs/pkgs/servers/http/apache-modules/mod_python/default.nix

50 lines
1.0 KiB
Nix

{
apacheHttpd,
fetchFromGitHub,
lib,
libintl,
nix-update-script,
python3,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "mod_python";
version = "unstable-2022-10-18";
src = fetchFromGitHub {
owner = "grisha";
repo = pname;
rev = "d066b07564d2194839eceb535485eb1ba0c292d8";
hash = "sha256-EH8wrXqUAOFWyPKfysGeiIezgrVc789RYO4AHeSA6t4=";
};
patches = [ ./install.patch ];
installFlags = [
"LIBEXECDIR=$(out)/modules"
"BINDIR=$(out)/bin"
];
buildInputs = [
apacheHttpd
python3
] ++ lib.optionals stdenv.isDarwin [
libintl
];
passthru = {
inherit apacheHttpd;
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://modpython.org/";
changelog = "https://github.com/grisha/mod_python/blob/${version}/NEWS";
description = "An Apache module that embeds the Python interpreter within the server";
mainProgram = "mod_python";
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}