diff options
-rw-r--r-- | lib/systems/default.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix index a3462d2d424b2..40a2c88f32b8f 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -85,17 +85,18 @@ rec { # is why we use the more obscure "bfd" and not "binutils" for this # choice. else "bfd"; - extensions = rec { - sharedLibrary = assert final.hasSharedLibraries; - /**/ if final.isDarwin then ".dylib" + extensions = lib.optionalAttrs final.hasSharedLibraries { + sharedLibrary = + if final.isDarwin then ".dylib" else if final.isWindows then ".dll" else ".so"; + } // { staticLibrary = /**/ if final.isWindows then ".lib" else ".a"; library = - /**/ if final.isStatic then staticLibrary - else sharedLibrary; + /**/ if final.isStatic then final.extensions.staticLibrary + else final.extensions.sharedLibrary; executable = /**/ if final.isWindows then ".exe" else ""; |