diff options
Diffstat (limited to 'pkgs/servers/uwsgi/default.nix')
-rw-r--r-- | pkgs/servers/uwsgi/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index 2dc2c3230a82c..95b89093a8801 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, nixosTests, lib, fetchurl, pkg-config, jansson, pcre, libxcrypt +{ stdenv, nixosTests, lib, pkg-config, jansson, pcre, libxcrypt # plugins: list of strings, eg. [ "python2" "python3" ] , plugins ? [] , pam, withPAM ? stdenv.isLinux @@ -6,6 +6,7 @@ , libcap, withCap ? stdenv.isLinux , python2, python3, ncurses , ruby, php +, makeWrapper, fetchFromGitHub }: let php-embed = php.override { @@ -59,20 +60,21 @@ in stdenv.mkDerivation rec { pname = "uwsgi"; - version = "2.0.20"; + version = "2.0.21"; - src = fetchurl { - url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz"; - sha256 = "1yfz5h07rxzrqf1rdj5fzhk47idgglxj7kqr8zl8lgcpv1kriaw8"; + src = fetchFromGitHub { + owner = "unbit"; + repo = "uwsgi"; + rev = version; + sha256 = "sha256-TUASYDyG+p1tlhmqi+ivaC7aW6UZBrPTFQUTYys5ICE="; }; patches = [ ./no-ext-session-php_session.h-on-NixOS.patch ./additional-php-ldflags.patch - ./missing-arginfo-php8.patch # https://github.com/unbit/uwsgi/issues/2356 ]; - nativeBuildInputs = [ python3 pkg-config ]; + nativeBuildInputs = [ python3 pkg-config makeWrapper ]; buildInputs = [ jansson pcre libxcrypt ] ++ lib.optional withPAM pam @@ -126,6 +128,11 @@ stdenv.mkDerivation rec { ${lib.concatMapStringsSep "\n" (x: x.install or "") needed} ''; + postFixup = lib.optionalString (builtins.any (x: x.name == "php") needed) + '' + wrapProgram $out/bin/uwsgi --set PHP_INI_SCAN_DIR ${php-embed}/lib + ''; + meta = with lib; { homepage = "https://uwsgi-docs.readthedocs.org/en/latest/"; description = "A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"; |