diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-04 23:31:08 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-05 00:06:10 +0100 |
commit | a2cbc77e4f1cf55a9c142d07377f67b0f83985ec (patch) | |
tree | 81934d578f6fd86d09443bdc9b3ce2c0cd42aeef /pkgs/os-specific | |
parent | 8867304b5e8bab1741b5b32d7a503d58fccf055e (diff) | |
download | nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar.gz nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar.bz2 nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar.lz nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar.xz nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.tar.zst nixlib-a2cbc77e4f1cf55a9c142d07377f67b0f83985ec.zip |
Only show/build a package on the platforms listed in meta.platforms
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).
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/nvidia-x11/default.nix | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 1ade24736279..3e1fc920a59b 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -40,9 +40,6 @@ , ... }: -assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" - || stdenv.isArm || stdenv.system == "mips64el-linux"; - assert stdenv.platform.name == "sheevaplug" -> stdenv.platform.uboot != null; let diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 35595a7b8f4f..f9239bb5fba1 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -21,8 +21,7 @@ stdenv.mkDerivation { patches = [ ./version-test.patch ] - ++ optional (!libsOnly && versionAtLeast kernelDev.version "3.11") ./nvidia-drivers-linux-3.11-incremental.patch - ; + ++ optional (!libsOnly && versionAtLeast kernelDev.version "3.11") ./nvidia-drivers-linux-3.11-incremental.patch; src = if stdenv.system == "i686-linux" then @@ -58,5 +57,7 @@ stdenv.mkDerivation { homepage = http://www.nvidia.com/object/unix.html; description = "X.org driver and kernel module for NVIDIA graphics cards"; license = stdenv.lib.licenses.unfreeRedistributable; + platforms = stdenv.lib.platforms.linux; + hydraPlatforms = []; }; } |