diff --git a/pkgs/servers/http/apache-modules/mod_python/default.nix b/pkgs/servers/http/apache-modules/mod_python/default.nix index 1b8ef94fae95..1b7a7c31d4be 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; [ ]; }; } diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix index 7185b1c81270..497cc5b1ea0a 100644 --- a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix +++ b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, apacheHttpd, python, ncurses }: +{ lib, stdenv, fetchFromGitHub, apacheHttpd, python3, ncurses }: stdenv.mkDerivation rec { pname = "mod_wsgi"; @@ -11,14 +11,16 @@ stdenv.mkDerivation rec { hash = "sha256-6rRHdgdTb94kqIpWJOJOwoIsaXb/c4XY3q331GwQyf0="; }; - buildInputs = [ apacheHttpd python ncurses ]; + buildInputs = [ apacheHttpd python3 ncurses ]; - patchPhase = '' - sed -r -i -e "s|^LIBEXECDIR=.*$|LIBEXECDIR=$out/modules|" \ - ${if stdenv.isDarwin then "-e 's|/usr/bin/lipo|lipo|'" else ""} \ - configure + postPatch = '' + substituteInPlace configure --replace '/usr/bin/lipo' 'lipo' ''; + makeFlags = [ + "LIBEXECDIR=$(out)/modules" + ]; + meta = { homepage = "https://github.com/GrahamDumpleton/mod_wsgi"; description = "Host Python applications in Apache through the WSGI interface"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 33a1320fc06e..63e230546267 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -951,7 +951,7 @@ mapAliases ({ moby = throw "moby has been removed, merged into linuxkit in 2018. Use linuxkit instead"; module_init_tools = throw "'module_init_tools' has been renamed to/replaced by 'kmod'"; # Converted to throw 2022-02-22 monero = monero-cli; # Added 2021-11-28 - monodevelop = throw "monodevelop has been removed from nixpgks"; # Added 2022-01-15 + monodevelop = throw "monodevelop has been removed from nixpkgs"; # Added 2022-01-15 mopidy-gmusic = throw "mopidy-gmusic has been removed because Google Play Music was discontinued"; # Added 2021-03-07 mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18 mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f2ae6cfc422f..f75fb132dfbe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23717,8 +23717,8 @@ with pkgs; mod_tile = callPackage ../servers/http/apache-modules/mod_tile { }; mod_wsgi = self.mod_wsgi2; - mod_wsgi2 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python2; ncurses = null; }; - mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python3; }; + mod_wsgi2 = throw "mod_wsgi2 has been removed since Python 2 is EOL. Use mod_wsgi3 instead"; + mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { }; mod_itk = callPackage ../servers/http/apache-modules/mod_itk { };