[Nix-dev] Using python27 impurely on nixos

Cody Goodman codygman.consulting at gmail.com
Fri Jul 18 08:23:50 CEST 2014


I have a python project for the first time since I started using
nixos. I would like to simply use this example:


https://nixos.org/wiki/Howto_develop_software_on_nixos#Example_4:_Python_Web_Development_Nixos_Container

   environment = {
     systemPackages = with pkgs; [
       git
       libxml2
       libxslt
       libzip
       python27Full
       python27Packages.virtualenv
       stdenv
       zlib
     ];

     pathsToLink = [ "/include" ];

     shellInit =
       # help pip to find libz.so when building lxml
       export LIBRARY_PATH=/var/run/current-system/sw/lib
       # ditto for header files, e.g. sqlite
       export C_INCLUDE_PATH=/var/run/current-system/sw/include
     ;
   };

However I'm not sure where to put this code. It also seems like a few
lines are missing at the top. Should this be named? I have no idea how
to use this to get an impure pip-installable environment. Can anyone
help?


More information about the nix-dev mailing list