nixos: Add nixpkgs.crossSystem option for cross-compilation

This commit is contained in:
Shea Levy 2018-03-01 14:58:15 -05:00
parent 95579af5ec
commit 34487947ce
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

View File

@ -61,7 +61,7 @@ in
inherit (config.nixpkgs) config overlays system; inherit (config.nixpkgs) config overlays system;
} }
''; '';
default = import ../../.. { inherit (cfg) config overlays system; }; default = import ../../.. { inherit (cfg) config overlays system crossSystem; };
type = pkgsType; type = pkgsType;
example = literalExample ''import <nixpkgs> {}''; example = literalExample ''import <nixpkgs> {}'';
description = '' description = ''
@ -130,6 +130,18 @@ in
''; '';
}; };
crossSystem = mkOption {
type = types.nullOr types.attrs;
default = null;
description = ''
The description of the system we're cross-compiling to, or null
if this isn't a cross-compile. See the description of the
crossSystem argument in the nixpkgs manual.
Ignored when <code>nixpkgs.pkgs</code> is set.
'';
};
system = mkOption { system = mkOption {
type = types.str; type = types.str;
example = "i686-linux"; example = "i686-linux";