Commit Graph

176 Commits

Author SHA1 Message Date
Peter Simons
0c3cddfc52 Build cabal-install-0.14.0 with network 2.3.x on GHC 7.4.2 and below.
Fixes <https://github.com/NixOS/nixpkgs/pull/3770>.
2014-08-25 12:17:16 +02:00
Peter Simons
3d3e78c673 network-uri: build with a recent version of Cabal on GHC 6.x 2014-08-25 12:17:15 +02:00
Peter Simons
d72b7796d1 haskell-MonadRandom: add version 0.2
We cannot use it anywhere except HEAD, unfortunately, because the
package depends on transformers 0.4.x, which is a core package and
cannot be updated.
2014-08-24 20:28:12 +02:00
Peter Simons
cbc67e1704 hsyslog: build with a recent version of Cabal on GHC 6.10.4 (and don't run Haddock) 2014-08-24 20:28:12 +02:00
Peter Simons
963c45ecf8 haskell-random: update to version 1.0.1.3
Don't update the library for GHC <= 7.4.x: https://github.com/haskell/random/issues/10
2014-08-24 20:28:12 +02:00
Peter Simons
59e15fe815 Revert "Many minor fixes to get things building after recent compiler changes".
This reverts the Haskell part of commit 326ca0f690, because these changes
broke the 'scientific' build with GHC 7.4.2.
2014-08-11 14:48:35 +02:00
John Wiegley
326ca0f690 Many minor fixes to get things building after recent compiler changes 2014-08-10 23:18:57 -05:00
Peter Simons
8ede29197f GHC 7.6.x requires older attoparsec to build with aeson 0.7.x. 2014-08-09 19:48:47 +02:00
Peter Simons
0d2463a24b GHC 7.6.x required scientific 0.2.x to build aeson 0.7.x. 2014-08-09 19:16:45 +02:00
Peter Simons
d0e37eff7b GHC 7.6 and earlier cannot compile aeson 0.8.x. 2014-08-09 19:02:56 +02:00
Peter Simons
9d56d25673 haskell-vty: update to version 5.1.3 2014-07-28 20:32:59 +02:00
Peter Simons
eec522e69a haskell-nixpkgs.nix: update Cabal to version 1.20.0.2 2014-07-28 20:32:52 +02:00
Peter Simons
b06e82fe7a haskell-defaults.nix: simplify references to the latest version of happy 2014-07-14 17:33:48 +02:00
Peter Simons
48a2253974 ghc: update version 7.8.2 to 7.8.3 2014-07-12 15:13:58 +02:00
Peter Simons
81e6e97c61 haskell-vty: update to version 5.1.1 2014-07-08 15:58:21 +02:00
Peter Simons
6d068be1bf cabal-install: update to version 1.20.0.3 2014-06-30 17:03:07 +02:00
Aycan iRiCAN
8fe08c34a4 Add binary to networkTransport again. 2014-06-21 18:06:24 +03:00
Aycan iRiCAN
719d0b64e0 Removed binary argument from networkTransport and networkTransportTcp 2014-06-21 18:01:51 +03:00
Aycan iRiCAN
88050e4a41 Moved package overrides from haskell-packages.nix to haskell-defaults.nix. 2014-06-21 17:44:29 +03:00
Peter Simons
ac56e50d3a haskell-defaults.nix: ghc-HEAD requires latest mtl 2014-06-10 20:27:20 +02:00
Mateusz Kowalczyk
3287542c57 haskell-vty: add version 5.1.0 2014-06-09 10:27:00 +02:00
Peter Simons
40eb5a5f73 haskell-system-fileio: require Cabal >= 1.8 2014-06-09 10:27:00 +02:00
Peter Simons
b134e2a0fd haskell-defaults.nix: don't provide singletons on pre-7.8.x platforms 2014-06-09 10:27:00 +02:00
Peter Simons
c7a18e326f Stick to transformers 0.3.x everywhere; the new versions breaks just about every other package that we have. 2014-06-09 10:26:59 +02:00
Peter Simons
1d50ed522a haskell-system-filepath: require at least Cabal 1.8 to build 2014-06-09 10:26:59 +02:00
Peter Simons
9dd2b3c651 haskell-shelly: move version override to haskell-defaults.nix 2014-06-09 10:26:58 +02:00
Peter Simons
4f2992c3fa Switch GHC 6.10.x to network 2.2.x because newer versions give buffering errors (according to the Cabal file from HTTP, which excludes newer versions from building) 2014-06-09 10:26:58 +02:00
Peter Simons
d07125a0d9 haskell-transformers-compat: provide different versions for GHC 7.8.2 and below
transformers is a core library in GHC 7.8.2, so that compiler is stuck
with an older version of the -compat library.
2014-06-09 10:26:58 +02:00
Peter Simons
1d392a56ae Update the default version of transformers to 0.4.1 on older compilers. 2014-06-09 10:26:56 +02:00
Peter Simons
6358b15985 haskell-mtl: update to version 2.2.1 (and delete unused versions 1.1.1.1 and 2.1.3.1) 2014-06-09 10:26:56 +02:00
Peter Simons
c9672d767f haskell-Cabal: update to version 1.20.0.1 2014-06-09 10:26:56 +02:00
Peter Simons
1d70298e2e Elm: require binary 0.7.x on ghc <= 7.6.3 2014-05-28 12:48:30 +02:00
Peter Simons
ff6db963fc haskell-aeson: update to version 0.7.0.6
Keep version 0.7.0.4 for builds with ghc <= 7.4.2.
2014-05-24 12:01:19 +02:00
Peter Simons
82df69a1de haskell-zip-archive: add version 0.2.3.2
Use latest zip archive only with GHC 7.8.2 so that we don't have to
override 'binary' everywhere else.
2014-05-24 12:01:08 +02:00
Peter Simons
ecaf15c324 haskell-attoparsec: add version 0.11.3.4 2014-05-24 12:00:58 +02:00
Peter Simons
19c4909124 cabal-install: update to version 1.20.0.2 2014-05-24 10:42:07 +02:00
Peter Simons
00594510e8 haskell-defaults.nix: fix hashtables build with GHC 6.10.x 2014-05-23 21:54:28 +02:00
Peter Simons
e081cc3b44 haskell-defaults.nix: fix hashable and case-insensitive builds with GHC 6.x 2014-05-23 21:54:28 +02:00
Peter Simons
ca02d3734b haskell-defaults.nix: override case-sensitive on GHC 7.2.2 to avoid build error 2014-05-23 21:54:28 +02:00
Peter Simons
5538d68aca haskell-defaults.nix: move extensible-exceptions override into the right place 2014-05-23 21:54:27 +02:00
Peter Simons
6962c86135 haskell-defaults.nix: improve configuration for GHC 6.x 2014-05-23 21:54:27 +02:00
Peter Simons
da38198b4f Use attoparsec 0.10.x when building with GHC 6.x.
Newer versions depend on 'scientific', which this compiler cannot build.
2014-05-23 21:54:27 +02:00
Peter Simons
45799eeaba haskell-scientific: there's no point in using 0.1.0.1, because it doesn't build with GHC 6.12.x either :-( 2014-05-23 21:54:27 +02:00
Peter Simons
78618e12d3 haskell-async: fix build with GHC 6.12.x 2014-05-23 18:59:09 +02:00
Peter Simons
70d61f8517 haskell-defaults.nix: don't override 'Cabal' in GHC 6.10.4; it's a core library 2014-05-23 18:57:03 +02:00
Peter Simons
de014b4b86 haskell-split: add version 0.1.4.3 for the benefit of GHC 6.x 2014-05-23 18:56:10 +02:00
Peter Simons
3f0a45e88f haskell-codex: update to version 0.0.2 2014-05-23 17:58:48 +02:00
Peter Simons
b1b24494f2 haskell-binary: update to version 0.7.2.1 2014-05-21 16:12:06 +02:00
Peter Simons
edeffd7c49 haskell-DrIFT: add version 2.4.2 2014-05-17 12:56:52 +02:00
Peter Simons
499f49f392 binary: fix build with ghc 6.10.4 2014-05-17 12:56:51 +02:00
Peter Simons
c9887ca489 cabal-install: use native Cabal version when compiling with GHC 7.9.x 2014-05-17 12:51:17 +02:00
Peter Simons
53ecf3fe17 haskell-modular-arithmetic: require ghc >7.8 2014-05-16 18:51:38 +02:00
Peter Simons
e048994d58 haskell-defaults.nix: stick to transformers 0.3.x 2014-05-16 18:51:38 +02:00
Peter Simons
9847b8d148 haskell-mtl: update to version 2.2.0.1 2014-05-16 18:51:37 +02:00
Peter Simons
9bc73e0f1e haskell-binary: update to version 0.7.2.0 2014-05-16 18:51:37 +02:00
Peter Simons
63a69164d0 haskell-transformers: update to version 0.4.1.0 2014-05-16 18:51:37 +02:00
Peter Simons
3c656b702c haskell-defaults.nix: don't provide gloss to ghc < 7.8 2014-05-14 15:02:35 +02:00
Peter Simons
d51617e877 haskell-pipes-binary: fix build with ghc < 7.8 2014-05-14 15:02:32 +02:00
Peter Simons
5e7de2f457 haskell-ariadne: fix build with ghc < 7.8 2014-05-14 15:02:31 +02:00
Peter Simons
8fe9c64b13 haskell-binary-conduit: fix build with ghc < 7.8 2014-05-14 15:02:30 +02:00
Peter Simons
16958ffaf9 haskell-bson: fix build with ghc < 7.8 2014-05-14 15:02:30 +02:00
Peter Simons
fd0f9e6fc1 Re-write the Haskell Platform out of haskell-defaults.nix.
1) Packages formerly called haskell-haskell-platform-ghcXYZ-VVVV.X.Y.Z are
    now called haskell-platform-VVVV.X.Y.Z. The latest version can be
    installed by running "nix-env -i haskell-platform".

 2) The attributes haskellPackages_ghcXYZ.haskellPlatform no longer exist.
    Instead, we have attributes like haskellPlatformPackages."2012_4_0_0".
    (The last numeric bit must be quoted when used in a Nix file, but not on
    the command line to nix-env, nix-build, etc.) The latest Platform has a
    top-level alias called simply haskellPlatform.

 3) The haskellPackages_ghcXYZ package sets offer the latest version of every
    library that GHC x.y.z can compile. For example, if 2.7 is the latest
    version of QuickCheck and if GHC 7.0.4 can compile that version, then
    haskellPackages_ghc704.QuickCheck refers to version 2.7.

 4) All intermediate GHC releases were dropped from all-packages.nix to
    simplify our configuration. What remains is a haskellPackages_ghcXYZ set
    for the latest version of every major release branch, i.e. GHC 6.10.4,
    6.12.3, 7.0.4, 7.2.2, 7.4.2, 7.6.3, 7.8.2, and 7.9.x (HEAD snapshot).

 5) The ghcXYZPrefs functions in haskell-defaults.nix now inherit overrides
    from newer to older compilers, i.e. an override configured for GHC 7.0.4
    will automatically apply to GHC 6.12.3 and 6.10.4, too. This change has
    reduced the redundancy in those configuration functions. The downside is
    that overriding an attribute for only one particular GHC version has become
    more difficult. In practice, this case doesn't occur much, though.

 6) The 'cabal' builder has a brand-new argument called 'extension'. That
    function is "self : super : {}" by default and users can override it to
    mess with the attribute set passed to cabal.mkDerivation. An example use
    would be the definition of darcs in all-packages.nix:

    | darcs = haskellPackages.darcs.override {
    |   cabal = haskellPackages.cabal.override {
    |     extension = self : super : {
    |       isLibrary = false;
    |       configureFlags = "-f-library " + super.configureFlags or "";
    |     };
    |   };
    | };

    In this case, extension disables building the library part of the package
    to give us an executable-only version that has no dependencies on GHC or
    any other Haskell packages.

    The 'self' argument refers to the final version of the attribute set and
    'super' refers to the original attribute set.

