Nix(OS) : disable test build during compilation

528 views
Skip to first unread message

tobiasBora

unread,
Nov 29, 2017, 12:34:20 PM11/29/17
to nix-devel
Hello,

I'm using NixOs on my raspberry pi, and I don't know why, but since a few days, lot's of (basic) packages are built (like telnet). But here, it's not the question, I just would like to avoid to compile the useless stuff, like examples and tests, because it's reallllly slow to compile on a rpi (like after 8 hours only a small part was built).

Thank you,

Léo.

James Cook

unread,
Dec 1, 2017, 12:58:51 AM12/1/17
to tobiasBora, nix-devel
On 29 November 2017 at 09:34, tobiasBora <tobia...@gmail.com> wrote:
>
> Hello,
>
> I'm using NixOs on my raspberry pi, and I don't know why, but since a few days, lot's of (basic) packages are built (like telnet). But here, it's not the question, I just would like to avoid to compile the useless stuff, like examples and tests, because it's reallllly slow to compile on a rpi (like after 8 hours only a small part was built).

According to https://nixos.wiki/wiki/NixOS_on_ARM, there should be
pre-built ARM binaries in the cache, so you shouldn't have to compile
much. However I haven't used ARM so I can't confirm. Are you following
a channel?

Answering your question more directly: according to
https://nixos.org/nix-dev/2013-January/010516.html, unless something
has been changed since 2013, there's no easy way to disable tests
globally. However, you may be able to edit individual nix expressions
to disable tests.

James

Linus Heckemann

unread,
Dec 1, 2017, 3:29:29 AM12/1/17
to nix-...@googlegroups.com
On 01/12/17 05:58, James Cook wrote:
> According to https://nixos.wiki/wiki/NixOS_on_ARM, there should be
> pre-built ARM binaries in the cache, so you shouldn't have to compile
> much. However I haven't used ARM so I can't confirm. Are you following
> a channel?

There's a number of conditions for this to work (assuming it's not an
rpi3, which has a 64-bit arm processor and as such is supported by
cache.nixos.org)

1. Having configured Dezgeg's binary cache (see that wiki page)
2. Building from nixos-unstable or nixpkgs-unstable (not sure which one
it actually is), Dezgeg doesn't build 17.09
3. The packages actually being included in the cache. See
https://github.com/dezgeg/nixconfs/blob/master/packages.txt for a list
of closures actually included.

I also have an armv7 binary cache — no guarantees about availability,
reliability, or up-to-dateness, but you can use it if you want to and
trust me:

nix = {
binaryCaches = [ https://lugn.sphalerite.org/cache ];
trustedBinaryCaches = [ https://lugn.sphalerite.org/cache ];
binaryCachePublicKeys = [
"green:Cm0baEzipGtHM7IgoDXjd/3b94zwx2JfxHrHTm2j50A="
"lugn:0tvkqzfliXZSCfsGwi8BSTYMmMIDwGKRkI69sQDux3k="
];
};

tobiasBora

unread,
Dec 6, 2017, 1:42:02 PM12/6/17
to nix-devel
Hello,

Thank you for your answers, and sorry for my late answer, I was really busy these last days. So:


Answering your question more directly: according to
https://nixos.org/nix-dev/2013-January/010516.html, unless something
has been changed since 2013, there's no easy way to disable tests
globally.

Ok thank you, it's too bad that there is no global way to disable the tests.

> According to https://nixos.wiki/wiki/NixOS_on_ARM, there should be
> pre-built ARM binaries in the cache, so you shouldn't have to compile
> much.However I haven't used ARM so I can't confirm. Are you following
> a channel?

There's a number of conditions for this to work (assuming it's not an
rpi3, which has a 64-bit arm processor and as such is supported by
cache.nixos.org)

1. Having configured Dezgeg's binary cache (see that wiki page)

Yes, I've indeed the Dezgeg's binary cache channel enabled.
 
2. Building from nixos-unstable or nixpkgs-unstable (not sure which one
it actually is), Dezgeg doesn't build 17.09

Yes I'm running 18.03.
 
3. The packages actually being included in the cache. See
https://github.com/dezgeg/nixconfs/blob/master/packages.txt for a list
of closures actually included.
 
Hum, indeed, the problem is that cups is not included, and because of that it needs to compile lot's of stuff. However, I don't know why, but the build always fail at the exact same time, but it's another question.


I also have an armv7 binary cache
Unfortunately, I'm running raspberry pi 1 model B, so it's armv6. But thank you!
 
Thank you!

tobiasBora.

Reply all
Reply to author
Forward
0 new messages