mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
build(nix): install musl targets in dev-shell (#6493)
To build for musl, the target needs to be installed. Within the Nix dev-shell, we don't manage versions / components via rustup, thus they need to be added manually.
This commit is contained in:
@@ -55,7 +55,11 @@
|
||||
|
||||
mkShellWithRustVersion = rustVersion: pkgs.mkShell {
|
||||
packages = [ pkgs.cargo-tauri pkgs.iptables pkgs.nodePackages.pnpm cargo-udeps pkgs.cargo-sort ];
|
||||
buildInputs = rustVersion ++ packages;
|
||||
buildInputs = packages ++ [
|
||||
(rustVersion.override {
|
||||
targets = [ "x86_64-unknown-linux-musl" ];
|
||||
})
|
||||
];
|
||||
name = "rust-env";
|
||||
src = ../../rust;
|
||||
|
||||
@@ -64,13 +68,8 @@
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = mkShellWithRustVersion [
|
||||
(pkgs.rust-bin.fromRustupToolchainFile ../../rust/rust-toolchain.toml)
|
||||
];
|
||||
|
||||
devShells.nightly = mkShellWithRustVersion [
|
||||
(pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
|
||||
];
|
||||
devShells.default = mkShellWithRustVersion (pkgs.rust-bin.fromRustupToolchainFile ../../rust/rust-toolchain.toml);
|
||||
devShells.nightly = mkShellWithRustVersion rust-nightly;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user