diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 07938f69a786..4fa52a64d1e7 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -167,7 +167,7 @@ self = stdenv.mkDerivation { ] ++ lib.optionals (!withLibseccomp) [ # RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50 "--disable-seccomp-sandboxing" - ] ++ lib.optionals (atLeast210 && stdenv.cc.isGNU) [ + ] ++ lib.optionals (atLeast210 && stdenv.cc.isGNU && !enableStatic) [ "--enable-lto" ];