NixOS / cabal2nix

Generate Nix build instructions from a Cabal file
https://haskell4nix.readthedocs.io
Other
355 stars 154 forks source link

How to backport a package update to a NixOS release? #498

Open roberth opened 3 years ago

roberth commented 3 years ago

Considering that haskell package updates aren't single commits but batches of multiple package updates in a single commit, what is the workflow for backporting updates?

For instance, I need to update the arion-compose package because the old release has some problems with the changes to systemd/docker in 21.05.

This could be documented in here in the cabal2nix repo (although I expected to find these docs in the Nixpkgs repo, fwiw).

maralorn commented 3 years ago

We plan to move the documentation back to nixpkgs.

I don‘t know of a very smart way to do backports. Currently we have decided to never regenerate the hackage-packages.nix file on stable. So I don‘t see a better solution than taking only the relevant diff out of the commit and creating a new commit and PR directly against release-21.05 from it. (But I have little experience with backporting and the related policies.)

Anyways collecting things to document is always good. Improving docs is on our short list.

sternenseemann commented 3 years ago

I think until we have a fancier way of doing this, overrideSrc is your best bet.

roberth commented 3 years ago

I've run cabal2nix and added an override to non-hackage-packages.nix (which normally also references separate cabal2nix generated files). Doing it this way seemed less dirty than editing the generated file. https://github.com/NixOS/nixpkgs/pull/125563