Merge pull request #153536 from NixOS/haskell-updates
haskellPackages: update stackage and hackage
This commit is contained in:
commit
14921f050a
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"commit": "f1cca49c3c22107b73ce7156ebc7735d7d8d250e",
|
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/f1cca49c3c22107b73ce7156ebc7735d7d8d250e.tar.gz",
|
||||
"sha256": "0bcfynix3y0w5fhrij241l6sbndfr5h20pnxwqb9sf4h2ag0zlsa",
|
||||
"msg": "Update from Hackage at 2021-12-28T00:33:48Z"
|
||||
"commit": "52e5aa39956d0d5a8158320897630fed86ec2ed3",
|
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/52e5aa39956d0d5a8158320897630fed86ec2ed3.tar.gz",
|
||||
"sha256": "1yx7v3hscyp1jar0kfsc5pmj8i552j5milqzsair67cl8jf37vwz",
|
||||
"msg": "Update from Hackage at 2022-01-05T00:50:25Z"
|
||||
}
|
||||
|
|
|
@ -41,11 +41,6 @@ self: super: {
|
|||
ghcjs-base = null;
|
||||
ghcjs-prim = null;
|
||||
|
||||
# enable using a local hoogle with extra packagages in the database
|
||||
# nix-shell -p "haskellPackages.hoogleLocal { packages = with haskellPackages; [ mtl lens ]; }"
|
||||
# $ hoogle server
|
||||
hoogleLocal = { packages ? [] }: self.callPackage ./hoogle.nix { inherit packages; };
|
||||
|
||||
# Needs older QuickCheck version
|
||||
attoparsec-varword = dontCheck super.attoparsec-varword;
|
||||
|
||||
|
@ -82,7 +77,7 @@ self: super: {
|
|||
name = "git-annex-${super.git-annex.version}-src";
|
||||
url = "git://git-annex.branchable.com/";
|
||||
rev = "refs/tags/" + super.git-annex.version;
|
||||
sha256 = "1x2d0gfqxxfygzigm34n0spaxh8bwipxs9317f6c5lkpj916p957";
|
||||
sha256 = "14zzs4j9dpc6rdnna80m0vi7s1awlz0mrmwfh8l4zvglx75avpw5";
|
||||
# delete android and Android directories which cause issues on
|
||||
# darwin (case insensitive directory). Since we don't need them
|
||||
# during the build process, we can delete it to prevent a hash
|
||||
|
@ -2010,7 +2005,7 @@ self: super: {
|
|||
ghcup = doJailbreak (super.ghcup.overrideScope (self: super: {
|
||||
hspec-golden-aeson = self.hspec-golden-aeson_0_9_0_0;
|
||||
optics = self.optics_0_4;
|
||||
streamly = self.streamly_0_8_1_1;
|
||||
streamly = doJailbreak self.streamly_0_8_1_1;
|
||||
Cabal = self.Cabal_3_6_2_0;
|
||||
libyaml-streamly = markUnbroken super.libyaml-streamly;
|
||||
}));
|
||||
|
@ -2241,6 +2236,10 @@ self: super: {
|
|||
sdp4unordered = disableLibraryProfiling super.sdp4unordered;
|
||||
sdp4vector = disableLibraryProfiling super.sdp4vector;
|
||||
|
||||
# Test suite fails to compile
|
||||
# https://github.com/kuribas/mfsolve/issues/8
|
||||
mfsolve = dontCheck super.mfsolve;
|
||||
|
||||
hie-bios = appendPatches [
|
||||
# Accounts for a breaking change in GHC 9.0.2 via CPP
|
||||
(pkgs.fetchpatch {
|
||||
|
|
|
@ -117,7 +117,7 @@ self: super: {
|
|||
retry = dontCheck super.retry;
|
||||
|
||||
# Hlint needs >= 3.3.4 for ghc 9 support.
|
||||
hlint = doDistribute super.hlint_3_3_5;
|
||||
hlint = doDistribute super.hlint_3_3_6;
|
||||
|
||||
# 2021-09-18: ghc-api-compat and ghc-lib-* need >= 9.0.x versions for hls and hlint
|
||||
ghc-api-compat = doDistribute super.ghc-api-compat_9_0_1;
|
||||
|
@ -147,7 +147,7 @@ self: super: {
|
|||
# https://github.com/lspitzner/butcher/issues/7
|
||||
butcher = doJailbreak super.butcher;
|
||||
# Fixes a bug triggered on GHC 9.0.1
|
||||
text-short = self.text-short_0_1_4;
|
||||
text-short = self.text-short_0_1_5;
|
||||
|
||||
# 2021-09-18: The following plugins don‘t work yet on ghc9.
|
||||
haskell-language-server = appendConfigureFlags [
|
||||
|
|
|
@ -221,7 +221,7 @@ self: super: {
|
|||
semigroupoids = overrideCabal (drv: { postPatch = "sed -i -e 's,hashable >= 1.2.7.0 && < 1.4,hashable >= 1.2.7.0 \\&\\& < 1.5,' semigroupoids.cabal";}) super.semigroupoids;
|
||||
|
||||
# Tests have a circular dependency on quickcheck-instances
|
||||
text-short = dontCheck super.text-short_0_1_4;
|
||||
text-short = dontCheck super.text-short_0_1_5;
|
||||
|
||||
# Use hlint from git for GHC 9.2.1 support
|
||||
hlint = doDistribute (
|
||||
|
@ -233,7 +233,7 @@ self: super: {
|
|||
rev = "77a9702e10b772a7695c08682cd4f450fd0e9e46";
|
||||
sha256 = "0hpp3iw7m7w2abr8vb86gdz3x6c8lj119zxln933k90ia7bmk8jc";
|
||||
};
|
||||
} (super.hlint_3_3_5.overrideScope (self: super: {
|
||||
} (super.hlint_3_3_6.overrideScope (self: super: {
|
||||
ghc-lib-parser = self.ghc-lib-parser_9_2_1_20211101;
|
||||
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_1;
|
||||
}))
|
||||
|
|
|
@ -1783,6 +1783,7 @@ broken-packages:
|
|||
- graph-rewriting
|
||||
- graph-serialize
|
||||
- graphted
|
||||
- graph-trace-dot
|
||||
- graphula-core
|
||||
- graph-utils
|
||||
- graql
|
||||
|
@ -1801,6 +1802,7 @@ broken-packages:
|
|||
- gross
|
||||
- GroteTrap
|
||||
- groundhog-converters
|
||||
- groundhog-inspector
|
||||
- groundhog-mysql
|
||||
- grouped-list
|
||||
- group-theory
|
||||
|
@ -4081,6 +4083,7 @@ broken-packages:
|
|||
- refined-http-api-data
|
||||
- reflection-extras
|
||||
- reflex-basic-host
|
||||
- reflex-dom-ace
|
||||
- reflex-dom-contrib
|
||||
- reflex-dom-helper
|
||||
- reflex-dom-helpers
|
||||
|
@ -4108,6 +4111,7 @@ broken-packages:
|
|||
- regex-posix-unittest
|
||||
- regexpr-symbolic
|
||||
- regexqq
|
||||
- regex-rure
|
||||
- regex-tdfa-pipes
|
||||
- regex-tdfa-quasiquoter
|
||||
- regex-tdfa-rc
|
||||
|
|
|
@ -130,6 +130,9 @@ default-package-overrides:
|
|||
- polysemy-resume < 0.1.0.2
|
||||
- polysemy-conc < 0.5
|
||||
- polysemy-mocks < 0.2
|
||||
# Pinning patch because it is mainly used by the reflex-frp ecosystem which is not yet compatible with it.
|
||||
# https://github.com/reflex-frp/reflex-dom/issues/431
|
||||
- patch < 0.0.5.0
|
||||
|
||||
extra-packages:
|
||||
- base16-bytestring < 1 # required for cabal-install etc.
|
||||
|
@ -165,6 +168,10 @@ extra-packages:
|
|||
- brick == 0.64.* # 2021-12-03: matterhorn depends on brick < 0.65
|
||||
- path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2
|
||||
- ormolu == 0.3.* # 2021-12-03: for HLS with GHC 9.0.2
|
||||
# 2022-01-08 hls-plugin-api 1.2.0.2 needs lsp < 1.3, but newer than stackage
|
||||
- lsp < 1.3
|
||||
- lsp-types < 1.4
|
||||
- lsp-test < 0.14.0.2
|
||||
|
||||
package-maintainers:
|
||||
abbradar:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Stackage LTS 18.20
|
||||
# Stackage LTS 18.21
|
||||
# This file is auto-generated by
|
||||
# maintainers/scripts/haskell/update-stackage.sh
|
||||
default-package-overrides:
|
||||
|
@ -154,7 +154,7 @@ default-package-overrides:
|
|||
- appar ==0.1.8
|
||||
- appendmap ==0.1.5
|
||||
- apply-refact ==0.9.3.0
|
||||
- apportionment ==0.0.0.3
|
||||
- apportionment ==0.0.0.4
|
||||
- approximate ==0.3.5
|
||||
- approximate-equality ==1.1.0.2
|
||||
- app-settings ==0.2.0.12
|
||||
|
@ -207,7 +207,7 @@ default-package-overrides:
|
|||
- backtracking ==0.1.0
|
||||
- bank-holidays-england ==0.2.0.6
|
||||
- barbies ==2.0.3.0
|
||||
- base16 ==0.3.0.2
|
||||
- base16 ==0.3.1.0
|
||||
- base16-bytestring ==1.0.2.0
|
||||
- base16-lens ==0.1.3.2
|
||||
- base32 ==0.2.1.0
|
||||
|
@ -338,7 +338,7 @@ default-package-overrides:
|
|||
- cabal-plan ==0.7.2.0
|
||||
- cabal-rpm ==2.0.10
|
||||
- cache ==0.1.3.0
|
||||
- cached-json-file ==0.1.0
|
||||
- cached-json-file ==0.1.1
|
||||
- cacophony ==0.10.1
|
||||
- calendar-recycling ==0.0.0.1
|
||||
- call-stack ==0.3.0
|
||||
|
@ -513,7 +513,7 @@ default-package-overrides:
|
|||
- csp ==1.4.0
|
||||
- css-syntax ==0.1.0.0
|
||||
- css-text ==0.1.3.0
|
||||
- c-struct ==0.1.1.0
|
||||
- c-struct ==0.1.1.1
|
||||
- csv ==0.1.2
|
||||
- ctrie ==0.2
|
||||
- cubicbezier ==0.6.0.6
|
||||
|
@ -601,7 +601,7 @@ default-package-overrides:
|
|||
- dialogflow-fulfillment ==0.1.1.4
|
||||
- di-core ==1.0.4
|
||||
- dictionary-sharing ==0.1.0.0
|
||||
- Diff ==0.4.0
|
||||
- Diff ==0.4.1
|
||||
- digest ==0.0.1.3
|
||||
- digits ==0.3.1
|
||||
- dimensional ==1.4
|
||||
|
@ -848,7 +848,7 @@ default-package-overrides:
|
|||
- GenericPretty ==1.2.2
|
||||
- generic-random ==1.4.0.0
|
||||
- generics-eot ==0.4.0.1
|
||||
- generics-sop ==0.5.1.1
|
||||
- generics-sop ==0.5.1.2
|
||||
- generics-sop-lens ==0.2.0.1
|
||||
- geniplate-mirror ==0.7.8
|
||||
- genvalidity ==0.11.0.2
|
||||
|
@ -880,7 +880,7 @@ default-package-overrides:
|
|||
- genvalidity-unordered-containers ==0.3.0.1
|
||||
- genvalidity-uuid ==0.1.0.4
|
||||
- genvalidity-vector ==0.3.0.1
|
||||
- geojson ==4.0.2
|
||||
- geojson ==4.0.4
|
||||
- getopt-generics ==0.13.0.4
|
||||
- ghc-byteorder ==4.11.0.0.10
|
||||
- ghc-check ==0.5.0.6
|
||||
|
@ -1059,7 +1059,7 @@ default-package-overrides:
|
|||
- hlibcpuid ==0.2.0
|
||||
- hlibgit2 ==0.18.0.16
|
||||
- hlibsass ==0.1.10.1
|
||||
- hlint ==3.2.7
|
||||
- hlint ==3.2.8
|
||||
- hmatrix ==0.20.2
|
||||
- hmatrix-backprop ==0.1.3.0
|
||||
- hmatrix-gsl ==0.19.0.1
|
||||
|
@ -1069,7 +1069,7 @@ default-package-overrides:
|
|||
- hmm-lapack ==0.4
|
||||
- hmpfr ==0.4.4
|
||||
- hnock ==0.4.0
|
||||
- hoauth2 ==1.16.0
|
||||
- hoauth2 ==1.16.1
|
||||
- hoogle ==5.0.18.3
|
||||
- hOpenPGP ==2.9.7
|
||||
- hopenpgp-tools ==0.23.6
|
||||
|
@ -1483,7 +1483,7 @@ default-package-overrides:
|
|||
- mersenne-random-pure64 ==0.2.2.0
|
||||
- messagepack ==0.5.4
|
||||
- metrics ==0.4.1.1
|
||||
- mfsolve ==0.3.2.0
|
||||
- mfsolve ==0.3.2.1
|
||||
- microlens ==0.4.12.0
|
||||
- microlens-aeson ==2.3.1
|
||||
- microlens-contra ==0.1.0.2
|
||||
|
@ -1875,7 +1875,7 @@ default-package-overrides:
|
|||
- protolude ==0.3.0
|
||||
- proxied ==0.3.1
|
||||
- psqueues ==0.2.7.3
|
||||
- ptr-poker ==0.1.2.3
|
||||
- ptr-poker ==0.1.2.4
|
||||
- publicsuffix ==0.20200526
|
||||
- pulse-simple ==0.1.14
|
||||
- pureMD5 ==2.1.4
|
||||
|
@ -1923,7 +1923,7 @@ default-package-overrides:
|
|||
- Ranged-sets ==0.4.0
|
||||
- range-set-list ==0.1.3.1
|
||||
- rank1dynamic ==0.4.1
|
||||
- rank2classes ==1.4.3
|
||||
- rank2classes ==1.4.4
|
||||
- Rasterific ==0.7.5.4
|
||||
- rasterific-svg ==0.3.3.2
|
||||
- ratel ==1.0.17
|
||||
|
@ -2058,7 +2058,7 @@ default-package-overrides:
|
|||
- sdl2-image ==2.0.0
|
||||
- sdl2-mixer ==1.1.0
|
||||
- sdl2-ttf ==2.1.2
|
||||
- search-algorithms ==0.3.1
|
||||
- search-algorithms ==0.3.2
|
||||
- secp256k1-haskell ==0.5.0
|
||||
- securemem ==0.1.10
|
||||
- selda ==0.5.1.0
|
||||
|
@ -2188,7 +2188,7 @@ default-package-overrides:
|
|||
- socket ==0.8.3.0
|
||||
- socks ==0.6.1
|
||||
- some ==1.0.2
|
||||
- sop-core ==0.5.0.1
|
||||
- sop-core ==0.5.0.2
|
||||
- sort ==1.0.0.0
|
||||
- sorted-list ==0.2.1.0
|
||||
- sourcemap ==0.1.7
|
||||
|
@ -2283,7 +2283,7 @@ default-package-overrides:
|
|||
- swagger ==0.3.0
|
||||
- swagger2 ==2.6
|
||||
- sweet-egison ==0.1.1.3
|
||||
- swish ==0.10.0.9
|
||||
- swish ==0.10.1.0
|
||||
- syb ==0.7.2.1
|
||||
- sydtest ==0.2.0.0
|
||||
- sydtest-discover ==0.0.0.1
|
||||
|
@ -2368,7 +2368,7 @@ default-package-overrides:
|
|||
- text-ldap ==0.1.1.14
|
||||
- textlocal ==0.1.0.5
|
||||
- text-manipulate ==0.3.0.0
|
||||
- text-metrics ==0.3.1
|
||||
- text-metrics ==0.3.2
|
||||
- text-postgresql ==0.0.3.1
|
||||
- text-printer ==0.5.0.2
|
||||
- text-regex-replace ==0.1.1.4
|
||||
|
@ -2411,7 +2411,7 @@ default-package-overrides:
|
|||
- th-test-utils ==1.1.1
|
||||
- th-utilities ==0.2.4.3
|
||||
- thyme ==0.3.5.5
|
||||
- tidal ==1.7.9
|
||||
- tidal ==1.7.10
|
||||
- tile ==0.3.0.0
|
||||
- time-compat ==1.9.5
|
||||
- timeit ==2.0
|
||||
|
@ -2447,7 +2447,7 @@ default-package-overrides:
|
|||
- transformers-compat ==0.6.6
|
||||
- transformers-fix ==1.0
|
||||
- traverse-with-class ==1.0.1.1
|
||||
- tree-diff ==0.2.1
|
||||
- tree-diff ==0.2.1.1
|
||||
- tree-fun ==0.8.1.0
|
||||
- tree-view ==0.5.1
|
||||
- trifecta ==2.1.2
|
||||
|
@ -2559,7 +2559,7 @@ default-package-overrides:
|
|||
- validity-vector ==0.2.0.3
|
||||
- valor ==0.1.0.0
|
||||
- vault ==0.3.1.5
|
||||
- vcs-ignore ==0.0.1.0
|
||||
- vcs-ignore ==0.0.2.0
|
||||
- vec ==0.4
|
||||
- vector ==0.12.3.1
|
||||
- vector-algorithms ==0.8.0.4
|
||||
|
|
|
@ -1298,6 +1298,7 @@ dont-distribute-packages:
|
|||
- graph-rewriting-strategies
|
||||
- graph-rewriting-trs
|
||||
- graph-rewriting-ww
|
||||
- graph-trace-viz
|
||||
- graph-visit
|
||||
- graphicsFormats
|
||||
- graphicstools
|
||||
|
@ -2159,6 +2160,7 @@ dont-distribute-packages:
|
|||
- mpretty
|
||||
- mprover
|
||||
- mps
|
||||
- mptcp
|
||||
- msgpack-aeson
|
||||
- msgpack-idl
|
||||
- msgpack-rpc
|
||||
|
@ -2832,6 +2834,7 @@ dont-distribute-packages:
|
|||
- sounddelay
|
||||
- soundgen
|
||||
- source-code-server
|
||||
- spade
|
||||
- sparkle
|
||||
- sparrow
|
||||
- sparsebit
|
||||
|
@ -3017,6 +3020,7 @@ dont-distribute-packages:
|
|||
- toktok
|
||||
- too-many-cells
|
||||
- top
|
||||
- topaz
|
||||
- topkata
|
||||
- total-map
|
||||
- toxcore
|
||||
|
|
1585
pkgs/development/haskell-modules/hackage-packages.nix
generated
1585
pkgs/development/haskell-modules/hackage-packages.nix
generated
File diff suppressed because it is too large
Load diff
|
@ -1,34 +1,22 @@
|
|||
# Install not only the Hoogle library and executable, but also a local Hoogle
|
||||
# database which provides "Source" links to all specified 'packages' -- or the
|
||||
# current Haskell Platform if no custom package set is provided.
|
||||
#
|
||||
# It is intended to be used in config.nix similarly to:
|
||||
#
|
||||
# { packageOverrides = pkgs: rec {
|
||||
#
|
||||
# haskellPackages =
|
||||
# let callPackage = pkgs.lib.callPackageWith haskellPackages;
|
||||
# in pkgs.recurseIntoAttrs (pkgs.haskellPackages.override {
|
||||
# extension = self: super: {
|
||||
# hoogleLocal = pkgs.haskellPackages.hoogleLocal.override {
|
||||
# packages = with pkgs.haskellPackages; [
|
||||
# mmorph
|
||||
# monadControl
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# });
|
||||
# }}
|
||||
#
|
||||
# This will build mmorph and monadControl, and have the hoogle installation
|
||||
# refer to their documentation via symlink so they are not garbage collected.
|
||||
|
||||
{ lib, stdenv, buildPackages
|
||||
, hoogle, writeText, ghc
|
||||
, packages
|
||||
{ lib, stdenv, buildPackages, haskellPackages
|
||||
, writeText
|
||||
}:
|
||||
|
||||
# This argument is a function which selects a list of Haskell packages from any
|
||||
# passed Haskell package set.
|
||||
#
|
||||
# Example:
|
||||
# (hpkgs: [ hpkgs.mtl hpkgs.lens ])
|
||||
selectPackages:
|
||||
|
||||
let
|
||||
inherit (haskellPackages) ghc hoogle;
|
||||
packages = selectPackages haskellPackages;
|
||||
|
||||
wrapper = ./hoogle-local-wrapper.sh;
|
||||
isGhcjs = ghc.isGhcjs or false;
|
||||
opts = lib.optionalString;
|
||||
|
@ -55,7 +43,7 @@ let
|
|||
|
||||
in
|
||||
buildPackages.stdenv.mkDerivation {
|
||||
name = "hoogle-local-0.1";
|
||||
name = "hoogle-with-packages";
|
||||
buildInputs = [ghc hoogle];
|
||||
|
||||
inherit docPackages;
|
||||
|
|
|
@ -87,8 +87,11 @@ let
|
|||
drv = if lib.isFunction fn then fn else import fn;
|
||||
auto = builtins.intersectAttrs (lib.functionArgs drv) scope;
|
||||
|
||||
# Converts a returned function to a functor attribute set if necessary
|
||||
ensureAttrs = v: if builtins.isFunction v then { __functor = _: v; } else v;
|
||||
|
||||
# this wraps the `drv` function to add a `overrideScope` function to the result.
|
||||
drvScope = allArgs: drv allArgs // {
|
||||
drvScope = allArgs: ensureAttrs (drv allArgs) // {
|
||||
overrideScope = f:
|
||||
let newScope = mkScope (fix' (extends f scope.__unfix__));
|
||||
# note that we have to be careful here: `allArgs` includes the auto-arguments that
|
||||
|
@ -117,11 +120,6 @@ let
|
|||
defaultScope = mkScope self;
|
||||
callPackage = drv: args: callPackageWithScope defaultScope drv args;
|
||||
|
||||
withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix {
|
||||
inherit (self) ghc llvmPackages;
|
||||
inherit packages;
|
||||
};
|
||||
|
||||
# Use cabal2nix to create a default.nix for the package sources found at 'src'.
|
||||
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
|
||||
let
|
||||
|
@ -266,22 +264,53 @@ in package-set { inherit pkgs lib callPackage; } self // {
|
|||
then (modifier drv).envFunc {inherit withHoogle;}
|
||||
else modifier drv;
|
||||
|
||||
ghcWithPackages = selectFrom: withPackages (selectFrom self);
|
||||
# This can be used to easily create a derivation containing GHC and the specified set of Haskell packages.
|
||||
#
|
||||
# Example:
|
||||
# $ nix-shell -p 'haskellPackages.ghcWithPackages (hpkgs: [ hpkgs.mtl hpkgs.lens ])'
|
||||
# $ ghci # in the nix-shell
|
||||
# Prelude > import Control.Lens
|
||||
#
|
||||
# GHC is setup with a package database with all the specified Haskell packages.
|
||||
#
|
||||
# ghcWithPackages :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation
|
||||
ghcWithPackages = self.callPackage ./with-packages-wrapper.nix {
|
||||
haskellPackages = self;
|
||||
};
|
||||
|
||||
|
||||
# Put 'hoogle' into the derivation's PATH with a database containing all
|
||||
# the package's dependencies; run 'hoogle server --local' in a shell to
|
||||
# host a search engine for the dependencies.
|
||||
#
|
||||
# Example usage:
|
||||
# $ nix-shell -p 'haskellPackages.hoogleWithPackages (p: [ p.mtl p.lens ])'
|
||||
# [nix-shell] $ hoogle server
|
||||
#
|
||||
# hoogleWithPackages :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation
|
||||
#
|
||||
# To reload the Hoogle server automatically on .cabal file changes try
|
||||
# this:
|
||||
# echo *.cabal | entr -r -- nix-shell --run 'hoogle server --local'
|
||||
ghcWithHoogle = selectFrom:
|
||||
let
|
||||
packages = selectFrom self;
|
||||
hoogle = callPackage ./hoogle.nix {
|
||||
inherit packages;
|
||||
};
|
||||
in withPackages (packages ++ [ hoogle ]);
|
||||
hoogleWithPackages = self.callPackage ./hoogle.nix {
|
||||
haskellPackages = self;
|
||||
};
|
||||
hoogleLocal =
|
||||
{ packages ? [] }:
|
||||
lib.warn "hoogleLocal is deprecated, use hoogleWithPackages instead" (
|
||||
self.hoogleWithPackages (_: packages)
|
||||
);
|
||||
# This is like a combination of ghcWithPackages and hoogleWithPackages.
|
||||
# It provides a derivation containing both GHC and Hoogle with an index of
|
||||
# the given Haskell package database.
|
||||
#
|
||||
# Example:
|
||||
# $ nix-shell -p 'haskellPackages.ghcWithHoogle (hpkgs: [ hpkgs.conduit hpkgs.lens ])'
|
||||
#
|
||||
# ghcWithHoogle :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation
|
||||
ghcWithHoogle = self.ghcWithPackages.override {
|
||||
withHoogle = true;
|
||||
};
|
||||
|
||||
# Returns a derivation whose environment contains a GHC with only
|
||||
# the dependencies of packages listed in `packages`, not the
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
|
||||
{ lib, stdenv, haskellPackages, symlinkJoin, makeWrapper
|
||||
# GHC will have LLVM available if necessary for the respective target,
|
||||
# so useLLVM only needs to be changed if -fllvm is to be used for a
|
||||
# platform that has NCG support
|
||||
, useLLVM ? false
|
||||
, withHoogle ? false
|
||||
, hoogleWithPackages
|
||||
, postBuild ? ""
|
||||
, ghcLibdir ? null # only used by ghcjs, when resolving plugins
|
||||
}:
|
||||
|
||||
assert ghcLibdir != null -> (ghc.isGhcjs or false);
|
||||
|
||||
# This wrapper works only with GHC 6.12 or later.
|
||||
assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs || ghc.isHaLVM;
|
||||
# This argument is a function which selects a list of Haskell packages from any
|
||||
# passed Haskell package set.
|
||||
#
|
||||
# Example:
|
||||
# (hpkgs: [ hpkgs.mtl hpkgs.lens ])
|
||||
selectPackages:
|
||||
|
||||
# It's probably a good idea to include the library "ghc-paths" in the
|
||||
# compiler environment, because we have a specially patched version of
|
||||
|
@ -34,6 +38,11 @@ assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs || ghc.isHaLVM;
|
|||
# fi
|
||||
|
||||
let
|
||||
inherit (haskellPackages) llvmPackages ghc;
|
||||
|
||||
packages = selectPackages haskellPackages
|
||||
++ lib.optional withHoogle (hoogleWithPackages selectPackages);
|
||||
|
||||
isGhcjs = ghc.isGhcjs or false;
|
||||
isHaLVM = ghc.isHaLVM or false;
|
||||
ghc761OrLater = isGhcjs || isHaLVM || lib.versionOlder "7.6.1" ghc.version;
|
||||
|
@ -53,6 +62,9 @@ let
|
|||
([ llvmPackages.llvm ]
|
||||
++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang);
|
||||
in
|
||||
|
||||
assert ghcLibdir != null -> (ghc.isGhcjs or false);
|
||||
|
||||
if paths == [] && !useLLVM then ghc else
|
||||
symlinkJoin {
|
||||
# this makes computing paths from the name attribute impossible;
|
||||
|
|
Loading…
Reference in a new issue