packaging: fix static build

Normally `pkgsStatic` adds ` -static` to `NIX_CFLAGS_COMPILE`. Due to a bug
this did not apply with `__structuredAttrs`. As the fix [1] has not been
backported yet, put it in the package manually.

[1] https://github.com/NixOS/nixpkgs/pull/428430

Fixes: https://git.lix.systems/lix-project/lix/issues/962

Change-Id: I6a6a6964c6a33f486ba3df3be16f715ad1b060c3
This commit is contained in:
Alois Wohlschlager
2025-08-20 18:31:52 +02:00
parent 010dae39d3
commit c82af241f5
+3
View File
@@ -386,6 +386,9 @@ stdenv.mkDerivation (finalAttrs: {
}
// lib.optionalAttrs hostPlatform.isLinux {
BUILD_TEST_SHELL = "${pkgsStatic.busybox}/bin";
}
// lib.optionalAttrs hostPlatform.isStatic {
NIX_CFLAGS_COMPILE = " -static";
};
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };