36
rust/flake.nix
Normal file
36
rust/flake.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "eulerfunt in Rust";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = github:nixos/nixpkgs/release-22.05;
|
||||
utils.url = github:numtide/flake-utils;
|
||||
rust-overlay.url = github:oxalica/rust-overlay;
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils, rust-overlay }:
|
||||
utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
|
||||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
|
||||
in
|
||||
{
|
||||
devShells = rec {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [ toolchain ];
|
||||
};
|
||||
withLsp = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
toolchain
|
||||
pkgs.rust-analyzer
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user