From c5c66060484800ecd97a811157a31e9cdd2241b1 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 21 May 2017 14:02:19 -0400 Subject: lib: Infer `libc` field of platform if not specified This is especially useful when not cross compiling. It means we can remove the `stdenv.isGlibc` predicate too. Additionally, use this to simplify the logic to choose the appropriate libiconv derivation. --- lib/systems/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/systems/default.nix') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index a61e4efc4ef8..c37b6be25232 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -21,6 +21,12 @@ rec { config = parse.tripleFromSystem final.parsed; # Just a guess, based on `system` platform = platforms.selectBySystem final.system; + libc = + /**/ if final.isDarwin then "libSystem" + else if final.isMinGW then "msvcrt" + else if final.isLinux then "glibc" + # TODO(@Ericson2314) think more about other operating systems + else "native/impure"; } // mapAttrs (n: v: v final.parsed) inspect.predicates // args; in final; -- cgit 1.4.1