[Nix-dev] Using python27 impurely on nixos

Cillian de Róiste cillian.deroiste at gmail.com
Fri Jul 18 11:33:13 CEST 2014


On Fri, Jul 18, 2014 at 8:23 AM, Cody Goodman
<codygman.consulting at gmail.com> wrote:
> 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?

There are a few different ways to use containers:
http://nixos.org/nixos/manual/#ch-containers so you should be able to
plug this in to the relevant environment section.

I use this configuration myself regularly, so let me know if you run
into trouble.

Good luck!
Cillian

-- 
NixOS: The Purely Functional Linux Distribution
http://nixos.org


More information about the nix-dev mailing list