Created
March 9, 2023 13:24
-
-
Save ydm/87fc9649b26b2aaa48ba59657d4d4b4e to your computer and use it in GitHub Desktop.
Custom Rust version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs = { | |
| nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05; | |
| flake-utils.url = github:numtide/flake-utils; | |
| rust-overlay.url = github:oxalica/rust-overlay; | |
| }; | |
| outputs = { self, nixpkgs, flake-utils, rust-overlay }: | |
| flake-utils.lib.simpleFlake { | |
| inherit self nixpkgs; | |
| name = "Rust environment"; | |
| preOverlays = [rust-overlay.overlays.default]; | |
| shell = ./shell.nix; | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { pkgs }: | |
| with pkgs; | |
| let rust = rust-bin.stable."1.62.0".default.override { | |
| extensions = [ "rust-src" ]; | |
| }; | |
| in mkShell { | |
| packages = [ | |
| clang | |
| cmake | |
| libclang | |
| perl | |
| pkg-config | |
| protobuf | |
| rust | |
| ]; | |
| shellHook = '' | |
| export LIBCLANG_PATH="${libclang.lib}/lib" | |
| echo | |
| echo shell.nix: loaded | |
| echo | |
| ''; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment