15 Sep 2025 |
matthewcroughan |
nix-repl> pkgsLLVM.hostPlatform.linker
"lld"
nix-repl> pkgsLLVM.pkgsMusl.hostPlatform.linker
"bfd"
| 20:08:17 |
Tristan Ross | Right eval, wrong order | 20:08:18 |
matthewcroughan | * nix-repl> pkgsLLVM.hostPlatform.linker
"lld"
nix-repl> pkgsLLVM.pkgsMusl.hostPlatform.linker
"bfd"
| 20:08:23 |
Tristan Ross | pkgsMusl.pkgsLLVM | 20:08:30 |
matthewcroughan | Ah.. I see | 20:08:35 |
Tristan Ross | It's the // problem | 20:08:43 |
matthewcroughan | well that's why it builds then I guess | 20:08:52 |
matthewcroughan | I got the order wrong | 20:08:56 |
matthewcroughan | nix build nixpkgs#pkgsMusl.pkgsLLVM.netbsd.getent should fail | 20:09:20 |
matthewcroughan | Tristan Ross: actually pkgsMusl.pkgsLLVM sets the buildPlatform to musl | 20:17:20 |
Tristan Ross | Huh | 20:17:33 |
matthewcroughan | nix build github:nixos/nixpkgs/staging-next#pkgsMusl.pkgsLLVM.netbsd.getent | 20:17:54 |
matthewcroughan | yes, this fails in the same way | 20:17:57 |
matthewcroughan | So that's your reproducer | 20:18:44 |
matthewcroughan | Even when I set the buildPlatform to musl, it fails in the same way | 20:25:06 |
matthewcroughan | it only worked when I got the order wrong then, that's all | 20:25:19 |
matthewcroughan | so that derivation just doesn't build for musl atm | 20:25:24 |
matthewcroughan | * so that derivation just doesn't build for musl + llvm atm | 20:25:41 |
matthewcroughan | I cannot get it to stop stripping | 21:02:33 |
matthewcroughan | dontStrip has no impact on the netbsd derivations | 21:02:38 |
matthewcroughan | Tristan Ross: this fixes it, but is it the right solution? | 21:11:41 |
matthewcroughan | diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
index e0be2bb06..cda2a441a 100644
--- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
+++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
@@ -11,6 +11,7 @@
netbsdSetupHook,
makeMinimal,
version,
+ binutils,
}:
mkDerivation (
@@ -69,6 +70,7 @@ mkDerivation (
"TSORT=cat"
# Can't process man pages yet
"MKSHARE=no"
+ "OBJCOPY=${binutils}/bin/strip"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# GNU objcopy produces broken .a libs which won't link into dependers.
| 21:11:45 |
Tristan Ross | Um | 21:11:59 |
matthewcroughan | What I really wanted to do was find a way to pass --strip-unneeded to the build | 21:12:04 |
Tristan Ross | You probably want to use stdenv.cc.bintools | 21:12:09 |
matthewcroughan | but I could not figure out a way of doing it | 21:12:14 |
emily | OBJCOPY=strip does not seem like it would ever be the right solution… | 21:13:23 |
matthewcroughan | this does not contain strip in this case | 21:14:21 |
Tristan Ross | Weird | 21:14:31 |
matthewcroughan | /nix/store/ip27s5zi4zgdb65zbkccgpggr28sg506-aarch64-unknown-linux-musl-llvm-binutils-wrapper-19.1.7 | 21:15:11 |