mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-15 19:00:58 +00:00
24 lines
651 B
Nix
24 lines
651 B
Nix
/*
|
|
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
|
|
]);
|
|
RUST_BACKTRACE = 1;
|
|
}
|