From 1e84a7fb95ba8770aca373efd95d1dc87ceef432 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 2 Nov 2024 15:20:48 +0100 Subject: [PATCH] libcpucycles: hacky build fix The `env` gets inherited from a derivation using structured attrs, i.e. it also contains `NIX_HARDENING_ENABLE`. If this is not set, `stdenv.mkDerivation` will set `NIX_HARDENING_ENABLE` right into the derivation causing the evaluation to fail since there's now an overlap between with `env`: error: The `env` attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: - NIX_HARDENING_ENABLE: in `env`: "bindnow format pic relro stackprotector strictoverflow zerocallusedregs"; in derivation arguments: [ "bindnow" "format" "pic" "relro" "stackprotector" "strictoverflow" "zerocallusedregs" ] --- pkgs/by-name/li/libcpucycles/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libcpucycles/package.nix b/pkgs/by-name/li/libcpucycles/package.nix index 84292201640ba..e12975286eab5 100644 --- a/pkgs/by-name/li/libcpucycles/package.nix +++ b/pkgs/by-name/li/libcpucycles/package.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ python3 ]; - inherit (librandombytes) hardeningDisable configurePlatforms env; + inherit (librandombytes) hardeningDisable configurePlatforms env __structuredAttrs; preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id "$out/lib/libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib"