haskellPackages.mkDerivation: convert any/all cabal files to unix nls

In general, `pname` SHOULD be the same as the Cabal package name in
Haskell updates, but things work fine without this in many cases (e.g.
when only building executables), so we need to preserve this.

Since Cabal only allows a single .cabal file per directory, we can just
process *.cabal.
This commit is contained in:
sternenseemann
2025-09-28 16:26:23 +02:00
parent 28a47a0506
commit 621a3a56eb
@@ -607,7 +607,7 @@ lib.fix (
cp ${newCabalFile} ${pname}.cabal
''
+ lib.optionalString (!dontConvertCabalFileToUnix) ''
sed -i '${pname}.cabal' -e 's/\r$//'
sed -i -e 's/\r$//' *.cabal
''
+ prePatch;