Chris Marusich writes: > Hi, > > I've noticed that Guix builds many things when I ask it to instantiate a > derivation in the following way: > > [0] [env] marusich@garuda-lan:~/guix/repos/guix-worktrees/wip-ppc64 > $ guix build -d --target=powerpc64-linux-gnu -e '(@@ (gnu packages make-bootstrap) %gcc-static)' > The following derivations will be built: > /gnu/store/i5wn3xl6p0zw1vglscgk0bs9dwc6hdh6-gcc-static-5.5.0.drv > /gnu/store/3h2sk37iim53fh7g9r3sd1q0xzhqwa51-gcc-cross-powerpc64-linux-gnu-7.5.0.drv > /gnu/store/84k0j5jm316cwf7h66vrw1vmvkd4kbck-glibc-cross-powerpc64-linux-gnu-2.31.drv > /gnu/store/d36n7qy9xbgwpaw3nw8k9dj51hzmdnr4-gcc-cross-sans-libc-powerpc64-linux-gnu-7.5.0.drv > /gnu/store/mqar9bnapfcfkna3rvy28awhlpd3q65q-binutils-cross-powerpc64-linux-gnu-2.34.drv > /gnu/store/pzp93dw3rr6sp2ybi3dzs6kd7gvigfsk-ld-wrapper-powerpc64-linux-gnu-0.drv > /gnu/store/n7dhpsq41q4kdbqgniljbwrlawvmmlp6-linux-libre-headers-cross-powerpc64-linux-gnu-5.4.20.drv > /gnu/store/9p5anrji5wgkf66k09jhbsr3fqwwi7cn-gcc-cross-powerpc64-linux-gnu-7.5.0.drv > /gnu/store/r4ac80znwlrnh4jmj2sbczc4mn66mqdg-glibc-cross-powerpc64-linux-gnu-2.31.drv > /gnu/store/ap8ri9ddka13vyrsl72pzqslagi4v7vj-gmp-6.2.0.drv > /gnu/store/arxf2alzwf9rmz5hz8h11j4j12drxm3i-glibc-cross-powerpc64-linux-gnu-2.31.drv > /gnu/store/d127w5flv12s4bfmpf4nwrvg3sibvfya-linux-libre-headers-cross-powerpc64-linux-gnu-5.4.20.drv > /gnu/store/j3d5kr7qlr6g3lq0dwc8z8jh6w814z9v-isl-0.18.drv > /gnu/store/j90wwahzd5ldw7ai11zf5lnp3kbbrmkh-mpfr-4.0.2.drv > /gnu/store/mz9fdir4avdda5cw1snyf8vhpq70c9na-libelf-0.8.13.drv > /gnu/store/q9x04y75mq2nfp2a6gwa0pvrgv60aah9-mpc-1.1.0.drv > /gnu/store/xk4yv7xj15qnl3zv2m8nnzrw0bdgjsx3-zlib-1.2.11.drv > 171.3 MB will be downloaded: > /gnu/store/ir3092v7657h6g4g2vlsw3zrli3rndb3-zlib-1.2.11.tar.gz > /gnu/store/amc0nizxsdcj212nk9a3ivr946hzhl6c-mpc-1.1.0 > /gnu/store/j4npmpn7dxmfknyfnhj4q4jmdwmk3klg-mpc-1.1.0.tar.gz > /gnu/store/0z3z3lhig0xyy817nv70p2hp1n1wqawa-libelf-0.8.13.tar.gz > /gnu/store/bkyiyc4hrjcd4ljx6jqf7z05hm4qxcwd-mpfr-4.0.2.tar.xz > /gnu/store/2jj3il6p5xrc4gkncj9303an81x2csc9-perl-5.30.2 > /gnu/store/n1yvkd7jk50qg1vv9cca6ywynkqvaqgq-ncurses-6.2 > /gnu/store/j709qpwy790bcra6w8kvyz1v5zcsw8df-texinfo-6.7 > /gnu/store/jk5k0sgqpj0sj4ymgq7m8g8617i0xji2-m4-1.4.18 > /gnu/store/57i37x74wz7ar703smykildzvhpdds1g-gmp-6.2.0 > /gnu/store/f2r1w8y7l3lpwh4i47nq2s1vqlqxq0jb-glibc-2.31 > /gnu/store/rgi1k6kx4v9m8449w00i6jfxvpgaz73g-glibc-2.31-static > /gnu/store/df1gdl0vwwbzv04snfha0g88rj02pni9-gcc-5.5.0 > /gnu/store/waz3iz17vlbpfc2fm9yiym6bgbsajghf-mpfr-4.0.2 > /gnu/store/hnsi8iaimgss3v81h7h1r8ck55c0968h-popt-1.18 > /gnu/store/vpy0bcjw0yzaj7j7qx8rfc88c7r357k3-rsync-3.1.3 > /gnu/store/0zcl1i3rbjc356138hx86b7yaz29g6fj-linux-libre-5.4.20-gnu.tar.xz > /gnu/store/l788x07ska5vffayz0gayv4hsx5flxal-module-import-compiled > /gnu/store/lqz1pygx3x5dd6ad2l3n8ixm1vh6czj4-python-minimal-3.8.2 > /gnu/store/ba6s3g925nggb57b1gpj2jkhqsq24s4q-libstdc++-7.5.0 > /gnu/store/xaclbfx6rvnbsq5qmry0251r7y82rgnv-libstdc++-headers-7.5.0 > /gnu/store/j8b9i4czpzb298zwa15wpyr42471qfbm-module-import-compiled > > The Guix documentation ((guix) Additional Build Options) says the "-d" > option should just give me the derivation paths, not the output paths: > > ‘--derivations’ > ‘-d’ > Return the derivation paths, not the output paths, of the given > packages. > > So, I'm confused about why all these builds need to happen. Didn't I > only ask Guix to instantiate the derivation - not realize it? In other > words, I expected Guix to calculate the transitive closure of the > requested derivation's inputs (mainly other derivations, I think?) and > write them to the store, without actually executing any significant > builds. > > I suppose that Guix is building these things in order to do just that, > but I don't quite understand why this happens. Can someone explain it? This can also happen even if I don't include --target: [0] marusich@garuda-lan:~/guix/repos/guix-worktrees/wip-ppc64 $ guix build -d -e '(@@ (gnu packages make-bootstrap) %gcc-static)' substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% The following derivations will be built: /gnu/store/jx7frgnihxqn75sgxwb9md420dbrh6cg-gcc-static-5.5.0.drv /gnu/store/h3y11yg8g44ss2b02rlq7is4mxqd8qfs-isl-0.18.drv /gnu/store/wx5mmblp5p5q85g55ggpcpc2kh12dsbv-zlib-1.2.11.drv /gnu/store/xk149wji2hlx0ls404agj3is77kazxx6-libelf-0.8.13.drv 10.9 MB will be downloaded: /gnu/store/f2r1w8y7l3lpwh4i47nq2s1vqlqxq0jb-glibc-2.31 /gnu/store/rgi1k6kx4v9m8449w00i6jfxvpgaz73g-glibc-2.31-static /gnu/store/b1940pfi34sxd3h3gxzx1x5mzwc55flp-linux-libre-headers-5.4.20 substituting /gnu/store/b1940pfi34sxd3h3gxzx1x5mzwc55flp-linux-libre-headers-5.4.20... downloading from https://ci.guix.gnu.org/nar/lzip/b1940pfi34sxd3h3gxzx1x5mzwc55flp-linux-libre-headers-5.4.20 ... linux-libre-headers-5.4.20 1.0MiB 291KiB/s 00:00 [# ] 6.2%^C -- Chris