Revert "Merge #97536: uwsgi: fix compiling and linking"
This reverts commitdf4d0b03ef, reversing changes made tob333263534. It didn't even evaluate!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, nixosTests, lib, fetchurl, pkgconfig, jansson, pcre
|
||||
{ stdenv, lib, fetchurl, pkgconfig, jansson, pcre
|
||||
# plugins: list of strings, eg. [ "python2" "python3" ]
|
||||
, plugins ? []
|
||||
, pam, withPAM ? stdenv.isLinux
|
||||
@@ -38,12 +38,8 @@ let php-embed = php.override {
|
||||
(lib.nameValuePair "php" {
|
||||
# usage: https://uwsgi-docs.readthedocs.io/en/latest/PHP.html#running-php-apps-with-nginx
|
||||
path = "plugins/php";
|
||||
inputs = [
|
||||
php-embed
|
||||
php-embed.extensions.session
|
||||
php-embed.extensions.session.dev
|
||||
php-embed.unwrapped.dev
|
||||
] ++ php-embed.unwrapped.buildInputs;
|
||||
inputs = [ php-embed ] ++ php-embed.buildInputs;
|
||||
NIX_CFLAGS_LINK = [ "-L${libmysqlclient}/lib/mysql" ];
|
||||
})
|
||||
];
|
||||
|
||||
@@ -65,11 +61,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0256v72b7zr6ds4srpaawk1px3bp0djdwm239w3wrxpw7dzk1gjn";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./no-ext-session-php_session.h-on-NixOS.patch
|
||||
./additional-php-ldflags.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ python3 pkgconfig ];
|
||||
|
||||
buildInputs = [ jansson pcre ]
|
||||
@@ -92,16 +83,6 @@ stdenv.mkDerivation rec {
|
||||
substituteAll ${./nixos.ini} buildconf/nixos.ini
|
||||
'';
|
||||
|
||||
# this is a hack to make the php plugin link with session.so (which on nixos is a separate package)
|
||||
# the hack works in coordination with ./additional-php-ldflags.patch
|
||||
UWSGICONFIG_PHP_LDFLAGS = lib.optionalString (builtins.any (x: x.name == "php") needed)
|
||||
lib.concatStringsSep "," [
|
||||
"-Wl"
|
||||
"-rpath=${php-embed.extensions.session}/lib/php/extensions/"
|
||||
"--library-path=${php-embed.extensions.session}/lib/php/extensions/"
|
||||
"-l:session.so"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $pluginDir
|
||||
python3 uwsgiconfig.py --build nixos
|
||||
@@ -113,6 +94,8 @@ stdenv.mkDerivation rec {
|
||||
${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_LINK = toString (lib.optional withSystemd "-lsystemd" ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed);
|
||||
|
||||
meta = with stdenv.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";
|
||||
@@ -120,7 +103,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ abbradar schneefux globin ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
passthru.tests.uwsgi = nixosTests.uwsgi;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user