haskellPackages.network: fix crash when running inside Wine

Fixes error:
  Network.Socket.setSockOpt:failed(Badprotocoloption(WSAENOPROTOOPT))
This commit is contained in:
Alexandre Esteves
2026-02-10 12:45:25 +00:00
parent d0a1b36cea
commit 2accbad122
@@ -8,11 +8,16 @@ with haskellLib;
(self: super: {
# cabal2nix doesn't properly add dependencies conditional on os(windows)
network =
if pkgs.stdenv.hostPlatform.isWindows then
addBuildDepends [ self.temporary ] super.network
else
super.network;
network = lib.pipe super.network [
(addBuildDepends [ self.temporary ])
# https://github.com/haskell/network/pull/605
(appendPatch (fetchpatch {
name = "dont-frag-wine.patch";
url = "https://github.com/haskell/network/commit/ecd94408696117d34d4c13031c30d18033504827.patch";
sha256 = "sha256-8LtAkBmgMMMIW6gPYDVuwYck/4fcOf08Hp2zLmsRW2w=";
}))
];
# Workaround for
# Mingw-w64 runtime failure: