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
init maintainers/scripts/update-hackage #62105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oftentimes, I make changes in the cabal2nix
repository that affect hackage2nix
and thus land immediately in the generated updates that my cron job pushes daily into the haskell-updates
branch, because that cron job runs with a checked-out copy of the master
branch of cabal2nix
. And oftentimes, I do not release an update to Hackage because the changes I made are important for hackage2nix
but not for cabal2nix
. Therefore it's somewhat important that people who want to run hackage2nix
themselves use the latest version from the git repo. If they are using the latest release of cabal2nix
, then the outcome might be substantially different from the one that's found in Nixpkgs master
already.
From perspective, adding this script to Nixpkgs feels like a bad idea.
How often do you make such changes to hackage2nix ? I don't say this script should necessarily be used to update upstream nixpkgs but I find it helpful to experiment a bit on a local repo as it deals with some technicalities (for instance setting --hackage does not automatically adapt the path to preferred-version in hackage2nix). I spend more time trying to regenerate the hackage packages than I did for vim/lua while the haskell tooling is the more advanced. Just the cabal2nix scripts assume too much (about paths) for simple tinkering (and are mostly silent, I've added some echo statements in my fork so that it gets easier to understand what's going on). |
Regularly. Oftentimes, parts of Nixpkgs undergo changes and/or re-factoring that require adaptaion of |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/video-tutorial-how-to-fix-broken-haskell-packages-in-nix/3968/3 |
I'd really like for this part of the nixpkgs infrastructure to be done with a known script that can reliably generate |
There are 3 scripts to update the haskell infra at https://github.com/NixOS/cabal2nix This moves the command to regenerate pkgs/development/haskell-modules/hackage-packages.nix in nixpkgs to ease the process. The user still needs to download the hackage repo and point the script at it.
the script runs fine for me. It still requires cloning git@github.com:commercialhaskell/all-cabal-hashes.git but it makes the process smoother. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-regenerate-hackage-packages-nix/6409/4 |
@teto would it make sense to clone the repo if ./all-cabal-hashes is not found? |
I dont mind working on this PR but I feel it's already useful. @rnhmjoj I am going for minimal changes for now. I hope we can adapt the pipeline so that both @peti and other users can customize their nixpkgs. |
Yes, I think so too: I was just asking since I thought that was the reason for blocking the PR. |
hoping that #86699 can succeed, I've kinda lost faith xD |
There are 3 scripts to update the haskell infra at https://github.com/NixOS/cabal2nix
This moves the command to regenerate pkgs/development/haskell-modules/hackage-packages.nix
in nixpkgs to ease the process.
The user still needs to download the hackage repo and point the script at it.
As I was dealing with haskell problems, I tried to experiment things but having the scripts in cabal2nix are too integrated for quick experiments (automatically pull repos/commit things).
I am not sure how much of these scripts should go into nixpkgs but this single script allows to tweak
pkgs/development/haskell-modules/configuration-hackage2nix.yaml and regenerate pkgs/development/haskell-modules/hackage-packages.nix which is good enough as a start
@peti
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)