Note that ...

 - Haskell Platform packages always provide the Haddock binary that came with
   the compiler.

 - Haskell Platform 2009.2.0.2 is broken because of build failures in cgi and
   cabal-install.

 - Haskell Platform 2010.1.0.0 is broken becasue of build failures in cgi.
2014-05-14 14:59:52 +02:00
Russell O'Connor
46ccebe413 Allow for later binding in ghcPrefs
Now that both self and super are available to prefFun, we can use self, where appropriate to access late bound versions of most
packages.

When extensions are not used, there is no difference between self and super.
2014-05-08 22:01:36 -04:00
Russell O'Connor
d4bd4650d6 Rework the knot-tying code for defining Haskell packages.
The existing knot-tying code I felt was a bit incoherent with result, finalReturn, self, refering to different various forms of the "haskellPackages" value and often
different forms in the same place.

This commit instills some object-oriented discipline to the construction of hasekllPackages using a small number of fundamental OO concepts:

* An class is a open recursive function of the form (self : fooBody) where fooBody is a set.
* An instance of a class is the fixed point of the class.
  This value is sometimes refered to as an object and the values in the resulting set are sometimes refered to as methods.
* A class, foo = self : fooBody, can be extended by an extension which is a function bar = (self : super : barBody) where barBody a set of overrides for fooBody.
  The result of a class extension is a new class whose value is self : foo self // bar self (foo self).
  The super parameter gives access to the original methods that barBody may be overriding.

This commit turns the haskell-packages value into a "class".

The knot-tying, a.k.a the object instanitation, is moved into haskells-defaults.  The "finalReturn" is no longer needed and is eliminated from the body of
haskell-packages. All the work done by prefFun is moved to haskell-defaults, so that parameter is eliminated form haskell-packages.  Notice that the old prefFun took
two pameters named "self" and "super", but both parameters got passed the same value "result".  There seems to have been some confusion in the old code.

Inside haskell-defaults, the haskell-packages class is extended twice before instantiation.  The first extension is done using prefFun argument.
The second extension is done the extension argument, which is a renamed version of extraPrefs.

This two stage approach means that extension's super gets access to the post "perfFun" object while previously the extraPrefs only had access to the pre "prefFun"
object.  Also the extension function has access to both the super (post "perfFun") object and to self, the final object.  With extraPrefs, one needed to use the
"finalReturn" of the haskell packages to get access to the final object.  Due to significant changes in semantics, I thought it best to replace extraPrefs with
extension so that people using extraPrefs know to update thier cod.

Lastly, all the Prefs functions have renamed the "self" parameter to "super".  This is because "self" was never actually a self-reference in the object oriented sense
of the word.  For example

    Cabal_1_18_1_3 = self.Cabal_1_18_1_3.override { deepseq = self.deepseq_1_3_0_2; };

doesn't actually make sense from an object oriented standpoint because, barring further method overriding, the value of Cabal_1_18_1_3 would be trying to override it's
own value which simply causes a loop exception.  Thankfully all these uses of self were really uses of super:

    Cabal_1_18_1_3 = super.Cabal_1_18_1_3.override { deepseq = super.deepseq_1_3_0_2; };

In this notation the overriden Cabal_1_18_1_3 method calls the Cabal_1_18_1_3 of the super-class, which is a well-founded notion.

Below is an example use of using "extension" parameter

{
  packageOverrides = pkgs : {
    testHaskellPackages = pkgs.haskellPackages.override {
      extension = self : super : {
        transformers_0_4_1_0 = self.cabal.mkDerivation (pkgs: {
        pname = "transformers";
        version = "0.4.1.0";
        sha256 = "0jlnz86f87jndv4sifg1zpv5b2g2cxy1x2575x727az6vyaarwwg";
        meta = {
          description = "Concrete functor and monad transformers";
          license = pkgs.stdenv.lib.licenses.bsd3;
          platforms = pkgs.ghc.meta.platforms;
          maintainers = [ pkgs.stdenv.lib.maintainers.andres ];
        };
       });

      transformers = self.transformers_0_4_1_0;

      lensFamilyCore = super.lensFamilyCore.override { transformers = self.transformers_0_3_0_0; };
     };
   };
 };
}

