Adding an automatic proper platform for some systems we know
That eases the burden of having to always set the platform at least in the non-pc pure nixpkgs platforms.
This commit is contained in:
parent
0bf70832f4
commit
ea6b1d808c
@ -77,9 +77,17 @@ let
|
|||||||
else configExpr;
|
else configExpr;
|
||||||
|
|
||||||
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc)
|
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc)
|
||||||
platform = if platform_ != null then platform_
|
|
||||||
else config.platform or (import ./platforms.nix).pc;
|
|
||||||
|
|
||||||
|
platformAuto = let
|
||||||
|
platforms = (import ./platforms.nix);
|
||||||
|
in
|
||||||
|
if system == "armv6l-linux" then platforms.raspberrypi
|
||||||
|
else if system == "armv5tel-linux" then platforms.sheevaplug
|
||||||
|
else if system == "mips64el-linux" then platforms.fuloong2f_n32
|
||||||
|
else platforms.pc;
|
||||||
|
|
||||||
|
platform = if platform_ != null then platform_
|
||||||
|
else config.platform or platformAuto;
|
||||||
|
|
||||||
# Helper functions that are exported through `pkgs'.
|
# Helper functions that are exported through `pkgs'.
|
||||||
helperFunctions =
|
helperFunctions =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user