rust skeleton

This commit is contained in:
Sebastian Hugentobler 2025-02-06 11:34:46 +01:00
parent 754713697d
commit 818816d16d
11 changed files with 710 additions and 1 deletions

35
rust/flake.nix Normal file
View file

@ -0,0 +1,35 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
};
outputs =
{
nixpkgs,
fenix,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
fx = fenix.packages.${system};
rust = fx.combine [
fx.stable.toolchain
];
buildInputs = [
rust
pkgs.cargo-deny
pkgs.rust-analyzer
];
in
{
devShells.default = pkgs.mkShell {
buildInputs = buildInputs;
};
}
);
}