-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: switch from nix-shell to nix flakes (#124)
- Loading branch information
Showing
4 changed files
with
281 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
description = "Development environment for the sp1 tendermint light client"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
solc = { | ||
url = "github:hellwolf/solc.nix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
foundry.url = "github:shazow/foundry.nix/main"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
}; | ||
|
||
outputs = inputs: inputs.flake-utils.lib.eachSystem | ||
[ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] | ||
( | ||
system: | ||
let | ||
pkgs = import inputs.nixpkgs { | ||
inherit system; | ||
overlays = [ | ||
(import inputs.rust-overlay) | ||
inputs.foundry.overlay | ||
inputs.solc.overlay | ||
]; | ||
}; | ||
in | ||
{ | ||
devShell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
openssl | ||
openssl.dev | ||
pkg-config | ||
foundry-bin | ||
go-ethereum | ||
solc_0_8_28 | ||
(inputs.solc.mkDefault pkgs solc_0_8_28) | ||
bun | ||
just | ||
golangci-lint | ||
go | ||
jq | ||
parallel | ||
rust-bin.stable.latest.default | ||
protobuf | ||
buf | ||
protoc-gen-go | ||
protoc-gen-go-grpc | ||
]; | ||
|
||
NIX_LD_LIBRARY_PATH = with pkgs.buildPackages; lib.makeLibraryPath [ | ||
stdenv.cc.cc | ||
]; | ||
|
||
shellHook = '' | ||
if [ -z "$(which cargo-prove)" ]; then | ||
echo "SP1 toolchain is not installed. This is recommended to generate risc-v elfs. To install, please follow the instructions at" | ||
echo "https://docs.succinct.xyz/getting-started/install.html" | ||
fi | ||
''; | ||
}; | ||
} | ||
); | ||
} |