Upgrade to 21.05 broke xmonad, home-manager

I use the xsession.windowManager.xmonad from home-manager, after trying to upgrade to release-21.05 the entire haskellPackage system seems to be broken,

My config module looks like

  xsession.windowManager.xmonad = {
    enable = true;
    enableContribAndExtras = true;
    extraPackages = self: [ self.taffybar ];
    config = pkgs.writeText "xmonad.hs" (builtins.readFile ../../../common-data/xmonad.hs);
  };

and it seems to break ghc-pkg, I am not sure what is happening here :frowning:

/nix/store/rgdgphqnadyd9kzmm3h8nyc8viqv6cas-distributive-0.6.2.1/nix-support:
propagated-build-inputs: /nix/store/bw0j149qj7b8ks187rhxl4anf8djvr6w-xmonad-0.15/nix-support/propagated-build-inputs
ghc-pkg: "the input" (line 1, column 1):
unexpected character in input '\NUL'
expecting field or section name

/nix/store/a73fq17vh301l0i9iv4p46868phwk6jx-comonad-5.0.8/nix-support:
propagated-build-inputs: /nix/store/bw0j149qj7b8ks187rhxl4anf8djvr6w-xmonad-0.15/nix-support/propagated-build-inputs
builder for '/nix/store/w2cm5g505ip8wy7iisfsx58g467zvs3k-ghc-8.10.4-with-packages.drv' failed with exit code 1
cannot build derivation '/nix/store/a6y8vvpd1hv56bi3wkzh5x596qshdxzr-xmonad-with-packages-8.10.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/w9c6frdkqblvs9xfz1dq5v9pvgfvf3xr-home-manager-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/cf46r54p926k5hwvllvhr3xnzllmys2m-xmonad-compile.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/347wbvdz0xw1yp1k8pvkslcg7gil4jz2-home-manager-generation.drv': 1 dependencies couldn't be built
error: build of '/nix/store/347wbvdz0xw1yp1k8pvkslcg7gil4jz2-home-manager-generation.drv' failed

There are 164 unread and relevant news items.
Read them by running the command 'home-manager news'.

full log is here: home-manager.log ยท GitHub

So this is on nixos, system already upgraded to 21.05

$ nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz

$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-21.05
unstable https://nixos.org/channels/nixos-unstable

I managed to solve it buy pinning all haskell package to unstable, looks like home-manager does not work with haskell packages from release-21.05? (ok, I am still not sure or know exactly why)

now I have,

let
   unstable = import <unstable> {};
in
  xsession.enable = true;
  xsession.windowManager.xmonad = {
    enable = true;
    enableContribAndExtras = true;
    haskellPackages = unstable.haskellPackages;
    extraPackages = self: [ self.taffybar ];
    config = pkgs.writeText "xmonad.hs" (builtins.readFile ../../../common-data/xmonad.hs);
  };