Files
eulerfunt/rust/flake.nix
Amneesh Singh fcce234a10 initial commit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-26 11:51:44 +05:30

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
];
};
};
}
);
}