dotfiles/templates/rust/flake.nix
2024-04-13 09:03:44 -04:00

36 lines
727 B
Nix

{
description = "Basic Rust project";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
{
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
rustc
cargo
cargo-watch
rustfmt
pkg-config
openssl
];
};
}
);
};
}