travis: set NIX_PATH as early as possible

This avoids some unneded downloads when installing cachix.
This commit is contained in:
Erik Arvstedt 2020-01-12 20:52:35 +01:00
parent c51bbcf104
commit b0e759160d
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -8,10 +8,10 @@ install:
# https://github.com/nixos/nix/issues/2733 # https://github.com/nixos/nix/issues/2733
- (for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1) - (for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1)
- . /home/travis/.nix-profile/etc/profile.d/nix.sh - . /home/travis/.nix-profile/etc/profile.d/nix.sh
- nix-env -iA cachix -f https://cachix.org/api/v1/install
- cachix use nix-bitcoin
- if [[ $STABLE == 1 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)"; fi - if [[ $STABLE == 1 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)"; fi
- if [[ $STABLE == 0 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs-unstable)"; fi - if [[ $STABLE == 0 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs-unstable)"; fi
- nix-env -iA cachix -f https://cachix.org/api/v1/install
- cachix use nix-bitcoin
- VER="$(nix eval nixpkgs.lib.version)" - VER="$(nix eval nixpkgs.lib.version)"
env: env:
jobs: jobs: