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

Michael Alan Dorman mdorman at jaunder.io
Sat Feb 28 19:10:03 CET 2015


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 ];
    });

My understanding was that with pycrypto pulled in that way, it would get
added to the PYTHONPATH in the wrapper script, making it available to
the plugin when calibre was running.

Unfortunately, I still don't end up with the directory for pycrypto in
the PYTHONPATH defined in the calibre wrapper.  If I copy the wrapper
and include the appropriate path, though, everything works great, but I
would obviously like this handled automatically on upgrades and the
like.

I would appreciate any guidance anyone has...

Mike.


More information about the nix-dev mailing list