{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem
(system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.nightly.latest.default;
# new! 👇
nativeBuildInputs = with pkgs; [ rustToolchain pkg-config ];
# also new! 👇
buildInputs = with pkgs; [ openssl alsa-lib pkg-config ];
in
with pkgs;
{
devShells.default = mkShell {
# 👇 and now we can just inherit them
inherit buildInputs nativeBuildInputs;
};
}
);
}