Is there any way of using mkCoqDerivation
inside of a flake? When I try to do so, it complains that I am trying to fetch a tarball without providing a sha256.
A bit of context: I have been developing a few packages that are not ready yet to be published in nixpkgs. I wanted to reference those packages from other projects without having to manually specify which commit I want to use. This seems to be one of the main use cases for flakes, though I would be willing to try other approaches if you have any ideas.
Sorry, I cannot help on flakes because I have no experience (and very limited knowledge) of them. I think Cyril is also not a flake user. However, I can mention that the Coq Nix Toolbox allows you to introduce local overlays for depending on other packages that are not yet part of nixpkgs. You do not have to pin a specific commit. You can reference a branch too.
That's nice. Is there a convenient way of sharing the overlaying code with other people other than copying and pasting? I haven't really used it before, so I do not know how it works.
I would like to add flake support to the main Coq repo, though I have no experience doing so
But if I've understood the Nix doc correctly, all I need to do is add flakes for all projects and they should compose
Would this basically be replacing the Coq Nix toolbox?
Arthur Azevedo de Amorim said:
That's nice. Is there a convenient way of sharing the overlaying code with other people other than copying and pasting? I haven't really used it before, so I do not know how it works.
Copy-pasting is the simplest way until something gets into nixpkgs. The good point is that verbatim copy-paste should work. Another way of course is to pin nixpkgs to a fork branch with the new package definitions.
Do flakes generate gh actions?
Nope
Then they are useless
The whole point of the toolbox (for me) is to be able to test reverse dependencies in my CI
Sure, they do not bring the same benefits.
And you need overlays since you want to be able to patch your users
Maybe these overlays can be replaced by flakes, I don't know, but generating gh actions is, IMO, the feature of the nix toolbox
That's certainly the main feature that most users benefit from, but it's not the only one that probably couldn't be replaced easily by flakes. You also have the possibility of easily testing various dependency and reverse dependency versions locally (from which the CI feature derives), etc.
@Ali Caglayan I should note that I never really completed the job of introducing the Coq Nix Toolbox into the main Coq repository by lack of time. The Nix infrastructure that is currently in there is not nearly as nice.
Cf. an attempt at https://github.com/coq/coq/pull/14435. But retrospectively, I think that I should just have used the GitHub Actions generating feature and ditched GitLab for Nix testing in the process.
Last updated: Oct 13 2024 at 01:02 UTC