Skip to content

Commit

Permalink
lib: Add *Platform.extensions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ericson2314 committed Sep 13, 2017
1 parent 1b1fc65 commit 741839a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 741839a

Please sign in to comment.