[Nix-dev] How to build all of nixpkgs?

Tomasz Czyż tomasz.czyz at gmail.com
Mon May 22 17:21:42 CEST 2017


Look there, that's how all packages are build by CI:
http://hydra.nixos.org/jobset/nixpkgs/trunk#tabs-configuration
It uses pkgs/top-level/release.nix to build all of that.
Also it passes nixpkgs. So maybe you need to do something like

nix-build -I nixpkgs=path-to-your-nixpkgs pkgs/top-level/release.nix (and
eventually pass other options like officialRelease etc)

2017-05-22 16:18 GMT+01:00 Bjørn Forsman <bjorn.forsman at gmail.com>:

> On 21 May 2017 at 19:26, Tomasz Czyż <tomasz.czyz at gmail.com> wrote:
> > check release.nix (release-*.nix)
>
> I've tried to look at some of those. For instance,
> ./pkgs/top-level/release{,-small}.nix, and
> ./nixos/release-{small,combined}.nix. But I don't seem to get them
> working like I want with 'nix-build'.
>
> Examples:
>
> 1. "nix-build ./pkgs/top-level/release-small.nix" doesn't build any of
> the packages, it only builds channel, manual, isos and a bunch of VM
> tests. It seems to be because the attributes of the 'nixpkgs'
> attribute in that top-level expression does not contain direct
> derivations as sub-attributes but rather the derivations are one level
> further down, in an 'arch' attribute. Like mypkg.x86_64-linux instead
> of just mypkg. I tried adding 'recurseIntoAttrs', but it didn't help.
>
> 2. "nix-build ./pkgs/top-level/release.nix" gives "error: value is a
> set while a Boolean was expected". AFAICT, the expression has sensible
> default arguments. I don't know where it fails and --show-trace
> doesn't show any trace. So I'm stuck there.
>
> 3. "nix-build ./nixos/release-combined.nix" (and the -small variant)
> doesn't build any packages from the 'nixpkgs' set because it doesn't
> contain (direct) derivations. Same problem as (1).
>
> So is Hydra doing some magic with these expressions? Is it possible to
> build "world" with a simple "nix-build"?
>
> Best regards,
> Bjørn Forsman
>



-- 
Tomasz Czyż
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170522/920db545/attachment.html>


More information about the nix-dev mailing list