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

2017-06-14 Thread Tyson Whitehead
On Tuesday, June 13, 2017 5:28:01 PM EDT Tyson Whitehead wrote:
> 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.

I came up with following

let
  wrapped = command: buildInputs:
runCommandCC "${command}-wrapped" { inherit buildInputs; } ''
  cat > "$out" 

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

2017-06-13 Thread Tyson Whitehead
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
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev