Closed dunnl closed 1 year ago
Because Verdi is an opam project, the first nix build should succeed and build Verdi for me.
That's just not possible if a dependency of that package has a "moving" source (and a git branch is a moving source). Nix guarantees reproducibility (in a particular sense), and it requires that all the inputs to a derivation must have a corresponding checksum, which this doesn't. I believe it's a bad idea to put a package like this into any repository, so it should probably be fixed upstream (with either a particular git revision or a stable link with a checksum locking it).
As for the second error (when ran with --impure
), it is indeed fixable on the opam-nix
side. I will look into it.
For now, as a workaround, you can override the src
argument of the offending packages with something like src = builtins.fetchGit "https://github.com/DistributedComponents/InfSeqExt.git";
or similar. Note that this will require --impure
.
That particular error should be fixed in f4aa535d3d266ddd5bbd3c63156135a825fc6d52 . The flake still doesn't build, but it's a separate issue.
As of 5bfdc95cfb7662cac808eb1baa70ae3fff0cab4f, your flake builds fine now. Thanks for reporting!
Can confirm both of these fixes. Checksums are evidently not common in Coq's core-dev
and extra-dev
repos:
$ cd opam-coq-archive/extra-dev
$ find . -iname 'opam' | wc -l
316
$ grep --files-with-matches "checksum" . -R | wc -l
30
So --impure
will be required for the foreseeable future here, which is indeed an upstream issue. Cheers!
Describe the bug I am not able to build the Coq package Verdi (or other Coq projects that depend on the Coq package index) using
buildOpamProject
, even though Verdi is an opam project.To Reproduce
Clone my fork of Verdi that adds a
flake.nix
and checkout the branchopam-nix-issue
Run
nix build --show-trace
Be met with the following trace
Just for fun, run
nix build --impure --show-trace
to see if that fixes anythingBe met with the following trace