diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..fa7b780 --- /dev/null +++ b/shell.nix @@ -0,0 +1,27 @@ +/* +based on +https://discourse.nixos.org/t/how-can-i-set-up-my-rust-programming-environment/4501/9 +*/ +let + rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); + pkgs = import { overlays = [ rust_overlay ]; }; + rustVersion = "latest"; # using a specific version: "1.62.0" + rust = pkgs.rust-bin.stable.${rustVersion}.default.override { + extensions = [ + "rust-src" # for rust-analyzer + "rust-analyzer" # usable by IDEs like zed-editor + ]; + }; +in +pkgs.mkShell { + buildInputs = [ + rust + ] ++ (with pkgs; [ + pkg-config + openssl + # other dependencies + #gtk3 + #wrapGAppsHook + ]); + RUST_BACKTRACE = 1; +}