Coqtail's CI tests against the Coq master branch and uses Cachix to avoid building it from scratch. This was working up until about a month ago, but since then it's been building instead of pulling the precompiled version. I'm not sure if there's something wrong with my configuration, or if it's on the Coq end, or if it's something about how GitHub Actions and Cachix interact. Has anything changed recently with whatever process is responsible for pushing to https://app.cachix.org/cache/coq?
@Cyril Cohen @Théo Zimmermann
Yes, there was a change in the infrastructure and there is also a known issue whose fix is still unmerged. You can have a look at the recent change that was merged in the coq-community templates repository. I can also have a look at your configuration and propose an update later today.
@Wolf Honore
This patch:
diff --git a/ci/coq.nix b/ci/coq.nix
index ddf62bc..fac5145 100644
--- a/ci/coq.nix
+++ b/ci/coq.nix
@@ -4,7 +4,6 @@ with builtins;
assert version != null || tox_version != null;
let
url_8_4 = "https://github.com/NixOS/nixpkgs/archive/18.03.tar.gz";
- url_master = "https://github.com/coq/coq-on-cachix/tarball/master";
dot_version = if version != null then
version
else
@@ -16,6 +15,6 @@ let
in if hasAttr coq coqpkgs then
getAttr coq coqpkgs
else if dot_version == "master" then
- import (fetchTarball url_master) { }
+ coqpkgs.coq.override({ version = "master"; })
else
abort "Invalid version ${dot_version}"
should give you a version that is built faster and sometimes already in cache.
When https://github.com/coq/coq/pull/14723 is merged, it should be more systematically in cache as long as the nixpkgs versions used doesn't differ much from the one pinned in the Coq Nix Toolbox.
Note that you could now even simplify your setup further like this:
diff --git a/ci/coq.nix b/ci/coq.nix
index ddf62bc..0465f7b 100644
--- a/ci/coq.nix
+++ b/ci/coq.nix
@@ -4,18 +4,12 @@ with builtins;
assert version != null || tox_version != null;
let
url_8_4 = "https://github.com/NixOS/nixpkgs/archive/18.03.tar.gz";
- url_master = "https://github.com/coq/coq-on-cachix/tarball/master";
dot_version = if version != null then
version
else
concatStringsSep "."
(filter (s: s != "") (match "coq([0-9]|master)([0-9]*)-.*" tox_version));
- coq = "coq_" + replaceStrings [ "." ] [ "_" ] dot_version;
- coqpkgs =
- if dot_version == "8.4" then import (fetchTarball url_8_4) { } else pkgs;
-in if hasAttr coq coqpkgs then
- getAttr coq coqpkgs
-else if dot_version == "master" then
- import (fetchTarball url_master) { }
-else
- abort "Invalid version ${dot_version}"
+in
+if dot_version == "8.4"
+then (import (fetchTarball url_8_4) { }).coq_8_4
+else pkgs.coq.override({ version = dot_version; })
Thanks, I'll give that a try.
Last updated: Oct 13 2024 at 01:02 UTC