From e176f25e6c0dae778e3f52ee7ba3f18759071d16 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 15 Feb 2026 18:13:04 +0100 Subject: [PATCH] haskell.compiler.ghc9123: apply patch for incorrect subword division MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a simple revert, so easy to apply. Unfortunately, it seems like it'll be some time until 9.12.4 is released… Debian and Fedora seem to have opted for patching this issue, too. --- pkgs/development/compilers/ghc/common-hadrian.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 669e4841618a..a9ed3e75e7ea 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -291,6 +291,14 @@ hash = "sha256-Vr5wkiSE1S5e+cJ8pWUvG9KFpxtmvQ8wAy08ElGNp5E="; }) ] + # Fix subword division regression in 9.12.3 https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15264 + ++ lib.optionals (version == "9.12.3") [ + (fetchpatch { + name = "ghc-9.12.3-fix-subword-division.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/65370007e2d9f1976fbcfbb514917fb111117148.patch"; + hash = "sha256-GMnD0StBTRynl2Lels1L0u1bo7HscLGPUAv+rTJ98QQ="; + }) + ] # Fixes stack overrun in rts which crashes an process whenever # freeHaskellFunPtr is called with nixpkgs' hardening flags. # https://gitlab.haskell.org/ghc/ghc/-/issues/25485 krank:ignore-line