From b4d17f0cfa3f1154d85b8b1a179b31245af81500 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 11 Apr 2026 14:23:57 +0200 Subject: [PATCH] haskell.compiler.native-bignum: don't evaluate compiler exprs This makes isNativeBignumGhc purely textual again after #460845. Could improve performance in the right conditions, but most importantly solves eval issues with aliases allowed (due to the throw-ing ghc attributes) without resorting to tryEval. --- pkgs/top-level/haskell-packages.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index a8146c05d831..6deb331822d1 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -224,8 +224,7 @@ in native-bignum = let isNativeBignumGhc = - name: - !(builtins.elem name nativeBignumExcludes) && !(compiler.${name} ? isMhs && compiler.${name}.isMhs); + name: pkgs.lib.hasPrefix "ghc" name && !(builtins.elem name nativeBignumExcludes); nativeBignumGhcNames = pkgs.lib.filter isNativeBignumGhc (pkgs.lib.attrNames compiler); in pkgs.lib.recurseIntoAttrs (