Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv: throw from ghcjs.cc.outputs rather than ghcjs.cc #208993

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions pkgs/stdenv/cross/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,17 @@ in lib.init bootStages ++ [
else if crossSystem.useAndroidPrebuilt or false
then buildPackages."androidndkPkgs_${crossSystem.ndkVer}".clang
else if targetPlatform.isGhcjs
# Need to use `throw` so tryEval for splicing works, ugh. Using
# `null` or skipping the attribute would cause an eval failure
# `tryEval` wouldn't catch, wrecking accessing previous stages
# when there is a C compiler and everything should be fine.
then throw "no C compiler provided for this platform"
then {
# Need to use `throw` for the `outputs` attribute so tryEval for
# splicing works. Using `null` or skipping the attribute would
# cause an eval failure that `tryEval` wouldn't catch, wrecking
# accessing previous stages when there is a C compiler and
# everything should be fine.
outputs = throw "no C compiler provided for this platform";
libc = "none";
This conversation was marked as resolved.
Show resolved Hide resolved
isClang = false;
isGNU = false;
}
else if crossSystem.isDarwin
then buildPackages.llvmPackages.libcxxClang
else if crossSystem.useLLVM or false
Expand Down
4 changes: 2 additions & 2 deletions pkgs/top-level/splice.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ let
# on {}
tryGetOutputs = value0:
let
inherit (builtins.tryEval value0) success value;
inherit (builtins.tryEval (getOutputs value0)) success value;
in
getOutputs (lib.optionalAttrs success value);
lib.optionalAttrs success value;
getOutputs = value: lib.genAttrs
(value.outputs or (lib.optional (value ? out) "out"))
(output: value.${output});
Expand Down