mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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:
parent
1b1fc65505
commit
741839a687
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user