uwsgi: fix cross-compilation
This commit is contained in:
parent
859d540508
commit
1e54261f3d
@ -14,13 +14,13 @@ let php-embed = php.override {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pythonPlugin = pkg : lib.nameValuePair "python${if pkg.isPy2 then "2" else "3"}" {
|
pythonPlugin = pkg : lib.nameValuePair "python${if pkg.isPy2 then "2" else "3"}" {
|
||||||
interpreter = pkg.interpreter;
|
interpreter = pkg.pythonForBuild.interpreter;
|
||||||
path = "plugins/python";
|
path = "plugins/python";
|
||||||
inputs = [ pkg ncurses ];
|
inputs = [ pkg ncurses ];
|
||||||
install = ''
|
install = ''
|
||||||
install -Dm644 uwsgidecorators.py $out/${pkg.sitePackages}/uwsgidecorators.py
|
install -Dm644 uwsgidecorators.py $out/${pkg.sitePackages}/uwsgidecorators.py
|
||||||
${pkg.executable} -m compileall $out/${pkg.sitePackages}/
|
${pkg.pythonForBuild.executable} -m compileall $out/${pkg.sitePackages}/
|
||||||
${pkg.executable} -O -m compileall $out/${pkg.sitePackages}/
|
${pkg.pythonForBuild.executable} -O -m compileall $out/${pkg.sitePackages}/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -91,6 +91,13 @@ stdenv.mkDerivation rec {
|
|||||||
inherit python2 python3;
|
inherit python2 python3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in uwsgiconfig.py plugins/*/uwsgiplugin.py; do
|
||||||
|
substituteInPlace "$f" \
|
||||||
|
--replace pkg-config "$PKG_CONFIG"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
export pluginDir=$out/lib/uwsgi
|
export pluginDir=$out/lib/uwsgi
|
||||||
substituteAll ${./nixos.ini} buildconf/nixos.ini
|
substituteAll ${./nixos.ini} buildconf/nixos.ini
|
||||||
|
Loading…
Reference in New Issue
Block a user