[Nix-dev] How to set a specific GHC version?

Hilco Wijbenga hilco.wijbenga at gmail.com
Mon Aug 10 00:40:35 CEST 2015


On 9 August 2015 at 07:13, Peter Simons <simons at cryp.to> wrote:
> Hi Hilco,
>
>  > 1) GHC 7.6.3 fails to compile;
>
> GHC 7.6.3 compiles just fine on hydra.nixos.org. Could you please share
> the error message you get along with some details about which version of
> Nixpkgs use and on what platform?

By adding packages one by one I found out that it's actually
classy-prelude that is causing the issue. Without it, I get no errors.

The penultimate line below initially led me to believe GHC 7.6.3 was
the one with the problem.

hilco at troll ~/haskell/7.6.3$ nix-shell
these derivations will be built:
  /nix/store/7l592vc38b1l2i1vd701w4ww8xg9dizq-haskell-mutable-containers-0.3.0.drv
  /nix/store/94nnvqybd9swn144j2vgx4s3k5miavf0-haskell-classy-prelude-0.12.1.1.drv
  /nix/store/9qrm2c8ksc54kng6ygkjy3r11blq5b72-ghc-7.6.3.drv
building path(s)
‘/nix/store/4211giprgjiwxmi4gnqz1crv2rsrc8ds-haskell-mutable-containers-0.3.0’
setupCompilerEnvironmentPhase
Build with /nix/store/iy5vvq9z9sp1whm3cc78ic1mrl4dqr92-ghc-7.6.3.
unpacking sources
unpacking source archive
/nix/store/a1064063m3mpx00n6ka8s9fk5zq618m5-mutable-containers-0.3.0.tar.gz
source root is mutable-containers-0.3.0
patching sources
compileBuildDriverPhase
setupCompileFlags:
-package-db=/tmp/nix-build-haskell-mutable-containers-0.3.0.drv-0/package.conf.d
[1 of 1] Compiling Main             ( Setup.hs,
/tmp/nix-build-haskell-mutable-containers-0.3.0.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose
--prefix=/nix/store/4211giprgjiwxmi4gnqz1crv2rsrc8ds-haskell-mutable-containers-0.3.0
--libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc
--package-db=/tmp/nix-build-haskell-mutable-containers-0.3.0.drv-0/package.conf.d
--enable-split-objs --disable-library-profiling --disable-shared
--enable-library-vanilla --disable-executable-dynamic --enable-tests
Configuring mutable-containers-0.3.0...
Setup: At least the following dependencies are missing:
base >=4.7 && <5
builder for ‘/nix/store/7l592vc38b1l2i1vd701w4ww8xg9dizq-haskell-mutable-containers-0.3.0.drv’
failed with exit code 1
cannot build derivation
‘/nix/store/9qrm2c8ksc54kng6ygkjy3r11blq5b72-ghc-7.6.3.drv’: 1
dependencies couldn't be built
error: build of
‘/nix/store/9qrm2c8ksc54kng6ygkjy3r11blq5b72-ghc-7.6.3.drv’ failed
/home/hilco/.nix-profile/bin/nix-shell: failed to build all dependencies

>  > 2) Now I'm not using haskellngPackages. And we're supposed to migrate
>  > to that, right?
>
> The name haskellngPackages is obsolete since April 19th. If you're
> following the unstable channel, then haskellPackages *is* Haskell NG:
>
>   https://github.com/NixOS/nixpkgs/blob/c0c82ea2ebbcf0632260a931cf832cac1c8a014e/pkgs/top-level/all-packages.nix#L14429-14430
>
> As of now, the pre-NG Haskell infrastructure exists only in release-14.x
> branches.

Okay, I guess that simplifies things. :-) Thanks!


More information about the nix-dev mailing list