From a2cbc77e4f1cf55a9c142d07377f67b0f83985ec Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Nov 2013 23:31:08 +0100 Subject: Only show/build a package on the platforms listed in meta.platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function ‘mkDerivation’ now checks whether the current platform type is included in a package's meta.platform field. If not, it throws an exception: $ nix-build -A linux --argstr system x86_64-darwin error: user-thrown exception: the package ‘linux-3.10.15’ is not supported on ‘x86_64-darwin’ These packages also no longer show up in ‘nix-env -qa’ output. This means, for instance, that the number of packages shown on x86_64-freebsd has dropped from 9268 to 4764. Since meta.platforms was also used to prevent Hydra from building some packages, there now is a new attribute meta.hydraPlatforms listing the platforms on which Hydra should build the package (which defaults to meta.platforms). --- doc/meta.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'doc') diff --git a/doc/meta.xml b/doc/meta.xml index df84915cc0915..00e9b8ac67a17 100644 --- a/doc/meta.xml +++ b/doc/meta.xml @@ -118,6 +118,47 @@ interpretation: package). + + platforms + The list of Nix platform types on which the + package is supported. If this attribute is set, the package will + refuse to build, and won’t show up in nix-env + -qa output, on any platform not listed + here. An example is: + + +meta.platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + + + The set lib.platforms defines various common + lists of platforms types, so it’s more typical to write: + + +meta.platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + + + + + + + hydraPlatforms + The list of Nix platform types for which the Hydra + instance at hydra.nixos.org should build the + package. (Hydra is the Nix-based continuous build system.) It + defaults to the value of meta.platforms. Thus, + the only reason to set meta.hydraPlatforms is + if you want hydra.nixos.org to build the + package on a subset of meta.platforms, or not + at all, e.g. + + +meta.platforms = stdenv.lib.platforms.linux; +meta.hydraPlatforms = []; + + + + + broken If set to true, the package is -- cgit 1.4.1