dotfiles/templates/rust/flake.nix

37 lines
748 B
Nix
Raw Permalink Normal View History

2023-11-01 22:13:49 -04:00
{
description = "Basic Rust project";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-04-13 09:03:44 -04:00
outputs =
{ self, nixpkgs }:
2023-11-01 22:13:49 -04:00
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
2024-04-13 09:03:44 -04:00
in
{
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
rustc
cargo
cargo-watch
2025-01-20 22:35:40 -05:00
clippy
rustfmt
pkg-config
openssl
];
};
2024-04-13 09:03:44 -04:00
}
);
2023-11-01 22:13:49 -04:00
};
}