[Nix-dev] Questions on buildfarm

Eelco Dolstra eelco at cs.uu.nl
Sun May 15 20:57:01 CEST 2005


Hi Olivier,

On 15-mei-05, at 13:02, olivier wrote:

> I'm trying to set up a buildfarm, and have few questions.
> I fetched the buildfarm you use to build stratego/xt (hope you didn't  
> get mailed by the supervisor :p), and added my own derivations.
>
> I would know how do you do to build on different architecture. In  
> generic-dist/default.nix, there is:
> pkgsLinux = ...
> pkgsDarwin = ...
> pkgs = pkgsLinux
> But I don't see where to switch that on the supervisor... or anywhere  
> else.

This happens in the Nix expressions for the specific jobs.  For  
instance,

    
https://svn.cs.uu.nl:12443/repos/trace/release/trunk/generic-dist/jobs/ 
nix/nix.nix

(which is the build job for Nix itself), says something like

   nixRelease = input: makeReleasePage {
     ...
     nixBuilds = [
       (nixNixBuild input pkgsLinux)
       (nixNixBuild input pkgsDarwin)
     ];
     ...
   }

This means that to build a release page in the build farm it should do  
a build for both Linux and Darwin.  Nix will automatically do those  
builds remotely on the right machine if you have a list of  
platform-type / hostname mappings set up, like

   
https://svn.cs.uu.nl:12443/repos/trace/release/trunk/common/ 
distributed/remote-systems.conf

> Scripts make use of nix-prefetch-svn, but it is not installed by nix.  
> I set my PATH to the one provided by nixpkg, but I think it's not the  
> best way.

It's not the best way, but it is also what we do ;-)  The build farm is  
currently a bit messy to set up, it really should be a Nix package  
itself so that you get all dependencies automatically.

> I would also know where pages like this one are built. Are they  
> automatically from supervisor.pl ?
> http://catamaran.labs.cs.uu.nl/dist/nix/latest.xhtml

That's done by the CGI script that lives on the web server:

    
https://svn.cs.uu.nl:12443/repos/trace/release/trunk/server-side/cgi- 
bin/create-dist.pl

This script should be on the web server because the build+upload.sh  
script does HTTP PUT requests to upload releases to the server.  When  
it finishes uploading a release, it sends a special request to the CGI  
script to have it regenerate the index.

> Lastly, nix compilation fails on my power-pc (recently upgraded to  
> tiger). Compilation from standard environment works fine, but not   
> from nix. I worked around by setting PATH=/usr/bin:$PATH on the top of  
> the builder (when /nix/store/..../g++ and /nix/store/..../ld are used,  
> I get a link error on nix-store).

What's the link error?

I haven't tried installing Tiger yet, I was a bit afraid to do that  
just before going to a conference :-)

Mac OS X support in Nixpkgs is far from perfect, by the way.  Contrary  
to Nixpkgs on Linux it's not pure, so it uses the system C compiler and  
libraries.  It would be interesting to take the C library etc. from  
Darwin and use that to create a pure environment.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco




More information about the nix-dev mailing list