initial commit

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-26 11:47:17 +05:30
commit fcce234a10
15 changed files with 268 additions and 0 deletions

36
rust/flake.nix Normal file
View 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
];
};
};
}
);
}