File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2525 flake-utils . lib . eachSystem [ "x86_64-linux" "aarch64-linux" ] (
2626 system :
2727 let
28+ targetTriple = builtins . replaceStrings [ "-linux" ] [ "-unknown-linux-musl" ] system ;
2829 pkgs = import nixpkgs {
2930 inherit system ;
3031 overlays = [
3334 ] ;
3435 } ;
3536
37+
3638 # --- Libraries ---
3739 lib = pkgs . lib ;
3840 craneLib = ( crane . mkLib pkgs ) . overrideToolchain (
3941 toolchain :
4042 toolchain . rust-bin . nightly . "2025-06-20" . default . override {
41- targets = [ "x86_64-unknown-linux-musl" ] ;
43+ targets = [ targetTriple ] ;
4244 extensions = [
4345 "clippy"
4446 "rust-analyzer"
9092 ] ;
9193
9294 # Statically compile with MUSL for minimally sized binaries
93- CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl" ;
95+ CARGO_BUILD_TARGET = targetTriple ;
9496 CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static" ;
9597 } ;
9698
You can’t perform that action at this time.
0 commit comments