Properly split Rust flags

This commit is contained in:
Mikael Voss 2024-10-11 13:23:56 +02:00
parent 6a765ae4ff
commit 64decb01d1
No known key found for this signature in database

View file

@ -35,7 +35,7 @@ in {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [ final.makeBinaryWrapper ];
buildInputs = prevAttrs.buildInputs or [ ] ++ [ final.mimalloc ];
NIX_RUSTFLAGS = lib.toList prevAttrs.NIX_RUSTFLAGS or [ ] ++ [ "-C link-arg=-lmimalloc" ];
NIX_RUSTFLAGS = lib.toList prevAttrs.NIX_RUSTFLAGS or [ ] ++ [ "-C" "link-arg=-lmimalloc" ];
postInstall = prevAttrs.postInstall or "" + ''
wrapProgram "$out/bin/fractal" \
@ -87,7 +87,7 @@ in {
NIX_LDFLAGS = toString (lib.toList prevAttrs.env.NIX_LDFLAGS or [ ] ++ [ "-lmimalloc" ]);
};
NIX_RUSTFLAGS = lib.toList prevAttrs.NIX_RUSTFLAGS or [ ] ++ [ "-C link-arg=-lmimalloc" ];
NIX_RUSTFLAGS = lib.toList prevAttrs.NIX_RUSTFLAGS or [ ] ++ [ "-C" "link-arg=-lmimalloc" ];
} // lib.optionalAttrs (!prevAttrs ? env.NIX_LDFLAGS) {
NIX_LDFLAGS = lib.toList prevAttrs.NIX_LDFLAGS or [ ] ++ [ "-lmimalloc" ];
}))