forcebot_rs/flake.nix

40 lines
962 B
Nix
Raw Permalink Normal View History

2023-10-22 08:35:09 -04:00
{
description = "forcebot_rs flake";
2023-10-22 08:35:09 -04:00
inputs = {
2024-02-19 21:27:24 -05:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix/monthly";
2023-10-22 08:35:09 -04:00
};
2024-02-19 21:27:24 -05:00
outputs = {
nixpkgs,
fenix,
...
} @ inputs: let
2023-10-22 08:35:09 -04:00
system = "x86_64-linux";
2024-02-19 21:27:24 -05:00
overlays = [fenix.overlays.default];
2023-10-22 08:35:09 -04:00
pkgs = import nixpkgs {
2024-02-19 21:27:24 -05:00
inherit system overlays;
2023-10-22 08:35:09 -04:00
};
in {
devShells.${system}.default = pkgs.mkShell {
name = "forcebot_rs-devenv";
2024-02-25 10:31:36 -05:00
nativeBuildInputs = [pkgs.pkg-config];
buildInputs = with pkgs; [openssl libiconv];
2023-10-22 08:35:09 -04:00
packages = with pkgs; [
nil
alejandra
2024-02-19 21:27:24 -05:00
rust-analyzer-nightly
(fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
2023-10-22 08:35:09 -04:00
];
2024-02-19 21:27:24 -05:00
RUST_BACKTRACE = 1;
RUST_SRC_PATH = "${fenix.packages.${system}.complete.rust-src}/lib/rustlib/src/rust/library";
2023-10-22 08:35:09 -04:00
};
};
}