-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
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,45 @@ | ||
{ | ||
description = "stellar-cli development shell"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
in | ||
with pkgs; | ||
{ | ||
devShells.default = mkShell { | ||
buildInputs = [ | ||
openssl | ||
pkg-config | ||
libudev-zero | ||
jq | ||
(rust-bin.stable.latest.default.override { | ||
extensions = [ "rust-src" ]; | ||
targets = [ "wasm32-unknown-unknown" ]; | ||
}) | ||
]; | ||
shellHook = | ||
'' | ||
echo `nix --version` | ||
alias stellar="cargo run --bin stellar --" | ||
SOROBAN_SECRET_KEY=SBPXU3OP65M2DQPRM4YFZ5NME66NWWH5DHN44IBDYAN4TFKKY7CS4OHY stellar keys add dev_key | ||
export STELLAR_NETWORK=testnet | ||
export STELLAR_ACCOUNT=dev_key | ||
shell=$SHELL | ||
shell=`basename $SHELL` | ||
source <(stellar completion --shell $shell) | ||
''; | ||
}; | ||
} | ||
); | ||
} |