Skip to content

Commit

Permalink
Merge branch 'main' into arm-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc authored Oct 30, 2024
2 parents 2551936 + 519c6fa commit 7ee0ffa
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif
# By default make `?=` operator will treat empty assignment as a set value and will not use the default value.
# Both cases should fallback to default of getting the version from git tag.
ifeq ($(strip $(REPOSITORY_VERSION)),)
override REPOSITORY_VERSION = "$(shell git describe --tags --always --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*' 2> /dev/null | sed 's/^.//')"
override REPOSITORY_VERSION = "$(shell ( git describe --tags --always --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*' 2> /dev/null | sed 's/^.//' ) )"
endif
REPOSITORY_BRANCH := "$(shell git rev-parse --abbrev-ref HEAD)"
BUILD_TIMESTAMP ?= $(shell date '+%Y-%m-%dT%H:%M:%S')
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ Install the latest version from source:
cargo install --locked stellar-cli --features opt
```

Install or run the unreleased main branch with nix:
```
% nix run 'github:stellar/stellar-cli' -- --help
or install
% nix profile install github:stellar/stellar-cli
```

## Autocomplete
The Stellar CLI supports some autocompletion. To set up, run the following commands:

Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 29 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "stellar-cli development shell";
description = "stellar-cli";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
Expand All @@ -14,14 +14,13 @@
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs;
{
devShells.default = mkShell {
nativeBuildInputs = lib.optionals (stdenv.isDarwin) [
stellardev = {
name = "stellar";
src = ./.;
nativeBuildInputs = pkgs.lib.optionals (pkgs.stdenv.isDarwin) [
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
];
buildInputs = [
buildInputs = with pkgs; [
openssl
pkg-config
jq
Expand All @@ -31,6 +30,29 @@
})
] ++ lib.optionals (stdenv.isLinux) [libudev-zero];
};
stellarcli = stellardev // {
cargoLock = {
lockFile = ./Cargo.lock;
};

cargoLock.outputHashes = {
# The only git+https dependency in Cargo.lock
"stellar-rpc-client-21.4.0" = "sha256-ue7Ynux9YaDP3f/XkHz2OPd2g0iCX5R0yS5SaVHEYxQ";
};

doCheck = false;

GIT_REVISION = "${self.rev or self.dirtyRev or "unknown"}";
};
rustPlatformMod = pkgs.makeRustPlatform {
cargo = pkgs.rust-bin.stable.latest.default;
rustc = pkgs.rust-bin.stable.latest.default;
};
in
with pkgs;
{
devShells.default = mkShell stellardev;
packages.default = rustPlatformMod.buildRustPackage stellarcli;
}
);
}

0 comments on commit 7ee0ffa

Please sign in to comment.