[Nix-dev] reverse dependencies
Florian Friesdorf
flo at chaoflow.net
Sat Jul 21 17:50:55 CEST 2012
Hi,
how do we get all packages using a derivation (e.g. python27) either
directly or indirectly?
Current failing approach:
1. generate dependency graph with nix-instantiate (see below)
2. query that graph with xmlstarlet
It seems that nix-instantiate does this not only for one (x86_64), but
all possible systems and even twice for x86_64, once stdenv has glibc
the other time it is null. Here an error from the mingw import, which
fails on x86_64:
% nix-instantiate --show-trace --eval-only --strict --attr pkgs --xml nixpkgs/default.nix > /tmp/pkgs.xml
error: while evaluating the builtin function `derivationStrict':
while instantiating the derivation named `stdenv-mingw' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/default.nix:73:11':
while evaluating the derivation attribute `gcc' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/default.nix:82:11':
while evaluating the builtin function `getAttr':
while evaluating the builtin function `derivationStrict':
while instantiating the derivation named `gcc-full-4.4.0-mingw32' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/pkgs/default.nix:50:7':
while evaluating the derivation attribute `src' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/pkgs/default.nix:52:7':
while evaluating the builtin function `getAttr':
while evaluating the builtin function `derivationStrict':
while instantiating the derivation named `gcc-full-4.4.0-mingw32-bin-2.tar.gz' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/fetchurl/default.nix:9:3':
while evaluating the derivation attribute `chmod' at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/fetchurl/default.nix:21:10':
while evaluating the function at `/home/cfl/dev/nixos/nixpkgs/pkgs/stdenv/mingw/cygpath/default.nix:1:11':
while evaluating the builtin function `import':
cannot import `/nix/store/l2x5avg1ifybjbx5imb0jcc0p0ica13k-cygpath', since path `/nix/store/mz4jgmj9gxq2dmxv6sraz49aq7g9xa6z-cygpath.drv' is not valid
Is there a better way to get reverse dependencies?
How can we instantiate for only one system?
Motivation: we make changes to python packaging and would like to
build all derivations that are affected and write tests whether bindings
are correctly built and loadable.
regards
cillian
joachim
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/20120721/6798cbfc/attachment.bin
More information about the nix-dev
mailing list