0

I can find haskell packages via nix-env:

nix-enf -f "<nixpkgs>" -qaP -A haskellPackages
...

yet when I try and install them using environment.systemPackages in /etc/nixos/configuration.nix:

environment.systemPackages = with pkgs; [
  haskellPackages.haskellPlatform
];

I get the error:

error: attribute 'haskellPlatform' missing, at /etc/nixos/configuration.nix:54:5

Any ideas? I am intending on using xmonad and want to do haskell dev'.

Alex
  • 8,093
  • 6
  • 49
  • 79

1 Answers1

1

haskellPlatform has been removed with the update to GHC 7.8.2, see the mailing list thread for more details.

You should be able to install any package found via nix-enf -f "<nixpkgs>" -qaP -A haskellPackages to environment.systemPackages.

Searching for haskellPackages.haskellPlatform with nix-env should result in the same kind of error that you get during the rebuild:

nix-env -f "<nixpkgs>" -qaP -A haskellPackages.haskellPlatform
error: attribute ‘haskellPlatform’ in selection path ‘haskellPackages.haskellPlatform’ not found

Any valid haskell package can be installed in the environment, for example xmobar:

environment.systemPackages = with pkgs; [
  haskellPackages.xmobar
];
Eric
  • 2,784
  • 1
  • 20
  • 25
  • Seems you're right. Having removed `haskellPlatform` I still got `xmonadContrib` and `xmonadExtras` errors. Do they exist still in a different form? Removing those lets me install `xmonad` at least -- should I just install stack instead of `haskellPlatform`? – Alex Jul 06 '16 at 12:49
  • 1
    @atc `xmonad-contrib`, `xmonad-extras`. – kosmikus Jul 06 '16 at 20:45