forcebot_rs/flake.nix

39 lines
962 B
Nix

{
description = "forcebot_rs flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix/monthly";
};
outputs = {
nixpkgs,
fenix,
...
} @ inputs: let
system = "x86_64-linux";
overlays = [fenix.overlays.default];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
devShells.${system}.default = pkgs.mkShell {
name = "forcebot_rs-devenv";
nativeBuildInputs = [pkgs.pkg-config];
buildInputs = with pkgs; [openssl libiconv];
packages = with pkgs; [
nil
alejandra
rust-analyzer-nightly
(fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
];
RUST_BACKTRACE = 1;
RUST_SRC_PATH = "${fenix.packages.${system}.complete.rust-src}/lib/rustlib/src/rust/library";
};
};
}