haskell.packages.ghc9102.servant-client: fix for text >= 2.1.2

The issue presents itself in README.lhs which normally is a symlink to
README.md. Upstream has a patch fixing the issue, but we need to
additionally deal with the fact that the Hackage tarball doesn't
preserve the symlink, of course.
This commit is contained in:
sternenseemann 2025-06-06 01:38:20 +02:00
parent a45fdcd4a7
commit 4081597cf1

View file

@ -1518,6 +1518,31 @@ with haskellLib;
})
] super.servant-routes;
# Fix test suite with text >= 2.1.2
servant-client =
appendPatches
[
(pkgs.fetchpatch {
name = "servant-client-text-2.1.2.patch";
url = "https://github.com/haskell-servant/servant/commit/9cda0cfb356a01ad402ee949e0b0d5c0494eace2.patch";
sha256 = "19vpn7h108wra9b84r642zxg0mii66rq4vjbqhi7ackkdb0mx9yn";
relative = "servant-client";
# patch to servant-client.cabal doesn't apply on 0.20.2
includes = [ "README.md" ];
})
]
(
overrideCabal (drv: {
postPatch =
super.postPatch or ""
+ ''
# Restore the symlink (to the file we patch) which becomes a regular file
# in the hackage tarball
ln -sf README.md README.lhs
'';
}) super.servant-client
);
# it wants to build a statically linked binary by default
hledger-flow = overrideCabal (drv: {
postPatch =