diff --git a/.travis.yml b/.travis.yml index 64858028084c56b506b0bb604387f4349ad62f78..8d0173216d91ed396d538500ea5909ffc83efda8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -version: ~> 1.0 +language: nix -import: nix-community/nix-travis-ci:nix.yml@main +nix: 2.3.4 sudo: false @@ -23,11 +23,23 @@ - NUR_REPO= matrix: include: - - env: NIX_PATH: nixpkgs=channel:nixpkgs-unstable + - env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-unstable + - env: NIX_CHANNEL=https://nixos.org/channels/nixos-unstable + - env: NIX_CHANNEL=https://nixos.org/channels/nixos-20.03 + -import: nix-community/nix-travis-ci:nix.yml@main + # + - nix --version + # for cachix we need travis to be a trusted nix user +sudo: false import: nix-community/nix-travis-ci:nix.yml@main sudo: false + + - if [ -n "${CACHIX_CACHE}" ]; then travis_retry nix-channel --update; fi + - if [ -n "${CACHIX_CACHE}" ]; then nix-env -iA cachix -f https://cachix.org/api/v1/install; fi + - if [ -n "${CACHIX_CACHE}" ]; then cachix use "${CACHIX_CACHE}"; fi + - nix-channel --add "${NIX_CHANNEL}" nixpkgs + - travis_retry nix-channel --update script: - nix-build ci.nix -A buildOutputs