[Nix-dev] Building bootstrap-tools.tar.xz using host tools

Steven Taschuk steven at amotlpaa.org
Tue Mar 21 01:50:23 CET 2017


Hi!  Is it possible to build bootstrap-tools.tar.xz using host tools
using the expressions in nixpkgs?

(I've been trying to answer the question myself by following the code
paths starting from <pkgs/stdenv/linux/make-bootstrap-tools.nix>, but
am finding it hard going.  The `build' attribute in that expression
does seem to be the derivation that makes the tarball, but it seems
to work by scavenging pieces from a previously built toolchain, and
I don't understand how that toolchain comes into being.  The output of

    nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix \
      -A build \
      --dry-run \
      --option build-use-substitutes false

suggests that this derivation builds bootstrap-tools.tar.xz by first
downloading it, and then using the tools therein to build itself.
I understand why downloading bootstrap binaries from the net makes
sense for Nix -- to eliminate impure dependencies on the host --
but I'd like to experiment with bootstrapping from host tools.)

-- 
Steven Taschuk                              http://www.amotlpaa.org/
"Rebuke your neighbour frankly, so you will not share in his guilt."
                                           -- Leviticus 19:17 (NIV)


More information about the nix-dev mailing list