From 4060dceed6fb67b3ac8aafb06047959caa6dd55d Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 2 Feb 2026 00:15:28 +0100 Subject: [PATCH] unicorn: move NIX_LDFLAGS into env for structuredAttrs --- pkgs/by-name/un/unicorn/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/un/unicorn/package.nix b/pkgs/by-name/un/unicorn/package.nix index 54d524e33ff8..156ca182d110 100644 --- a/pkgs/by-name/un/unicorn/package.nix +++ b/pkgs/by-name/un/unicorn/package.nix @@ -26,8 +26,10 @@ stdenv.mkDerivation (finalAttrs: { cctools ]; - # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails - NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; + env = lib.optionalAttrs stdenv.hostPlatform.isRiscV { + # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails + NIX_LDFLAGS = "-latomic"; + }; cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Some x86 tests are interrupted by signal 10