Hello All,
I would like to ask how to get pkgs.apacheHttpdPackages.mod_wsgi
to use specific python environment or python with desired site packages.
The desired python environment that works is in default.nix
below. I know it should be somehow possible to do it with overlays but I can’t seem to figure out how. Would anybody know how to do these things?
Many thanks.
default.nix
mentioned above, note that ignoreCollisions = true;
:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "pjbrefct";
# Mandatory boilerplate for buildable env
env = buildEnv { name = name; paths = buildInputs; };
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup; ln -s $env $out
'';
# Customizable development requirements
buildInputs = [
# Add packages from nix-env -qaP | grep -i needle queries
# With Python configuration requiring a special wrapper
(python27.buildEnv.override {
ignoreCollisions = true;
extraLibs = with python27Packages; [
# Add pythonPackages without the prefix
Babel chardet decorator docutils feedparser gevent greenlet html2text jinja2 libsass lxml Mako markupsafe mock ofxparse passlib pillow psutil psycopg2 pydot pyparsing pypdf2 pyserial python-dateutil pytz pyusb qrcode reportlab requests suds-jurko vobject werkzeug xlwt xlrd simplejson pychart unittest2 pycountry numpy unicodecsv matplotlib pyyaml openidc-client
];
})
];
# Customizable development shell setup with at last SSL certs set
#shellHook = ''
# export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
#'';
}
My nixos:
- system: `"x86_64-linux"`
- host os: `Linux 4.19.72, NixOS, 19.03.git.2dfae8e (Koi)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.2.2`
- channels(root): `"nixos-19.03.173506.2dfae8e22fd"`
- channels(jan): `""`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`