zlsplitter: move NIX_LDFLAGS into env for structuredAttrs

This commit is contained in:
Stefan Frijters
2026-02-08 22:39:50 +01:00
parent 23b1a1d6d7
commit d072efb750
+20 -19
View File
@@ -66,25 +66,26 @@ 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.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"
]);
env = lib.optionalAttrs clangStdenv.hostPlatform.isLinux {
# JUCE dlopen's these at runtime, crashes without them
NIX_LDFLAGS = toString [
"-lX11"
"-lXext"
"-lXcursor"
"-lXinerama"
"-lXrandr"
];
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