Skip to content

Commit

Permalink
Add Nix shell
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-zahner committed Nov 9, 2024
1 parent 9dc4217 commit 352a0be
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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 <nixpkgs> { 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;
}

0 comments on commit 352a0be

Please sign in to comment.