Skip to content

Reproducible Solana program builds with Nix Flakes

License

Notifications You must be signed in to change notification settings

nasadorian/solflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solflake

An attempt at Nix-ifying the Solana toolchain for reproducible builds with pinned dependencies.

This repository is a work in progress and contributions are welcome!

Install

Assuming Nix is already installed, this project can be used directly from the command line to load the Solana platform in a shell.

$ nix develop github:nasadorian/solflake

It can also be referenced in a flake.nix file for a Solana project.

{
  description = "A very basic Solana flake";
  inputs = {
    solflake.url = "github:nasadorian/solflake";
  };
  outputs = { self, solflake }: {
    ...
  };
}

Usage

Once the flake has been loaded into the developer environment, a Solana program project can be compiled using cargo directly.

cargo build --release --target sbf-solana-solana

Please note that the cargo-build-sbf tool and cargo build-sbf will not work, as they depend on rustup, which this flake intentionally elides.

Supported Versions

Version is currently pinned to Solana v1.17.6 and platform-tools v1.39 while development is underway. The longer term aim is to mirror all available upstream releases so the flake can be used with a version tag.

Supported Systems

System support mirrors that of solana and platform-tools.

  • Linux x86_64
  • Darwin x86_64 and aarch64 aka Apple Silicon
  • Windows not yet supported, please contribute

About

Reproducible Solana program builds with Nix Flakes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages