summary refs log tree commit diff
path: root/pkgs/build-support/cabal
Commit message (Collapse)AuthorAge
* Merge pull request #2767 from jwiegley/hscolourPeter Simons2014-06-03
|\ | | | | Build Haddocks with source hyperlinks unless doHscolour is false
| * Build Haddocks with source hyperlinks unless doHscolour is falseJohn Wiegley2014-05-29
| |
* | Correct patch the rpath for GHC-built executables on DarwinJohn Wiegley2014-05-25
|/ | | | @peti This addresses #2488.
* Re-write the Haskell Platform out of haskell-defaults.nix.Peter Simons2014-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cabal: enable the split-objects feature again for current versions of GHCPeter Simons2014-05-07
|
* pkgs/build-support/cabal: revert "the release version of GHC 7.8.x no longer ↵Peter Simons2014-05-01
| | | | | | | | | | | | requires" This reverts commit a2a398fbda842594ab17d0b98f68dba4c51e49e8. The issue *does* still exist in GHC 7.8.2. Compiled binaries have no -rpath into their own install directory ("$out") and thus cannot find their own shared libraries. To work around this issue, we pass an explicit -rpath argument at configure time. We do that only on Linux, though, because -rpath is known to cause trouble on Darwin, which was the reason I originally reverted that patch.
* pkgs/build-support/cabal: the release version of GHC 7.8.x no longer requiresPeter Simons2014-04-18
| | | | | | the -rpath hack added in 63c60638fcc148a3f1d786216c434da723aeef3d and edaa56041ceb3185d9c104ca72c457a5e7ae6e03 to produce dynamically linked executables
* Generate hoogle databases beside HTML haddock documentation for Haskell packagesGergely Risko2014-02-04
|
* pkgs/build-support/cabal: the configure-phase warning check can bePeter Simons2013-12-29
| | | | | | | | | disabled by setting 'strictConfigurePhase' to 'false' This is necessary for some packages, like dns, because cabal warns about multiple versions of the same dependency being used, but the usage is fine, actually, so we want the build to succeed. Packages that depend on 'doctest' also have this issue <https://github.com/sol/doctest-haskell/issues/69>.
* pkgs/build-support/cabal: add 'buildTarget' attribute to allow passing flags ↵Peter Simons2013-12-29
| | | | to "./Setup build"
* pkgs/build-support/cabal: clean up the code that sets rpath for shared ↵Peter Simons2013-12-29
| | | | executables
* build-support/cabal: recognize the "this package indirectly depends onPeter Simons2013-12-29
| | | | | multiple versions of the same package" warning from Cabal and abort the build if it occurs.
* pkgs/build-support/cabal: configure a proper library rpath for dynamically ↵Peter Simons2013-12-16
| | | | linked executables
* haskell: Propagate cabal dependencies to user envBenno Fünfstück2013-12-10
| | | | | | | | Before this commit, if a haskell library X depends on Y, and X was added to systemPackages, only X would be available in the user environment. Y would not be avialable, which causes X to be broken. This commit solves the issue by setting propagatedUserEnvPkgs to all packages X depends on when X is a library.
* cabal: add support for the enableStaticLibrary flag to enable/disable ↵Peter Simons2013-12-10
| | | | | | building of static libraries Disabling static libraries is supported only in GHC 7.7 or later.
* Back-port Haskell-related improvements from stdenv-updates.Peter Simons2013-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | * There now is full support for building Haskell packages as shared libraries for GHC versions 7.4.2 or later. The Cabal builder recognizes the following attributes: - enableSharedLibraries configures Cabal to build of shared libraries in addition to static ones. This option requires that all dependencies of the package have been compiled for use in shared libraries, too. - enableSharedExecutables configures Cabal to prefer shared libraries when linking executables. The default values for these attributes are arguments to the haskellPackages expression. * Haskell builds now run in a LANG="en_US.UTF-8" environment to avoid plenty of build and test suite errors. Without this setting, GHC seems unable to deal with the UTF-8 character encoding that's generally considered standard in the Haskell world. * The Cabal builder supports a new attribute 'testTarget' to specify the exact set of tests to be run during the check phase. * The ghc-wrapper attribute ghcVersion has been removed. Instead, we use the ghc.version attribute, which exists in unwrapped GHC derivations, too.
* pkgs/build-support/cabal: disable split-objects for GHC 7.7 builds to work ↵Peter Simons2013-04-24
| | | | around broken compiler
* haskell-packages.nix: fix the implementation of 'cabalNoTest'Peter Simons2013-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation used the following tying-the-knot trickery to override 'doCheck' to false for the given build: cabalNoTest = { mkDerivation = x: rec { final = self.cabal.mkDerivation (self: (x final) // { doCheck = false; }); }.final; }; That seemed to work, but for some reason it caused trouble with some builds -- not all -- that use jailbreakCabal. The problem was the 'stdenv' attribute couldn't be evaluated properly anymore: $ nix-build ~/pkgs/top-level/release-haskell.nix -A optparseApplicative.ghc6104.x86_64-linux --show-trace error: while evaluating the attribute `drvPath' at `/nix/store/qkj5cxknwspz8ak0ganm97zfr2bhksgn-nix-1.5.2pre3082_2398417/share/nix/corepkgs/derivation.nix:19:9': while evaluating the builtin function `derivationStrict': while instantiating the derivation named `haskell-optparse-applicative-ghc6.10.4-0.5.2.1' at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:40:13': while evaluating the derivation attribute `configurePhase' at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:107:13': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/lib/strings.nix:55:26': while evaluating the attribute `outPath' at `/nix/store/qkj5cxknwspz8ak0ganm97zfr2bhksgn-nix-1.5.2pre3082_2398417/share/nix/corepkgs/derivation.nix:18:9': while evaluating the builtin function `getAttr': while evaluating the builtin function `derivationStrict': while instantiating the derivation named `jailbreak-cabal-1.1' at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:40:13': while evaluating the derivation attribute `nativeBuildInputs' at `/home/simons/.nix-defexpr/pkgs/stdenv/generic/default.nix:76:17': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/lib/lists.nix:135:21': while evaluating the attribute `buildInputs' at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:22:17': while evaluating the builtin function `filter': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:22:60': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/top-level/haskell-packages.nix:119:17': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/lib/customisation.nix:61:22': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/lib/customisation.nix:56:24': while evaluating the builtin function `isAttrs': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/development/libraries/haskell/Cabal/1.14.0.nix:1:1': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/top-level/haskell-packages.nix:113:20': while evaluating the attribute `final' at `/home/simons/.nix-defexpr/pkgs/top-level/haskell-packages.nix:114:7': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/build-support/cabal/default.nix:9:5': while evaluating the function at `/home/simons/.nix-defexpr/pkgs/stdenv/generic/default.nix:51:24': while evaluating the attribute `meta.license' at `/home/simons/.nix-defexpr/pkgs/development/libraries/haskell/Cabal/1.14.0.nix:17:5': infinite recursion encountered I tried to figure out why this happens, but eventually gave up. The new implementation passes an argument called 'enableCheckPhase' to the Cabal builder, which determines whether the user-specified doCheck value has any effect or not. Now, a normal override can be used to disable unit testing.
* pkgs/build-support/cabal: disable doCheck by default on GHC 7.0.x platformsPeter Simons2013-03-23
| | | | | Trying to run the unit tests with GHC 7.0.4 causes so many builds to fail that it's probably not worth-while.
* pkgs/build-support/cabal: enable 'doCheck' only on GHC versions 7.x or laterPeter Simons2013-03-11
| | | | | Older GHC's come with a version of Cabal that doesn't even understand the --{enable,disable}-tests command line arguments.
* pkgs/build-support/cabal: disable the split objects feature on Darwin by defaultPeter Simons2013-03-08
| | | | | | | | | According to <http://hackage.haskell.org/trac/ghc/ticket/4013>, this feature won't work with XCode versions older than 3.2. This means that Mac users will have considerably larger binaries because some build-time dependencies (such as HTTP) will be mis-detected as run-time dependencies.
* pkgs/build-support/cabal: set 'checkPhase' only if 'doCheck' is truePeter Simons2013-02-24
|
* pkgs/build-support/cabal: enable 'doCheck=true' by defaultPeter Simons2013-02-24
|
* pkgs/build-support/cabal: add 'testDepends' field to specify build-time ↵Peter Simons2013-02-24
| | | | dependencies that are required only for running the test suites
* pkgs/build-support/cabal: unify all non-user-specified configure flags in ↵Peter Simons2013-02-24
| | | | the internal 'extraConfigureFlags' variable
* Merge remote-tracking branch 'origin/master' into stdenv-updates.Peter Simons2013-02-24
|\
| * pkgs/build-support/cabal/default.nix: add support for running test suites ↵Peter Simons2013-02-22
| | | | | | | | | | | | via Cabal Set 'doCheck = true' to enable building and running of the test suite.
* | pkgs/build-support/cabal: add 'enableSplitObjs' field to enable/disable ↵Peter Simons2013-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | object splitting This patch configures all Cabal builds with '--enable-split-objs' unless the Nix expression explicitly sets "enableSplitObjs = false". The Cabal manual [1] describes this option as follows: | The GHC -split-objs reduces the final size of the executables that use the | library by allowing them to link with only the bits that they use rather | than the entire library. The downside is that building the library takes | longer and uses considerably more memory. One immediate benefit of this change is that the 'darcs' closure defined in the top-level no longer refers to GHC. The same is probably true with other executable packages. [1] http://www.haskell.org/cabal/users-guide/installing-packages.html#setup-configure
* | Merge remote-tracking branch 'eelco/master' into stdenv-updatesLluís Batlle i Rossell2012-12-28
|\| | | | | | | | | | | | | Conflicts: pkgs/development/compilers/gcc/4.7/default.nix Trivial solution.
| * add luite's mirror to cabal/hackage download expression (for when ↵Aristid Breitkreuz2012-12-15
| | | | | | | | hackage.haskell.org is down)
* | Rename buildNativeInputs -> nativeBuildInputsEelco Dolstra2012-12-28
| | | | | | | | | | Likewise for propagatedBuildNativeInputs, etc. "buildNativeInputs" sounds like an imperative rather than a noun phrase.
* | Clean up changes to the Cabal builder, which needed to be done in an awkward ↵Peter Simons2012-09-11
|/ | | | fashion to avoid a complete re-build of all Haskell packages.
* Add support for jailbreak-cabal utility to the Cabal builder.Peter Simons2012-09-10
| | | | | | | | | | Jailbreaks-cabal allows Nixpkgs maintainers to quick-fix builds of packages that over-specify their version requirements by removing the version restrictions of all dependencies from the Cabal file. Set jailbreak = true in the build expression to activate this feature.
* Moved the cabal build driver function from ↵Peter Simons2012-02-19
development/libraries/haskell/cabal to build-support/cabal. This change also resolves the "cabal" vs. "Cabal" ambiguity on file systems that don't distinguish case. svn path=/nixpkgs/trunk/; revision=32401