[Nix-dev] Customizing calibre PYTHONPATH to support plugins...

Domen Kožar domen at dev.si
Mon Mar 2 11:24:59 CET 2015


Issue in nixpkgs: https://github.com/NixOS/nixpkgs/issues/4855

On Mon, Mar 2, 2015 at 11:21 AM, Eelco Dolstra <eelco.dolstra at logicblox.com>
wrote:

> Hi,
>
> On 28/02/15 19:10, Michael Alan Dorman wrote:
>
> > I have a plugin for calibre I would like to use that requires pycrypto.
> > I looked at the derivation for calibre, and it seemed to me that it
> > would be sufficient to override it thusly:
> >
> >     calibre = pkgs.stdenv.lib.overrideDerivation pkgs.calibre (o: {
> >       buildInputs = o.buildInputs ++ [ pythonPackages.pycrypto ];
> >     });
>
> Try this:
>
>   calibre = pkgs.lib.overrideDerivation pkgs.calibre (o: {
>     nativeBuildInputs = o.nativeBuildInputs ++ [
> pkgs.pythonPackages.pycrypto ];
>   });
>
> This is necessary due to the confusing handling of buildInputs and
> nativeBuildInputs in mkDerivation: when not doing a cross-build,
> buildInputs is
> passed to the builder via the $nativeBuildInputs environment variable, and
> $buildInputs is empty. It would be better if this remapping were done in
> the
> builder itself so that overrideDerivation would work as expected.
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150302/c6af634a/attachment.html 


More information about the nix-dev mailing list