Notice the use of self in the body of the override of the transformers method which references the newly defined transformers_0_4_1_0 method.

With the previous code, one would have to instead akwardly write

      transformers = super.finalReturn.transformers_0_4_1_0;

or use a rec clause, which would prevent futher overriding of transformers_0_4_1_0.
2014-05-08 12:01:45 -04:00
Peter Simons
b8bb480212 cabal-install: fix build of 1.20.0.1 with GHC 7.2.2 2014-05-07 19:13:06 +02:00
Peter Simons
437ed5aae4 haskell-defaults.nix: fix the "highPrio" variant of the haskell package set
"High priority" is not the same the thing as "not explicitly marked as
low priority".
2014-05-07 17:04:23 +02:00
Peter Simons
f69be7d8af haskell-defaults.nix: let ghc 7.8.2 builds use the binary library shipped with the compiler 2014-05-05 22:34:58 +02:00
Peter Simons
d56bbd6364 haskell-defaults.nix: let ghc-7.8.2 use the HEAD prefs for the time being
The whole notion of per-compiler HP-compliant environments has failed
anyway and I'll try to get rid of that ASAP, so it feels pointless to
configure that stuff for GHC 7.8.2 to begin with.
2014-05-05 22:25:19 +02:00
Peter Simons
a306b28baa haskell-defaults: prefer cabal-install 1.20.x on ghc-head 2014-05-04 21:19:11 +02:00
Peter Simons
eca445a408 Bootstrap ghc-head with GHC 7.6.3 to see if that solves our weird compiler errors:
compiler/simplCore/CoreMonad.lhs:835:10:
      Non type-variable argument in the constraint: MonadPlus IO
      (Use -XFlexibleContexts to permit this)
      In the context: (MonadPlus IO)
      While checking an instance declaration
      In the instance declaration for `A.Alternative CoreM'

  compiler/simplCore/CoreMonad.lhs:841:10:
      Non type-variable argument in the constraint: MonadPlus IO
      (Use -XFlexibleContexts to permit this)
      In the context: (MonadPlus IO)
      While checking an instance declaration
      In the instance declaration for `MonadPlus CoreM'
2014-05-03 20:03:30 +02:00
Peter Simons
4604d52df4 GHC version 7.8.1 has been deprecated because of a serious bug.
We'll have version 7.8.2 out soon.

http://www.haskell.org/pipermail/ghc-devs/2014-April/004605.html
http://www.haskell.org/pipermail/ghc-devs/2014-April/004616.html
2014-04-11 22:33:11 +02:00
Peter Simons
6754d75188 haskell-defaults.nix: update reference to cabal-install 1.18.0.2 2014-03-13 11:45:05 +01:00
Andres Loeh
b2b4e46198 Add GHC-7.8.1-rc2. 2014-03-11 20:14:24 +01:00
Peter Simons
3e6ef50ecd cabal-install: update to version 1.18.0.3 2014-03-08 11:27:29 +01:00
Peter Simons
f5b3367e92 haskell-Cabal: update to version 1.18.1.3 2014-03-07 22:54:13 +01:00
Peter Simons
3be24ab54a haskell-terminfo: update to version 0.4.0.0 2014-01-15 16:38:18 +01:00
Peter Simons
878cae46fd haskell-haskeline: update to version 0.7.1.2 2014-01-15 16:38:18 +01:00
Peter Simons
8da218c34e haskell-defaults.nix: fix quickcheck-io build with GHC 7.2.2 2013-12-29 14:12:57 +01:00
Peter Simons
da71287281 haskell-defaults.nix: use the old version of pretty-show with ghc 7.2.2
The old compiler cannot build Happy 1.19.2.
2013-12-29 13:18:22 +01:00
Peter Simons
b06f53900d haskell-defaults.nix: ensure that hspec-expectations uses the same version of HUnit as quickcheck-io 2013-12-29 13:18:22 +01:00
Peter Simons
7e51f66bea Fix GHC 7.2.2 build of Haskell Platform 2012.2.0.0. 2013-12-29 12:26:07 +01:00
Peter Simons
9f37ace519 haskell-bmp: don't use the latest version because it requires binary >= 0.6; a version that no released compiler has yet 2013-12-29 12:26:06 +01:00
Peter Simons
634e636792 haskell-defaults.nix: fix evaluation of the ghc 7.2.2 package set 2013-12-29 12:26:06 +01:00
Peter Simons
7e94212b0d haskell: don't provide 'binary' default, instead we override that
attribute in the compiler-specific package set

