27 lines
734 B
Nix
27 lines
734 B
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, }:
|
|
let
|
|
system = "x86_64-linux";
|
|
rustVersion = "1.73.0";
|
|
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
|
|
extensions = [
|
|
"rust-src" # for rust-analyzer
|
|
];
|
|
};
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
in {
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
buildInputs = [ rust ]
|
|
++ (with pkgs; [ rust-analyzer pkg-config pulseaudio alsa-lib dbus ]);
|
|
RUST_BACKTRACE = 1;
|
|
};
|
|
};
|
|
}
|