-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hackage2nix: Always print extraVersions #464
base: master
Are you sure you want to change the base?
Conversation
09cea16
to
9acb5f0
Compare
We just reviewed this in @peti's Haskell twitch stream, but neither from here nor from the linked thread we understand why this is the right thing to do or desirable. Usually nixpkgs tries to avoid pinning Haskell packages as much as possible, so that the update procedure is automatic and does not depend on a person bumping versions. Pins are usually added only to work around failure cases, not as the default. The only automatic pin that nixpkgs does is to pin Stackage versions. So far we think that if Agda wants to provide "stable versions" of its ecosystem that compile with each other, this should go into Stackage instead of nixpkgs. This reduces nixpkgs maintenance efforts, and also means that all Linux distributions get well-working Agda versions, not only nixpkgs. Please let us know if we missed something! |
How would pinning a version in stackage work? I assume this would need to be done upstream. I am not quite sure how this generates problems with maintance, as wouldn't a pinned stackage version require as much maintainership here as a pinned nix version here? If this is not the way to try and do this then the linked pr above should likely be reverted. I'm basically just trying to replicate the structure of |
Pinning a version in stackage would basically mean getting Agda (and all it's dependencies) into stackage. This describes how to get a package into stackage: https://github.com/commercialhaskell/stackage#add-your-package
Anyone is able to get a package into stackage, but you will need to send a PR to the stackage repo as described in the steps above. You don't necessarily have to involve the Agda upstream. If Agda relies on libraries that aren't in stackage nightly, you'll either have to send a PR to the Agda repo removing them (or bumping versions), or send a PR to the stackage repo adding them as well.
peti runs a script regularly that pulls in the latest stackage lts version and locks all packages to those versions. We know that those packages are all able to be compiled together (aside from the various fixes needed specifically for nixpkgs). This usually reduces the maintenance burden for us, and also makes it so that other distros are able to pull in a given Haskell package much easier. Like nh2 is saying, this is often better for the community. |
There is a line https://github.com/commercialhaskell/stackage/blob/e96f08afccf1112598816a47cc9c52b4600cead6/build-constraints.yaml#L2347 here however I guess the |
@alexarice I think that I suggest you follow the directions on the stackage repo and first make sure that Agda is able to built with stackage nightly. If so, then you should probably open a PR removing the If you have trouble, I suggest opening an issue on the stackage repo to ask for help from the stackage maintainers. |
How does this allow multiple versions to be built? |
@alexarice No, there is only one version of any given package at a time in Stackage. |
Just to check, the issue with pinning an old version here is that eventually the dependencies will update versions and could break the pinned version, and the pinned version would only be fixable by pinning more packages. Edit: And even keeping an extra version around for a short amount of time isn't ideal as it would require manual changes to clean up old versions etc. |
See discussion in NixOS/nixpkgs#90143
In short, I would like to be able to pin nixpkgs's
agdaPackages
to version 2.6.1. I had hoped that addingAgda == 2.6.1
toextra-packages
in the config would cause aAgda_2_6_1
attribute to be generated, though this is not the case with currenthackage2nix
. This PR changes this so that a fixed version attribute is made, even if this is identical to the default version.I have built this and ran it and it creates this diff on
nixpkgs
mastercc @cdepillabout as you may be interested
I apologise in advance for any haskell style errors