-
-
Notifications
You must be signed in to change notification settings - Fork 154
hackage2nix reproducibility #431
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
Comments
https://www.youtube.com/watch?v=qX0mgtSm360 has very detailed instructions how to run |
That's really cool that you've put it in a video. Video is a great format for explaining things. When I tried running the update script, I followed the Setup and Run steps in the hackage2nix README. My goal was to test a configuration change, not hacking on hackage2nix or anything like that. Even without my "proposed solution" I don't think that it should take more than a little shell script invocation. If my intention was to do more work on hackage2nix etc, I'd probably have found the video. |
I believe I can close this issue now. Do you agree? Or do you feel like your suggestion hasn't been fully resolved or addressed yet? |
The hackage2nix readme does not work if you don't also follow the steps from the video. I think the instructions in the readme itself should be minimal but correct. Minimal because the video does a good job explaining all the subtleties, correct because otherwise people run into trouble like me. You have spent significant effort on the current workflow and I understand if you're not motivated to change it again. Perhaps you don't want people to regenerate the package set in a single command without setup? Anyway, that's up to you as a maintainer. |
Would you mind making a specific suggestion how to improve the README? I would very much like it to describe the process correctly, so if you could offer concrete advice -- or a PR? -- then that would be very useful.
What makes you say that? If the workflow can be improved, then I am all for it! I just don't see what improvements you would suggest, specifically. What would you like to change? |
Going through this as well myself now, I think I start to understand what @roberth is asking. A common use case seems to be that somebody wants to "just" do a minor change to But there are some obstacles to it:
|
This should make it much easier for new contributers to contribute to `cabal2nix`, as it addresses many of the pain points from NixOS#431. The added Stack build also improves reproducibility by using a Stackage LTS and pinning a nixpkgs version.
This should make it much easier for new contributers to contribute to `cabal2nix`, as it addresses many of the pain points from NixOS#431. The added Stack build also improves reproducibility by using a Stackage LTS and pinning a nixpkgs version.
The steps in Nixpkgs to regenerate the packages have been reduced to essentially two steps, which is close enough for me. My notes for a quick test with updated hackage, distilled from the more complete Test newly uploaded releaseCheck that ./maintainers/scripts/haskell/update-hackage.sh
./maintainers/scripts/haskell/regenerate-hackage-packages.sh
nix-build -A haskellPackages.foo |
Pending tasks are:
|
This should make it much easier for new contributers to contribute to `cabal2nix`, as it addresses many of the pain points from NixOS#431. The added Stack build also improves reproducibility by using a Stackage LTS and pinning a nixpkgs version.
I've tried to run hackage2nix in order to test a change I made to the yaml file in Nixpkgs. I didn't make it through. I'll summarize my experience.
git add worktree
andgit checkout --detach
instead ofgit clone nixpkgs
to speed it up. Didn't work becauseupdate-nixpkgs.sh
pulls in the nixpkgs worktree.cabal
,ghc
,zlib
andopenssl
to my shell before invokingupdate-nixpkgs.sh
Proposed solution
I think the script can be nixified. I suggest adding the following to Nixpkgs:
update-nixpkgs.sh
, limited to generationThis will let anyone regenerate the package set in a reproducible way. This also makes #219 trivial. Just mention the pin files in a comment.
Did I miss something that makes the above not work?
The text was updated successfully, but these errors were encountered: