From 1f4fe01c659e660c928c7bf6eb2dff8b8fce6065 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Tue, 1 Sep 2020 08:35:45 -0500 Subject: [PATCH 1/4] replace language:nix --- .travis.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d01732..6485802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -language: nix -nix: 2.3.4 +version: ~> 1.0 +import: nix-community/nix-travis-ci:nix.yml@main sudo: false @@ -23,20 +23,9 @@ env: matrix: include: - - 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 - -install: - - nix --version - # for cachix we need travis to be a trusted nix user - - echo "trusted-users = $USER" | sudo tee -a /etc/nix/nix.conf - - sudo systemctl restart nix-daemon - - 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 + - env: NIX_PATH: nixpkgs=channel:nixpkgs-unstable + - env: NIX_PATH: nixpkgs=channel:nixos-unstable + - env: NIX_PATH: nixpkgs=channel:nixos-20.03 script: - nix-build ci.nix -A buildOutputs From 5f885e2333d3a401cc70ad02c56566dd4f62711f Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Tue, 1 Sep 2020 17:43:33 -0500 Subject: [PATCH 2/4] fix env markup --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6485802..575a93e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,9 @@ env: matrix: include: - - env: NIX_PATH: nixpkgs=channel:nixpkgs-unstable - - env: NIX_PATH: nixpkgs=channel:nixos-unstable - - env: NIX_PATH: nixpkgs=channel:nixos-20.03 + - env: NIX_PATH=nixpkgs=channel:nixpkgs-unstable + - env: NIX_PATH=nixpkgs=channel:nixos-unstable + - env: NIX_PATH=nixpkgs=channel:nixos-20.03 script: - nix-build ci.nix -A buildOutputs From 9e2e9f3076482f47c94172ae33db8dafce008b42 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Wed, 2 Sep 2020 23:01:15 -0500 Subject: [PATCH 3/4] comment out CACHIX_CACHE --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 575a93e..d63588a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: # # For this to work, you also need to set the CACHIX_SIGNING_KEY # in your repository settings in Travis. - - CACHIX_CACHE= + # - CACHIX_CACHE= # Set this to notify the global nur package registry that changes are # available. # From 7f823a0302f8c5f281a48d063712337b0810c86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 3 Sep 2020 06:08:30 +0200 Subject: [PATCH 4/4] travis: check if NUR_REPO was changed from the default. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d63588a..ef6bb32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ env: # # The repo name as used in # https://github.com/nix-community/NUR/blob/master/repos.json - - NUR_REPO= + - NUR_REPO="" matrix: include: @@ -35,6 +35,6 @@ script: after_success: - if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"; fi - - if [ "cron" != "${TRAVIS_EVENT_TYPE}" -a "false" = "${TRAVIS_PULL_REQUEST}" -a "master" = "${TRAVIS_BRANCH}" ]; then + - if [[ NUR_REPO != "" && "cron" != "${TRAVIS_EVENT_TYPE}" && "false" = "${TRAVIS_PULL_REQUEST}" && "master" = "${TRAVIS_BRANCH}" ]]; then curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi