zlequalizer: move NIX_LDFLAGS into env for structuredAttrs
This commit is contained in:
@@ -66,25 +66,27 @@ clangStdenv.mkDerivation (finalAttrs: {
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
# JUCE dlopen's these at runtime, crashes without them
|
||||
NIX_LDFLAGS = lib.optionalString clangStdenv.hostPlatform.isLinux (toString [
|
||||
"-lX11"
|
||||
"-lXext"
|
||||
"-lXcursor"
|
||||
"-lXinerama"
|
||||
"-lXrandr"
|
||||
]);
|
||||
env = lib.optionalAttrs clangStdenv.hostPlatform.isLinux {
|
||||
# JUCE dlopen's these at runtime, crashes without them
|
||||
NIX_LDFLAGS = toString [
|
||||
"-lX11"
|
||||
"-lXext"
|
||||
"-lXcursor"
|
||||
"-lXinerama"
|
||||
"-lXrandr"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString clangStdenv.hostPlatform.isLinux (toString [
|
||||
# juce, compiled in this build as part of a Git submodule, uses `-flto` as
|
||||
# a Link Time Optimization flag, and instructs the plugin compiled here to
|
||||
# use this flag to. This breaks the build for us. Using _fat_ LTO allows
|
||||
# successful linking while still providing LTO benefits. If our build of
|
||||
# `juce` was used as a dependency, we could have patched that `-flto` line
|
||||
# in our juce's source, but that is not possible because it is used as a
|
||||
# Git Submodule.
|
||||
"-ffat-lto-objects"
|
||||
]);
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
# juce, compiled in this build as part of a Git submodule, uses `-flto` as
|
||||
# a Link Time Optimization flag, and instructs the plugin compiled here to
|
||||
# use this flag to. This breaks the build for us. Using _fat_ LTO allows
|
||||
# successful linking while still providing LTO benefits. If our build of
|
||||
# `juce` was used as a dependency, we could have patched that `-flto` line
|
||||
# in our juce's source, but that is not possible because it is used as a
|
||||
# Git Submodule.
|
||||
"-ffat-lto-objects"
|
||||
];
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
# see: https://github.com/ZL-Audio/ZLEqualizer#clone-and-build
|
||||
|
||||
Reference in New Issue
Block a user