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@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to