File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 2727 rustc = rust ;
2828 } ;
2929
30+ # Rust with musl target for static builds on Linux
31+ rustWithMusl = pkgs . rust-bin . stable . latest . default . override {
32+ extensions = [ "rust-src" ] ;
33+ targets = [ "x86_64-unknown-linux-musl" ] ;
34+ } ;
35+
36+ rustPlatformMusl = pkgs . makeRustPlatform {
37+ cargo = rustWithMusl ;
38+ rustc = rustWithMusl ;
39+ } ;
40+
3041 manifest = ( pkgs . lib . importTOML ./Cargo.toml ) . package ;
3142 in {
3243 # `nix develop`.
7586 } ;
7687
7788 # Static musl build for Linux distribution
78- anonymiser-musl = rustPlatform . buildRustPackage {
89+ anonymiser-musl = rustPlatformMusl . buildRustPackage {
7990 pname = "${ manifest . name } -musl" ;
8091 version = manifest . version ;
8192 src = pkgs . nix-gitignore . gitignoreSource [ ] ./. ;
92103 perl # Required for vendored OpenSSL build
93104 ] ;
94105
95- # With vendored OpenSSL, we don't need runtime dependencies
106+ # With vendored OpenSSL and static linking , we don't need runtime dependencies
96107 buildInputs = [ ] ;
97108
98109 checkFlags = [
You can’t perform that action at this time.
0 commit comments