37 lines
878 B
Nix
37 lines
878 B
Nix
{
|
|
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
|
|
];
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|