uwsgi: move env variable(s) into env for structuredAttrs
This commit is contained in:
@@ -126,11 +126,23 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
lib.optional withPAM "pam" ++ lib.optional withSystemd "systemd_logger"
|
||||
);
|
||||
|
||||
# UWSGI_INCLUDES environment variable required for "auto" plugins
|
||||
# to be detected. See uwsgiconfig.py for more details.
|
||||
UWSGI_INCLUDES = lib.concatStringsSep "," (
|
||||
map (p: "${lib.getDev p}/include") finalAttrs.buildInputs
|
||||
);
|
||||
env = {
|
||||
# UWSGI_INCLUDES environment variable required for "auto" plugins
|
||||
# to be detected. See uwsgiconfig.py for more details.
|
||||
UWSGI_INCLUDES = lib.concatStringsSep "," (
|
||||
map (p: "${lib.getDev p}/include") finalAttrs.buildInputs
|
||||
);
|
||||
}
|
||||
// lib.optionalAttrs (lib.any (x: x.name == "php") needed) {
|
||||
# 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.concatStringsSep "," [
|
||||
"-Wl"
|
||||
"-rpath=${php-embed.extensions.session}/lib/php/extensions/"
|
||||
"--library-path=${php-embed.extensions.session}/lib/php/extensions/"
|
||||
"-l:session.so"
|
||||
];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit python3;
|
||||
@@ -154,17 +166,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
# 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 (lib.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 = ''
|
||||
runHook preBuild
|
||||
|
||||
|
||||
Reference in New Issue
Block a user