Skip to content

Commit

Permalink
nixos: Add nixpkgs.crossSystem option for cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Mar 1, 2018
1 parent 95579af commit 3448794
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/modules/misc/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ in
inherit (config.nixpkgs) config overlays system;
}
'';
default = import ../../.. { inherit (cfg) config overlays system; };
default = import ../../.. { inherit (cfg) config overlays system crossSystem; };
type = pkgsType;
example = literalExample ''import <nixpkgs> {}'';
description = ''
Expand Down Expand Up @@ -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 {
type = types.str;
example = "i686-linux";
Expand Down

0 comments on commit 3448794

Please sign in to comment.