[Nix-dev] Almost 50% of all Hydra jobs for Nixpgks/master don't compile
Eelco Dolstra
eelco.dolstra at logicblox.com
Fri Dec 6 20:27:14 CET 2013
Hi,
On 06/12/13 13:58, Peter Simons wrote:
> * "meta.platforms" can be used to prohibit any and all attempts to build
> that package on platforms you haven't listed. Linux kernel packages, for
> instance, should set "platforms" to student.lib.platforms.linux, because
> it makes no sense to try to build those packages anywhere else. However,
> the majority of packages should specify no "platforms" at all!
Not quite: you really should set meta.platforms, to prevent the package from
showing up on platforms where it doesn't work. Nowadays you get an error if you
try to build a package on a platform not included in meta.platforms:
$ nix-build -A bazaar --argstr system x86_64-freebsd
error: the package ‘bazaar-2.5.1’ in
‘/home/eelco/Dev/nixpkgs/pkgs/applications/version-management/bazaar/default.nix:25’
is not supported on ‘x86_64-freebsd’
IMHO it's better to be conservative: if you've only tested the package on Linux
and are not willing/able to fix Hydra build failures on other platforms, you
should set meta.platforms to stdenv.lib.platforms.linux. Otherwise, we just
create false hope (e.g. a Darwin user may see the package in "nix-env -qa" and
then discover that it doesn't work).
> * "meta.hydraPlatforms", on the other hand, specifies the list of platforms
> for which Hydra will build that particular package. Obviously, that list
> should be a subset of "meta.platforms". If your attribute configures a
> large list of Hydra platforms, then please check that those builds
> actually succeed at <http://hydra.nixos.org/jobset/nixpkgs/trunk>. If
> they don't, then you should either (a) fix the build or (b) remove the
> broken platform from the list.
Note that meta.hydraPlatforms defaults to meta.platforms. So for most packages,
you should set meta.platforms but not meta.hydraPlatforms. The only reason to
set meta.hydraPlatforms is if you don't want Hydra to build the package for some
reason (e.g. legal).
See also: http://nixos.org/nixpkgs/manual/#idp450992
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
More information about the nix-dev
mailing list