mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
lib/systems: Add staticLibrary and library
staticLibrary includes common extensions for static libraries library is a new common attribute that includes both shared and static extensions
This commit is contained in:
parent
70ec0e7ec4
commit
875d77ca03
1 changed files with 7 additions and 1 deletions
|
@ -65,11 +65,17 @@ rec {
|
||||||
# is why we use the more obscure "bfd" and not "binutils" for this
|
# is why we use the more obscure "bfd" and not "binutils" for this
|
||||||
# choice.
|
# choice.
|
||||||
else "bfd";
|
else "bfd";
|
||||||
extensions = {
|
extensions = rec {
|
||||||
sharedLibrary =
|
sharedLibrary =
|
||||||
/**/ if final.isDarwin then ".dylib"
|
/**/ if final.isDarwin then ".dylib"
|
||||||
else if final.isWindows then ".dll"
|
else if final.isWindows then ".dll"
|
||||||
else ".so";
|
else ".so";
|
||||||
|
staticLibrary =
|
||||||
|
/**/ if final.isWindows then ".lib"
|
||||||
|
else ".a";
|
||||||
|
library =
|
||||||
|
/**/ if final.isStatic then staticLibrary
|
||||||
|
else sharedLibrary;
|
||||||
executable =
|
executable =
|
||||||
/**/ if final.isWindows then ".exe"
|
/**/ if final.isWindows then ".exe"
|
||||||
else "";
|
else "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue