about summary refs log tree commit diff
path: root/pkgs/servers/http/apache-modules/mod_python/default.nix
blob: cb611dfcc60539c27db7a6b8f3345cfed7fba5f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchFromGitHub, apacheHttpd, python3, libintl }:

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"
  ];

  passthru = { inherit apacheHttpd; };

  buildInputs = [ apacheHttpd python3 ]
    ++ lib.optional stdenv.isDarwin libintl;

  meta = with lib; {
    homepage = "https://modpython.org/";
    description = "An Apache module that embeds the Python interpreter within the server";
    mainProgram = "mod_python";
    platforms = platforms.unix;
    maintainers = with maintainers; [ ];
  };
}