systems: allow passing in string for cross/localSystem
This makes things a little bit more convenient. Just pass in like: $ nix-build ’<nixpkgs>’ -A hello --argstr localSystem x86_64-linux --argstr crossSystem aarch64-linux
This commit is contained in:
@@ -85,6 +85,7 @@ import ./. (builtins.removeAttrs args [ "system" "platform" ] // {
|
||||
inherit config overlays crossSystem crossOverlays;
|
||||
# Fallback: Assume we are building packages on the current (build, in GNU
|
||||
# Autotools parlance) system.
|
||||
localSystem = (if args ? localSystem then {}
|
||||
else { system = builtins.currentSystem; }) // localSystem;
|
||||
localSystem = if builtins.isString localSystem then localSystem
|
||||
else (if args ? localSystem then {}
|
||||
else { system = builtins.currentSystem; }) // localSystem;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user