{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
futils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
rust-overlay,
futils,
} @ inputs: let
inherit (nixpkgs) lib;
inherit (futils.lib) eachDefaultSystem defaultSystems;
nixpkgsFor = lib.genAttrs defaultSystems (system:
import nixpkgs {
inherit system;
overlays = [
rust-overlay.overlays.default
];
});
in
eachDefaultSystem (system: let
pkgs = nixpkgsFor.${system};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
openssl
pkg-config
git
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
RUST_BACKTRACE = 1;
};
});
}