On Wednesday 08 October 2014 18:37:00 Damien Cassou wrote:
> On Wed, Oct 8, 2014 at 5:04 PM, Andreas Herrmann <[email protected]> wrote:
> > How do I tell Nix to fix `PYTHONPATH` accordingly when this package is 
> > loaded, and also to wrap python accordingly?
> 
> I think you have to use things like
> 
> wrapProgram "$out/bin/yourprogram" --prefix PYTHONPATH : ...
> 
> and
> 
> propagatedBuildInputs
> 
> 
> Look at the existing derivations.
That was what I needed. I had looked at wrapPythonProgram beforem, which didn't 
work, because these programs are actually bash scripts, that call the python 
interpreter.

Now, I added `makeWrapper` to `buildInputs`, and added

    postFixup = ''
      for i in "$out/bin/"*; do
        wrapProgram "$i" --prefix PYTHONPATH ":" "$PYTHONPATH"
      done
    '';

to my derivation and everything works.

Thanks a lot.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to