examples: improve robustness of deploy scripts

- The scripts now work within arbitrary nix-shells.
  Previously, they failed when run from nix shells other than
  `examples/shell.nix`.

- The scripts now work from arbitrary working dirs.
This commit is contained in:
Erik Arvstedt 2021-03-16 12:45:17 +01:00
parent 4022f86b92
commit cc7149eb78
No known key found for this signature in database
GPG key ID: 33312B944DD97846
4 changed files with 12 additions and 4 deletions

View file

@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
export NIX_PATH="nixpkgs=${nixpkgs-path}:nix-bitcoin=${toString nix-bitcoin-path}:."
export PATH="${path}''${PATH:+:}$PATH"
export NIX_BITCOIN_EXAMPLES_DIR="${toString ./.}"
alias fetch-release="${toString nix-bitcoin-path}/helper/fetch-release"
krops-deploy() {