[Nix-dev] determining run-time only dependencies from output, recursive nix?

Florian Friesdorf flo at chaoflow.net
Mon Jul 7 22:21:10 CEST 2014


Hi,

Background: python packages can be built to contain easily parsable
runtime dependency information (called requirements from now on).

I'm pondering the idea of a two-stage build:


1. base package with optional build time dependencies:

  lxml' = callPackage ({ libxml2, libxslt }: self.build {
    distname = "lxml";
    version = "3.3.5";
    md5 = "88c75f4c73fc8f59c9ebb17495044f2f";
    buildInputs = [ libxml2 libxslt ];
  }) {};

The base package contains METADATA with requirement information, which
can be directly mapped to an attribute path (taken from a different
package for the sake of simplicity):

  % grep Requires /nix/store/...-ipdb-0.7/lib/python2.7/site-packages/ipdb-0.7.dist-info/METADATA   
  Requires-Dist: ipython (>=0.10)


2. real package to be installed into profiles, pulling in its requirements

  ipdb = buildRealPackage {
    basePackage = ipdb'
  }


Installing ipdb should result in ipdb' and ipython' to be installed into
the profile.


Do you see ways to achieve this?
Is recursive nix an option / needed?


regards
florian
-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140707/a04c7e20/attachment.bin 


More information about the nix-dev mailing list