srid / haskell-flake

A `flake-parts` Nix module for Haskell development
https://community.flake.parts/haskell-flake
MIT License
128 stars 14 forks source link

fix: apply 'patches' after 'buildFromSdist' #291

Open srid opened 3 months ago

srid commented 3 months ago

Resolves #290

roberth commented 3 months ago

That's a bit surprising. I'd only use buildFromSdist on local packages, and then it doesn't make much sense to add patches. I suppose it could happen when importing a haskell-flake module from a dependency?

I don't have an opinion on whether patches should be applied before or after sdist. When applied before, the patches can be used to fix the creation of the sdist, whereas if you apply them after the sdist, you can fix the effects of a broken sdist. I suppose the latter matches what you would do with a package from hackage, so I guess that might be a reason to prefer that.

srid commented 3 months ago

I'd only use buildFromSdist on local packages

Actually, that makes more sense.