fix rust template
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{
|
||||
description = "Rust-Nix";
|
||||
description = "Rust-Hello";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -32,7 +32,7 @@
|
||||
# Use rust-bin to generate the toolchain from rust-toolchain.toml
|
||||
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
|
||||
buildRustCrateForPkgs = pkgs:
|
||||
buildRustCrateForPkgs = _:
|
||||
pkgs.buildRustCrate.override {
|
||||
rustc = rust-toolchain; # Use rustc from toolchain
|
||||
cargo = rust-toolchain; # Use cargo from toolchain
|
||||
@@ -52,6 +52,7 @@
|
||||
hello = cargoNix.rootCrate.build;
|
||||
default = hello;
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = [rust-toolchain];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user