about summary refs log tree commit diff
path: root/pkgs/servers/http/apache-modules/mod_python/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/apache-modules/mod_python/default.nix')
-rw-r--r--pkgs/servers/http/apache-modules/mod_python/default.nix34
1 files changed, 15 insertions, 19 deletions
diff --git a/pkgs/servers/http/apache-modules/mod_python/default.nix b/pkgs/servers/http/apache-modules/mod_python/default.nix
index 1b8ef94fae95c..1b7a7c31d4beb 100644
--- a/pkgs/servers/http/apache-modules/mod_python/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_python/default.nix
@@ -1,36 +1,32 @@
-{ lib, stdenv, fetchurl, apacheHttpd, python2, libintl }:
+{ lib, stdenv, fetchFromGitHub, apacheHttpd, python3, libintl }:
 
 stdenv.mkDerivation rec {
   pname = "mod_python";
-  version = "3.5.0";
+  version = "unstable-2022-10-18";
 
-  src = fetchurl {
-    url = "http://dist.modpython.org/dist/${pname}-${version}.tgz";
-    sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f";
+  src = fetchFromGitHub {
+    owner = "grisha";
+    repo = pname;
+    rev = "d066b07564d2194839eceb535485eb1ba0c292d8";
+    hash = "sha256-EH8wrXqUAOFWyPKfysGeiIezgrVc789RYO4AHeSA6t4=";
   };
 
   patches = [ ./install.patch ];
 
-  postPatch = ''
-    substituteInPlace dist/version.sh \
-        --replace 'GIT=`git describe --always`' "" \
-        --replace '-$GIT' ""
-  '';
-
-  installFlags = [ "LIBEXECDIR=${placeholder "out"}/modules" ];
-
-  preInstall = ''
-    mkdir -p $out/modules $out/bin
-  '';
+  installFlags = [
+    "LIBEXECDIR=$(out)/modules"
+    "BINDIR=$(out)/bin"
+  ];
 
   passthru = { inherit apacheHttpd; };
 
-  buildInputs = [ apacheHttpd python2 ]
+  buildInputs = [ apacheHttpd python3 ]
     ++ lib.optional stdenv.isDarwin libintl;
 
-  meta = {
+  meta = with lib; {
     homepage = "http://modpython.org/";
     description = "An Apache module that embeds the Python interpreter within the server";
-    platforms = lib.platforms.unix;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
   };
 }