Skip to content

Commit

Permalink
use local packages to get intended version of rustup and cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Oct 24, 2023
1 parent 30aad4d commit ff24889
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
outputs = { self, flake-utils, nixpkgs, rust-overlay, crane }:
let
overlays = [ (import rust-overlay) ];
pkgs-for-system = system: import nixpkgs { inherit system overlays; };
mev-rs = system:
let
pkgs = import nixpkgs { inherit system overlays; };
pkgs = pkgs-for-system system;
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
in
Expand All @@ -36,5 +37,9 @@

packages.x86_64-linux.mev-rs = mev-rs "x86_64-linux";
packages.x86_64-linux.default = self.packages.x86_64-linux.mev-rs;

devShells.x86_64-darwin.default = import ./shell.nix { pkgs = pkgs-for-system "x86_64-darwin"; };
devShells.aarch64-darwin.default = import ./shell.nix { pkgs = pkgs-for-system "aarch64-darwin"; };
devShells.x86_64-linux.default = import ./shell.nix { pkgs = pkgs-for-system "x86_64-linux"; };
};
}

0 comments on commit ff24889

Please sign in to comment.