From 741839a687b5ecad445dbb7afb87ceeacdde2d6b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 12 Sep 2017 15:24:03 -0400 Subject: [PATCH] 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. --- lib/systems/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index c22c9956196..b5138a5ba71 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -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;