Last active
February 16, 2026 23:40
-
-
Save TomMD/c74f0fa2c3f33a38526e5aab5b4f6de6 to your computer and use it in GitHub Desktop.
Solana on Nix 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
| with import <nixpkgs> {}; | |
| let agave = (builtins.getFlake "github:tommd/nixpkgs?ref=add-agave-forked-derivation").legacyPackages.${pkgs.system}.solana-agave; | |
| platformTools = (builtins.getFlake "github:tommd/platform-tools?rev=79b7b43775d15cacb04a434fcb111a56bbb9b16a").packages.${pkgs.system}.default; | |
| in mkShell { | |
| # Packages provided as build inputs | |
| buildInputs = [ | |
| agave | |
| platformTools | |
| openssl | |
| gcc | |
| ]; | |
| # pkg-config needs to be in nativeBuildInputs for the shell hooks to work correctly | |
| nativeBuildInputs = [ | |
| pkg-config | |
| ]; | |
| # Optional: set environment variables if the build system needs hints (e.g., Rust projects) | |
| shellHook = '' | |
| export PKG_CONFIG_PATH=${openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH | |
| export PATH=${platformTools}/rust/bin:$PATH | |
| echo "Consider: cargo build-sbf --skip-tools-install --no-rustup-override" | |
| ''; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this nix-shell script downloaded as
shell.nixyou can: