cabal2nix icon indicating copy to clipboard operation
cabal2nix copied to clipboard

How to backport a package update to a NixOS release?

Open roberth opened this issue 3 years ago • 3 comments

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).

roberth avatar Jun 02 '21 16:06 roberth

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.

maralorn avatar Jun 02 '21 17:06 maralorn

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

sternenseemann avatar Jun 02 '21 23:06 sternenseemann

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

roberth avatar Jun 03 '21 20:06 roberth