[Nix-dev] Expression for run time for build environment closures?

Tyson Whitehead twhitehead at gmail.com
Tue Jun 13 23:28:01 CEST 2017


Hi All,

Working on merging the cuda and non-cuda expression from the python package theano as was wondering if there is an expression for making a gcc wrapped with certain libraries (like a build environment).  That is, theano creates C++ code on the fly, compiles it up, and imports it into your python session.  I want to make theano do this compilation inside a nix build environment I setup.

Ideally I would like to set the command theano uses to launch g++ to a script that then runs g++ as if it was in a nix-shell session for a derivation I specify in my theano nix expression.  Specifically I want to add all the dependencies that the theano generated code will need in it to ensure they are available and compatible with what theano was built using as otherwise the import explodes.

Is there any easy way to do this sort of thing already?  Generating and compiling code on the fly seems to be a popular thing to do at the moment (firedrake is another python example) so I can see this sort of thing would be useful beyond just theano.

Thanks!  -Tyson


More information about the nix-dev mailing list