diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/options.nix | 6 | ||||
-rw-r--r-- | lib/systems/default.nix | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/options.nix b/lib/options.nix index 4780a56fc1c37..d71d9421b7b10 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -261,7 +261,7 @@ rec { concatMap (opt: let name = showOption opt.loc; - docOption = rec { + docOption = { loc = opt.loc; inherit name; description = opt.description or null; @@ -280,9 +280,9 @@ rec { renderOptionValue opt.example ); } - // optionalAttrs (opt ? default) { + // optionalAttrs (opt ? defaultText || opt ? default) { default = - builtins.addErrorContext "while evaluating the default value of option `${name}`" ( + builtins.addErrorContext "while evaluating the ${if opt?defaultText then "defaultText" else "default value"} of option `${name}`" ( renderOptionValue (opt.defaultText or opt.default) ); } diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 85e24e08d3603..f4784c61c6752 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -50,6 +50,7 @@ rec { else if final.isFreeBSD then "fblibc" else if final.isNetBSD then "nblibc" else if final.isAvr then "avrlibc" + else if final.isGhcjs then null else if final.isNone then "newlib" # TODO(@Ericson2314) think more about other operating systems else "native/impure"; @@ -120,7 +121,7 @@ rec { ({ linux-kernel = args.linux-kernel or {}; gcc = args.gcc or {}; - rustc = args.rust or {}; + rustc = args.rustc or {}; } // platforms.select final) linux-kernel gcc rustc; @@ -144,6 +145,7 @@ rec { else if final.isS390 && !final.isS390x then null else if final.isx86_64 then "x86_64" else if final.isx86 then "i386" + else if final.isMips64 then "mips64${lib.optionalString final.isLittleEndian "el"}" else final.uname.processor; # Name used by UEFI for architectures. |