From d7d35b875ac3468b78eec3a8a2c8c5fcce4f38c5 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 15 Sep 2019 18:28:39 -0700 Subject: [PATCH 1/4] nixpkgs-pinned: fetch a tarball instead it's much faster --- pkgs/nixpkgs-pinned.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/nixpkgs-pinned.nix b/pkgs/nixpkgs-pinned.nix index 1ee64cd..bc10fd7 100644 --- a/pkgs/nixpkgs-pinned.nix +++ b/pkgs/nixpkgs-pinned.nix @@ -1,12 +1,7 @@ +let + fetch = rev: builtins.fetchTarball "https://github.com/nixos/nixpkgs-channels/archive/${rev}.tar.gz"; +in { - nixpkgs = builtins.fetchGit { - url = "https://github.com/nixos/nixpkgs-channels"; - ref = "nixos-19.03"; - rev = "e6ad5e75f3bfaab5e7b7f0f128bf13d534879e65"; - }; - nixpkgs-unstable = builtins.fetchGit { - url = "https://github.com/nixos/nixpkgs-channels"; - ref = "nixos-unstable"; - rev = "765a71f15025ce78024bae3dc4a92bd2be3a8fbf"; - }; + nixpkgs = fetch "e6ad5e75f3bfaab5e7b7f0f128bf13d534879e65"; + nixpkgs-unstable = fetch "765a71f15025ce78024bae3dc4a92bd2be3a8fbf"; } From 1e3afa54c5c3b07a0fe3a5ed0e8f86b1db95105c Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 19 Jul 2019 09:41:36 -0700 Subject: [PATCH 2/4] travis: add travis yml Test with nixpkgs at: - nixpkgs-channels/nixos-19.03 - nixpkgs-channels/nixos-unstable Signed-off-by: William Casarin --- .travis.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a975dad --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +language: minimal + +# Retry installing nix due to nondeterministic error +# Fatal error: glibc detected an invalid stdio handle +# see: +# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181 +# https://github.com/nixos/nix/issues/2733 +install: | + (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 + nix-env -iA cachix -f https://cachix.org/api/v1/install + cachix use nix-bitcoin + [ $STABLE -eq 1 ] && export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)" + [ $STABLE -eq 0 ] && export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs-unstable)" + VER="$(nix eval nixpkgs.lib.version)" +env: + matrix: + - PKG=nodeinfo STABLE=1 + - PKG=hwi STABLE=1 + - PKG=hwi STABLE=0 + - PKG=lightning-charge STABLE=1 + - PKG=lightning-charge STABLE=0 + - PKG=nanopos STABLE=1 + - PKG=nanopos STABLE=0 + - PKG=spark-wallet STABLE=1 + - PKG=spark-wallet STABLE=0 + - PKG=elementsd STABLE=1 + - PKG=elementsd STABLE=0 + - PKG=electrs STABLE=1 + - PKG=electrs STABLE=0 + global: + secure: "bC32LNscv/BXG5fxQuO2laB4cU5lB1bMeYymZk5c/ZFwXMeK5L4DBmU8VXQANTsZA9bJcqWAcwWVu11jxan3n8lCNsAB/6JcRSluPzOkpwewldurwEMT8OUO2GP85zVjPmGEO8tyZL+yTWZr+3dRZgi7zi+rYTtDx8uhg7qH/g8zsZMLCHYi2eNQpiIFl8VnzX1gIGN83FSBMq9HdWinOD+Te+cpGcKnXcnd0LjMmFD3dD1d4Bs4TL1j36owRLPugD0lZbi9W6NipIaQShc30f5+34DoUWV8/Q9UxFvbPsmnDJ4hY7RRssQP1DbanzEAnjiB//PLmzNzAHJrw4eS3AScnTaZD7Tly/0VqQG7tXk1kheSvrmWkrQ/jeF0R5v+YW/e563sPs+J4QFxteCIUP5EPKohsmK4Jw6kB9rBH/RK4RDRCdhsneum4HTDJNXBFZH6jpa0B2L1nFZ9NmLgeO1dcPlSrVKIMvcZ5wGXsLjyalo4yrUSsGuT2a+96cKtfj936H70GPjGnzZq2QwbxJ6UOd02JPEEHHhe0WrKGut9qk+Rb3hPcgvrkhVLvHGY0N98DzpuR86UTWsRm7trTD69H49sjToVbx/ylOAvhkdK3Jv3+EpYNdkKIX6AYdIV32CTkk/Zmrig0ov2mQsnbWY5BB6ycSBAfIJu0/enhR8=" # nix-bitcoin cachix signing key +script: | + printf '%s (%s)\n' "$NIX_PATH" "$VER" + nix-build -A $PKG | cachix push nix-bitcoin From 8e751c5f3cdac65650f92f771fb4efff88e41622 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 23 Sep 2019 15:40:28 -0700 Subject: [PATCH 3/4] travis: disable unstable electrs, it is broken Signed-off-by: William Casarin --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a975dad..0e869bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: minimal +# broken: +# - PKG=electrs STABLE=0 + # Retry installing nix due to nondeterministic error # Fatal error: glibc detected an invalid stdio handle # see: @@ -27,7 +30,6 @@ env: - PKG=elementsd STABLE=1 - PKG=elementsd STABLE=0 - PKG=electrs STABLE=1 - - PKG=electrs STABLE=0 global: secure: "bC32LNscv/BXG5fxQuO2laB4cU5lB1bMeYymZk5c/ZFwXMeK5L4DBmU8VXQANTsZA9bJcqWAcwWVu11jxan3n8lCNsAB/6JcRSluPzOkpwewldurwEMT8OUO2GP85zVjPmGEO8tyZL+yTWZr+3dRZgi7zi+rYTtDx8uhg7qH/g8zsZMLCHYi2eNQpiIFl8VnzX1gIGN83FSBMq9HdWinOD+Te+cpGcKnXcnd0LjMmFD3dD1d4Bs4TL1j36owRLPugD0lZbi9W6NipIaQShc30f5+34DoUWV8/Q9UxFvbPsmnDJ4hY7RRssQP1DbanzEAnjiB//PLmzNzAHJrw4eS3AScnTaZD7Tly/0VqQG7tXk1kheSvrmWkrQ/jeF0R5v+YW/e563sPs+J4QFxteCIUP5EPKohsmK4Jw6kB9rBH/RK4RDRCdhsneum4HTDJNXBFZH6jpa0B2L1nFZ9NmLgeO1dcPlSrVKIMvcZ5wGXsLjyalo4yrUSsGuT2a+96cKtfj936H70GPjGnzZq2QwbxJ6UOd02JPEEHHhe0WrKGut9qk+Rb3hPcgvrkhVLvHGY0N98DzpuR86UTWsRm7trTD69H49sjToVbx/ylOAvhkdK3Jv3+EpYNdkKIX6AYdIV32CTkk/Zmrig0ov2mQsnbWY5BB6ycSBAfIJu0/enhR8=" # nix-bitcoin cachix signing key script: | From aabf4a4730f9c53bbc4f85bc79d79b2d0fc8817d Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 23 Sep 2019 16:21:34 -0700 Subject: [PATCH 4/4] travis: remove cachix push revertme when this is working Signed-off-by: William Casarin --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e869bd..81a7120 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,6 @@ env: - PKG=elementsd STABLE=1 - PKG=elementsd STABLE=0 - PKG=electrs STABLE=1 - global: - secure: "bC32LNscv/BXG5fxQuO2laB4cU5lB1bMeYymZk5c/ZFwXMeK5L4DBmU8VXQANTsZA9bJcqWAcwWVu11jxan3n8lCNsAB/6JcRSluPzOkpwewldurwEMT8OUO2GP85zVjPmGEO8tyZL+yTWZr+3dRZgi7zi+rYTtDx8uhg7qH/g8zsZMLCHYi2eNQpiIFl8VnzX1gIGN83FSBMq9HdWinOD+Te+cpGcKnXcnd0LjMmFD3dD1d4Bs4TL1j36owRLPugD0lZbi9W6NipIaQShc30f5+34DoUWV8/Q9UxFvbPsmnDJ4hY7RRssQP1DbanzEAnjiB//PLmzNzAHJrw4eS3AScnTaZD7Tly/0VqQG7tXk1kheSvrmWkrQ/jeF0R5v+YW/e563sPs+J4QFxteCIUP5EPKohsmK4Jw6kB9rBH/RK4RDRCdhsneum4HTDJNXBFZH6jpa0B2L1nFZ9NmLgeO1dcPlSrVKIMvcZ5wGXsLjyalo4yrUSsGuT2a+96cKtfj936H70GPjGnzZq2QwbxJ6UOd02JPEEHHhe0WrKGut9qk+Rb3hPcgvrkhVLvHGY0N98DzpuR86UTWsRm7trTD69H49sjToVbx/ylOAvhkdK3Jv3+EpYNdkKIX6AYdIV32CTkk/Zmrig0ov2mQsnbWY5BB6ycSBAfIJu0/enhR8=" # nix-bitcoin cachix signing key script: | printf '%s (%s)\n' "$NIX_PATH" "$VER" - nix-build -A $PKG | cachix push nix-bitcoin + nix-build -A $PKG