diff options
author | Robert Helgesson <robert@rycee.net> | 2022-12-28 16:34:01 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2022-12-28 16:37:08 +0100 |
commit | 7fb1be82f4e180da9b53fb06de4d91c43b605b0f (patch) | |
tree | 7a49b4b334bb7f208445b59484ac0198e6091ee0 /pkgs/development/libraries | |
parent | 7e74ec53da20c288f9a45047e67e8227d95b2a55 (diff) |
libwebsockets: build static library only when necessary
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/libwebsockets/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libwebsockets/default.nix b/pkgs/development/libraries/libwebsockets/default.nix index b2839de387a27..a535763b8c196 100644 --- a/pkgs/development/libraries/libwebsockets/default.nix +++ b/pkgs/development/libraries/libwebsockets/default.nix @@ -33,7 +33,13 @@ stdenv.mkDerivation rec { "-DDISABLE_WERROR=ON" "-DLWS_BUILD_HASH=no_hash" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON" - ++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON"; + ++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON" + ++ ( + if stdenv.hostPlatform.isStatic then + [ "-DLWS_WITH_SHARED=OFF" ] + else + [ "-DLWS_WITH_STATIC=OFF" "-DLWS_LINK_TESTAPPS_DYNAMIC=ON" ] + ); postInstall = '' # Fix path that will be incorrect on move to "dev" output. |