Patching packages sets can be made easier through the use of the patch-forest-to-nix-overlay tool.
Given a forest of patches of the form
.
├── bifunctors
│ └── 01.patch
└── hashable
└── 01.patch
Then patch-forest-to-nix-overlay
can generate an nix overlay file that looks like:
{ haskellLib, ... }:
with haskellLib;
final: prev: {
bifunctors = overrideCabal
(_:
{
patches = [
./patches/bifunctors/01.patch
];
})
prev.bifunctors;
hashable = overrideCabal
(_:
{
patches = [
./patches/hashable/01.patch
];
})
prev.hashable;
}
You can then apply this as an extension to a haskell package set in the usual way, and only worry about organising the patches on the filesystem.