From 1dcba1771488099ae4a03cb56fcf7f480e9a49d1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 7 Jun 2021 11:25:11 +0000 Subject: [PATCH] wrapBintoolsWith: fix final stage NetBSD Fixes "bintools" on NetBSD -- without this only the version in stdenv would work, not the one from the final stage. Andi tried to warn me about this[1]. Andi, I'm sorry for doubting you. [1]: https://github.com/NixOS/nixpkgs/pull/124499#discussion_r641949801 --- pkgs/build-support/bintools-wrapper/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index bf81d00e5ea..5d2f2f977a7 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -14,7 +14,9 @@ if libc == null then null else if stdenvNoCC.targetPlatform.isNetBSD then - if libc != targetPackages.netbsdCross.headers then + if !(targetPackages ? netbsdCross) then + netbsd.ld_elf_so + else if libc != targetPackages.netbsdCross.headers then targetPackages.netbsdCross.ld_elf_so else null