binary has become a core package in ghc 7.4.2, so we cannot easily build
stuff with our own version of it. (Least not without Cabal warning about
version conflicts in the build log.)
2013-12-29 12:26:05 +01:00
Peter Simons
6ea52bf49a haskell-defaults.nix: cabal2nix now requires Cabal 1.16.x or later 2013-12-29 12:26:05 +01:00
Peter Simons
736ff4ae2a haskell-quickcheck-io: override versions of HUnit and QuickCheck on older versions of Haskell Platform 2013-12-15 22:37:42 +01:00
Peter Simons
46e1f71e2d haskell-defaults.nix: ghc-head builds 'cabal-install' using its internal version of Cabal, which is newer or equal to the latest release 2013-12-06 12:02:24 +01:00
Peter Simons
dc662dcaa2 ghc-head: update to today's git snapshot and arbitrarily dub it version 7.7.20131202 2013-12-03 22:23:20 +01:00
Peter Simons
ad2d8fdfb9 Don't override deepseq globally in Cabal 1.18.x.
Deepseq is a core package, and building Cabal with a version that differs from
the one shipped with GHC is probably not a good idea.

For GHC 7.0.x, however, we must override deepseq, because the library just
won't build otherwise.
2013-11-11 14:39:58 +01:00
Peter Simons
5a1e9a9cf2 haskell-binary: re-add version 0.6.0.0 for the benefit of GHC 6.10.4 2013-06-15 13:18:51 +02:00
Peter Simons
12c9251a3d haskell-defaults.nix: add overrides to fix the latest cabal-install build with older GHC versions 2013-06-15 12:12:08 +02:00
Peter Simons
0dfe09b6c9 haskell-bmp: update to version 1.2.5.1
GHC versions prior to 7.6.x cannot compile this version, so override the 'bmp'
attribute for those compilers to version 1.2.2.1 in haskell-defaults.nix.
2013-06-05 12:17:35 +02:00
Peter Simons
fb45ff9994 haskell-binary: prefer the version from Hackage over that shipped with GHC
The binary package shipped with GHC is ancient, and some software (like
statistics and criterion) doesn't compile with it.
2013-05-30 12:33:43 +02:00
Peter Simons
f47d100de7 Switch GHC 7.6.x to Haskell Platform 2013.2.0.0. 2013-05-12 16:13:10 +02:00
Peter Simons
fdf1d45a38 ghc: add version 7.6.3 (and a corresponding package set) 2013-04-21 20:10:27 +02:00
Peter Simons
916aa90491 haskell-pretty-show: add old version 1.2, which still builds fine with GHC 7.0.4 2013-04-20 20:16:27 +02:00
Peter Simons
6692fbd0ae haskell-defaults.nix: remove useless for cabal2nix on GHC 6.10.4
We cannot build 'tar' on that platform, which is a dependency of cabal2nix.
2013-03-30 00:12:36 +01:00
Peter Simons
edfcb485a8 jailbreak-cabal: build jailbreak-cabal with a version of Cabal that has its unit tests disabled
Cabal's unit test suite depends on testFrameworkQuickcheck2, which
depends on jailbreakCabal, which depends on Cabal: *BOOM*
2013-03-09 13:04:19 +01:00
Peter Simons
63cd00856e haskell-defaults.nix: don't pass inconsistent Cabal versions to cabal2nix 2013-03-09 13:04:19 +01:00
Peter Simons
3704855f78 pkgs/top-level/haskell-defaults.nix: cosmetic 2013-03-09 13:04:19 +01:00