<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 27 April 2017 at 09:41, Luke Gorrie <span dir="ltr"><<a href="mailto:luke@snabb.co" target="_blank">luke@snabb.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-">On 27 April 2017 at 09:22, Luke Gorrie <span dir="ltr"><<a href="mailto:luke@snabb.co" target="_blank">luke@snabb.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>How to run the build including all tests in VMs (go for lunch the first time you run it...):</div></div></div></div></blockquote><div><br></div></span><div>... if you really want to run this then it's probably worth giving e.g. '-j 10' to nix-build to parallelize downloads and execution, and also to test from the stable branch of nix instead of the master branch (<font face="monospace, monospace">git clone -b 1.11-maintenance ...</font>).</div></div></div></div></blockquote><div><br></div><div>I actually ran the nix build process now for the first time myself :).</div><div><br></div><div>Observations:</div><div><br></div><div>By default it builds for Linux-i386, Linux-x86-64, and Darwin-x86-64. These platforms are all available in the CI but probably not on your local machine. So could pick a specific attribute to build e.g. '-A deb_ubuntu1604i386' at the end of the nix-build command.</div><div><br></div><div>Interesting that to setup the VMs it actually _bootstraps_ nearly a dozen Linux distributions e.g. downloads the individual '.deb' files for an Ubuntu release and creates an image using 'debootstrap' with exactly the packages that the test suite wants. They could have otherwise taken a ready-made image from the vendor (with verified sha256 hash) but the bootstrapping seems to allow a lot of control over the build/runtime environment for a test case.</div><div><br></div><div>Interesting that my machine is actually performing the bootstrapping of these images. In principle it could just download the cached image from the Nix CI because the builds are referentially transparent. I suppose that those binaries are not available, probably because the stable version of nix was built a ways back and its intermediate build/test artefacts have been garbage collected on the CI server. So they are built locally on my machine instead (and then cached until I clear them out here with 'nix-collect-garbage'.)</div><div><br></div><div>After all the downloading and building it does work for me and produce packages:</div><div><br></div><div><div><font face="monospace, monospace">$ nix-build -j 10 -I nixpkgs=$pkgs nix/release.nix -A deb_ubuntu1604i386</font></div><div><font face="monospace, monospace">... lots of activity bootstrapping an ubuntu VM, etc...</font></div><div><font face="monospace, monospace">$ ls result/debs/</font></div><div><font face="monospace, monospace">nix_1.11.9pre1234-abcdef-1_i386.deb</font></div><div><font face="monospace, monospace">$ file result/debs/nix_1.11.9pre1234-abcdef-1_i386.debĀ </font></div><div><font face="monospace, monospace">result/debs/nix_1.11.9pre1234-abcdef-1_i386.deb: Debian binary package (format 2.0)</font></div></div><div><br></div><div><br></div></div></div></div>