[Nix-dev] [Nix-Dev] Problem building Haskell-lts2.21 (ghc784)
Sergey Mironov
grrwlf at gmail.com
Tue Oct 11 14:03:49 CEST 2016
Hi. I have a problem while building Haskell packages for ghc-7.8.4.
I am using the following expression:
{ config, pkgs, ... } :
let mypkgs = a : with a ; [
cabal-install
alex
happy
parsec
optparse-applicative
hasktags];
in
{
nixpkgs.config = {
packageOverrides = pkgs: {
haskell-lts221 = (pkgs.haskell.packages.lts-2_21.override {
overrides = config.haskellPackageOverrides or (self: super: {});
}).ghcWithPackages mypkgs;
}
}
lts-2.21 eventually points out to expression declared in
`configuration-ghc-7.8.x.nix`. The error is as follows:
[1 of 1] Compiling Main ( Setup.hs,
/tmp/nix-build-hackage-security-0.5.2.2.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose
--prefix=/nix/store/677fi9nsc7kspqfilhqz029i75pg9lr5-hackage-security-0.5.2.2
--libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc
--package-db=/tmp/nix-build-hackage-security-0.5.2.2.drv-0/package.conf.d
--ghc-option=-optl=-Wl,-rpath=/nix/store/677fi9nsc7kspqfilhqz029i75pg9lr5-hackage-security-0.5.2.2/lib/ghc-7.8.4/hackage-security-0.5.2.2
--enable-split-objs --disable-library-profiling
--disable-executable-profiling --enable-shared
--enable-library-vanilla --enable-executable-dynamic --enable-tests
Configuring hackage-security-0.5.2.2...
Warning: The flag --disable-executable-profiling is deprecated. Please use
--disable-profiling instead.
Setup: Encountered missing dependencies:
mtl ==2.2.*, transformers >=0.4 && <0.6
builder for ‘/nix/store/yv2zdwniyypc2fdqmmcfgqq02wqcgwkd-hackage-security-0.5.2.2.drv’
failed with exit code 1
I checked versions, and it is true: all versions of hackage-security
depends on mtl-2.2.*. I've tried to change this dependency to plain
`mtl` by patching the sources, but it didn't help: looks like
hackage-security really does depend on mtl 2.2 and issue compiler
errors on older versions. So my decision was to force NIx use older
version of hackage-security itself. I think I can just modify
haskell-packages.nix but there is /*DO NOT EDIT*/ header, so my
question is: what is correct way of adding specific versions of
Haskell packages? Why do we have both, say, 'transformers' and
'transformers_0_3_1' but only one (latest) version of many other
pacakges, including hackage-security?
Regards,
Sergey
More information about the nix-dev
mailing list