let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
lib = pkgs.lib;
rustVersion = "1.67.1";
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src"
];
};
in
pkgs.mkShell {
buildInputs = [
rust
] ++ (with pkgs; [
# common
rust-analyzer
pkg-config
clang
mold
# api
postgresql_15.lib
openssl
# client
alsa-lib
udev
wayland
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
]);
shellHook = ''
export LD_LIBRARY_PATH="${lib.makeLibraryPath [
pkgs.postgresql_15.lib
pkgs.openssl
pkgs.alsa-lib
pkgs.udev
pkgs.wayland
pkgs.xorg.libX11
pkgs.xorg.libXcursor
pkgs.xorg.libXrandr
pkgs.xorg.libXi
]}";
'';
#RUST_BACKTRACE = 1;
}