lib: Add *Platform.extensions

This is used to platform specific library and exectuable extensions. In
the next commit I'll replace a bunch of ad-hoc logic with it.
This commit is contained in:
John Ericson 2017-09-12 15:24:03 -04:00
parent 1b1fc65505
commit 741839a687

View file

@ -28,6 +28,15 @@ rec {
else if final.isLinux then "glibc"
# TODO(@Ericson2314) think more about other operating systems
else "native/impure";
extensions = {
sharedLibrary =
/**/ if final.isDarwin then ".dylib"
else if final.isWindows then ".dll"
else ".so";
executable =
/**/ if final.isWindows then ".exe"
else "";
};
} // mapAttrs (n: v: v final.parsed) inspect.predicates
// args;
in final;