From cba7eafc011616e072774b26905b8f31bb5046b6 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 2 Jan 2024 20:39:23 +0000 Subject: [PATCH] haskell.compiler.ghcjs: expose `llvmPackages` attribute via passthru Files like `pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix` assume `ghc` always has an `llvmPackages` attribue. Let's expose `null` value from `ghcjs` to allow it's propagation. This fixes package evaluation for `ghcjs` packages. --- pkgs/development/compilers/ghcjs/8.10/default.nix | 1 + .../haskell-modules/configuration-ghc-8.10.x.nix | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghcjs/8.10/default.nix b/pkgs/development/compilers/ghcjs/8.10/default.nix index 78d757efee3c..4363dc32c21e 100644 --- a/pkgs/development/compilers/ghcjs/8.10/default.nix +++ b/pkgs/development/compilers/ghcjs/8.10/default.nix @@ -47,6 +47,7 @@ let inherit (bootGhcjs) version; isGhcjs = true; + llvmPackages = null; enableShared = true; socket-io = pkgsHostHost.nodePackages."socket.io"; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index 481db0d258fb..c335fdaacbcf 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -8,7 +8,11 @@ in self: super: { - llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; + # ghcjs does not use `llvmPackages` and exposes `null` attribute. + llvmPackages = + if self.ghc.llvmPackages != null + then pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages + else null; # Disable GHC 8.10.x core libraries. array = null;