Merge remote-tracking branch 'upstream/master' into haskell-bash-completion-2

This commit is contained in:
John Ericson
2018-11-08 11:28:53 -05:00
4323 changed files with 169073 additions and 80815 deletions

View File

@@ -33,7 +33,7 @@ self: super: {
unbuildable = throw "package depends on meta package 'unbuildable'";
# Use the latest version of the Cabal library.
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_2_4_0_1; });
# The test suite depends on old versions of tasty and QuickCheck.
hackage-security = dontCheck super.hackage-security;
@@ -86,7 +86,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 = "0a7h21cwfvprj5xfyivjzg2hbs71xp85l9v6kyp58mlqvwy3zffl";
sha256 = "0dnrihpdshrldais74jm5wjfw650i4va8znc1k2zq8gl9p4i8p39";
};
}).override {
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
@@ -103,18 +103,12 @@ self: super: {
};
# Fix test trying to access /home directory
shell-conduit = (overrideCabal super.shell-conduit (drv: {
shell-conduit = overrideCabal super.shell-conduit (drv: {
postPatch = "sed -i s/home/tmp/ test/Spec.hs";
# the tests for shell-conduit on Darwin illegitimatey assume non-GNU echo
# see: https://github.com/psibi/shell-conduit/issues/12
doCheck = !pkgs.stdenv.isDarwin;
})).overrideScope (self: super: {
# shell-conduit doesn't build with conduit 1.3
# see https://github.com/psibi/shell-conduit/issues/15
conduit = self.conduit_1_2_13_1;
conduit-extra = self.conduit-extra_1_2_3_2;
resourcet = self.resourcet_1_1_11;
});
# https://github.com/froozen/kademlia/issues/2
@@ -340,7 +334,7 @@ self: super: {
itanium-abi = dontCheck super.itanium-abi;
katt = dontCheck super.katt;
language-slice = dontCheck super.language-slice;
language-nix = if pkgs.stdenv.isi686 then dontCheck super.language-nix else super.language-nix;
language-nix = if (pkgs.stdenv.hostPlatform.isAarch64 || pkgs.stdenv.hostPlatform.isi686) then dontCheck super.language-nix else super.language-nix; # aarch64: https://ghc.haskell.org/trac/ghc/ticket/15275
ldap-client = dontCheck super.ldap-client;
lensref = dontCheck super.lensref;
lucid = dontCheck super.lucid; #https://github.com/chrisdone/lucid/issues/25
@@ -362,6 +356,7 @@ self: super: {
optional = dontCheck super.optional;
orgmode-parse = dontCheck super.orgmode-parse;
os-release = dontCheck super.os-release;
pandoc-crossref = dontCheck super.pandoc-crossref; # (most likely change when no longer 0.3.2.1) https://github.com/lierdakil/pandoc-crossref/issues/199
persistent-redis = dontCheck super.persistent-redis;
pipes-extra = dontCheck super.pipes-extra;
pipes-websockets = dontCheck super.pipes-websockets;
@@ -377,6 +372,7 @@ self: super: {
safecopy = dontCheck super.safecopy;
sai-shape-syb = dontCheck super.sai-shape-syb;
scp-streams = dontCheck super.scp-streams;
sdl2 = dontCheck super.sdl2; # the test suite needs an x server
sdl2-ttf = dontCheck super.sdl2-ttf; # as of version 0.2.1, the test suite requires user intervention
separated = dontCheck super.separated;
shadowsocks = dontCheck super.shadowsocks;
@@ -683,8 +679,13 @@ self: super: {
# https://github.com/goldfirere/singletons/issues/122
singletons = dontCheck super.singletons;
# https://github.com/fpco/stackage/issues/838
cryptonite = dontCheck super.cryptonite;
# Fix an aarch64 issue with cryptonite-0.25:
# https://github.com/haskell-crypto/cryptonite/issues/234
# This has been committed upstream, but there is, as of yet, no new release.
cryptonite = appendPatch super.cryptonite (pkgs.fetchpatch {
url = https://github.com/haskell-crypto/cryptonite/commit/4622e5fc8ece82f4cf31358e31cd02cf020e558e.patch;
sha256 = "1m2d47ni4jbrpvxry50imj91qahr3r7zkqm157clrzlmw6gzpgnq";
});
# We cannot build this package w/o the C library from <http://www.phash.org/>.
phash = markBroken super.phash;
@@ -705,9 +706,6 @@ self: super: {
then appendConfigureFlag super.gtk "-fhave-quartz-gtk"
else super.gtk;
# vaultenv is not available from Hackage.
vaultenv = self.callPackage ../tools/haskell/vaultenv { };
# https://github.com/Philonous/hs-stun/pull/1
# Remove if a version > 0.1.0.1 ever gets released.
stunclient = overrideCabal super.stunclient (drv: {
@@ -930,16 +928,14 @@ self: super: {
text-icu = dontCheck super.text-icu;
# https://github.com/haskell/cabal/issues/4969
haddock-library_1_4_4 = dontHaddock super.haddock-library_1_4_4;
haddock-api = super.haddock-api.override { haddock-library = self.haddock-library_1_4_4; };
# haddock-api = (super.haddock-api.overrideScope (self: super: {
# haddock-library = self.haddock-library_1_6_0;
# })).override { hspec = self.hspec_2_4_8; };
# Jailbreak "unix-compat >=0.1.2 && <0.5".
# Jailbreak "graphviz >=2999.18.1 && <2999.20".
darcs = overrideCabal super.darcs (drv: { preConfigure = "sed -i -e 's/unix-compat .*,/unix-compat,/' -e 's/fgl .*,/fgl,/' -e 's/graphviz .*,/graphviz,/' darcs.cabal"; });
# https://github.com/Twinside/Juicy.Pixels/issues/149
JuicyPixels = dontHaddock super.JuicyPixels;
# aarch64 and armv7l fixes.
happy = if (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) then dontCheck super.happy else super.happy; # Similar to https://ghc.haskell.org/trac/ghc/ticket/13062
hashable = if (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) then dontCheck super.hashable else super.hashable; # https://github.com/tibbe/hashable/issues/95
@@ -952,19 +948,9 @@ self: super: {
# Tries to read a file it is not allowed to in the test suite
load-env = dontCheck super.load-env;
# Add support for https://github.com/haskell-hvr/multi-ghc-travis.
multi-ghc-travis = self.callPackage ../tools/haskell/multi-ghc-travis {};
# https://github.com/yesodweb/Shelly.hs/issues/162
shelly = dontCheck super.shelly;
# https://github.com/simonmichael/hledger/issues/852
hledger-lib = appendPatch super.hledger-lib (pkgs.fetchpatch {
url = "https://github.com/simonmichael/hledger/commit/007b9f8caaf699852511634752a7d7c86f6adc67.patch";
sha256 = "1lfp29mi1qyrcr9nfjigbyric0xb9n4ann5w6sr0g5sanr4maqs2";
stripLen = 1;
});
# Copy hledger man pages from data directory into the proper place. This code
# should be moved into the cabal2nix generator.
hledger = overrideCabal super.hledger (drv: {
@@ -1004,6 +990,9 @@ self: super: {
'';
});
# https://github.com/haskell-rewriting/term-rewriting/issues/11
term-rewriting = dontCheck (doJailbreak super.term-rewriting);
# https://github.com/nick8325/twee/pull/1
twee-lib = dontHaddock super.twee-lib;
@@ -1089,22 +1078,19 @@ self: super: {
# The test suite is broken. Break out of "base-compat >=0.9.3 && <0.10, hspec >=2.4.4 && <2.5".
haddock-library = doJailbreak (dontCheck super.haddock-library);
haddock-library_1_6_0 = doJailbreak (dontCheck super.haddock-library_1_6_0);
# haddock-library_1_6_0 = doJailbreak (dontCheck super.haddock-library_1_6_0);
# cabal2nix requires hpack >= 0.29.6 but the LTS has hpack-0.28.2.
# Lets remove this once the LTS has upraded to 0.29.6.
hpack = super.hpack_0_29_7;
# The test suite does not know how to find the 'cabal2nix' binary.
# The tool needs a newer hpack version than the one mandated by LTS-12.x.
# Also generate shell completions.
cabal2nix = generateOptparseApplicativeCompletion "cabal2nix"
(overrideCabal super.cabal2nix (drv: {
preCheck = ''
export PATH="$PWD/dist/build/cabal2nix:$PATH"
export HOME="$TMPDIR/home"
'';
(super.cabal2nix.overrideScope (self: super: {
hpack = self.hpack_0_31_1;
yaml = self.yaml_0_11_0_0;
}));
stack2nix = super.stack2nix.overrideScope (self: super: {
hpack = self.hpack_0_31_1;
yaml = self.yaml_0_11_0_0;
});
# Break out of "aeson <1.3, temporary <1.3".
stack = generateOptparseApplicativeCompletion "stack" (doJailbreak super.stack);
@@ -1139,10 +1125,7 @@ self: super: {
})) ./patches/sexpr-0.2.1.patch;
# Can be removed once yi-language >= 0.18 is in the LTS
yi-core = super.yi-core.override { yi-language = self.yi-language_0_18_0; };
# https://github.com/MarcWeber/hasktags/issues/52
hasktags = dontCheck super.hasktags;
yi-core = super.yi-core.overrideScope (self: super: { yi-language = self.yi-language_0_18_0; });
# https://github.com/haskell/hoopl/issues/50
hoopl = dontCheck super.hoopl;
@@ -1153,4 +1136,46 @@ self: super: {
# Generate shell completions
purescript = generateOptparseApplicativeCompletion "purs" super.purescript;
# https://github.com/NixOS/nixpkgs/issues/46467
safe-money-aeson = super.safe-money-aeson.overrideScope (self: super: { safe-money = self.safe-money_0_7; });
safe-money-store = super.safe-money-store.overrideScope (self: super: { safe-money = self.safe-money_0_7; });
safe-money-cereal = super.safe-money-cereal.overrideScope (self: super: { safe-money = self.safe-money_0_7; });
safe-money-serialise = super.safe-money-serialise.overrideScope (self: super: { safe-money = self.safe-money_0_7; });
safe-money-xmlbf = super.safe-money-xmlbf.overrideScope (self: super: { safe-money = self.safe-money_0_7; });
# https://github.com/adinapoli/mandrill/pull/52
mandrill = appendPatch super.mandrill (pkgs.fetchpatch {
url = https://github.com/adinapoli/mandrill/commit/30356d9dfc025a5f35a156b17685241fc3882c55.patch;
sha256 = "1qair09xs6vln3vsjz7sy4hhv037146zak4mq3iv6kdhmp606hqv";
});
# Can be removed once vinyl >= 0.10 is in the LTS.
Frames = super.Frames.overrideScope (self: super: { vinyl = self.vinyl_0_10_0; });
# https://github.com/Euterpea/Euterpea2/pull/22
Euterpea = overrideSrc super.Euterpea {
src = pkgs.fetchFromGitHub {
owner = "Euterpea";
repo = "Euterpea2";
rev = "6f49b790adfb8b65d95a758116c20098fb0cd34c";
sha256 = "0qz1svb96n42nmig16vyphwxas34hypgayvwc91ri7w7xd6yi1ba";
};
};
# https://github.com/kcsongor/generic-lens/pull/60
generic-lens = appendPatch super.generic-lens (pkgs.fetchpatch {
url = https://github.com/kcsongor/generic-lens/commit/d9af1ec22785d6c21e928beb88fc3885c6f05bed.patch;
sha256 = "0ljwcha9l52gs5bghxq3gbzxfqmfz3hxxcg9arjsjw8f7kw946xq";
});
xmonad-extras = doJailbreak super.xmonad-extras;
arbtt = doJailbreak super.arbtt;
# https://github.com/danfran/cabal-macosx/issues/13
cabal-macosx = dontCheck super.cabal-macosx;
# https://github.com/DanielG/cabal-helper/issues/59
cabal-helper = doJailbreak super.cabal-helper;
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View File

@@ -1,239 +0,0 @@
{ pkgs, haskellLib }:
with haskellLib;
self: super: {
# Suitable LLVM version.
llvmPackages = pkgs.llvmPackages_35;
# Disable GHC 7.10.x core libraries.
array = null;
base = null;
binary = null;
bin-package-db = null;
bytestring = null;
Cabal = null;
containers = null;
deepseq = null;
directory = null;
filepath = null;
ghc-boot = null;
ghc-boot-th = null;
ghc-prim = null;
ghci = null;
haskeline = null;
hoopl = null;
hpc = null;
integer-gmp = null;
pretty = null;
process = null;
rts = null;
template-haskell = null;
terminfo = null;
time = null;
transformers = null;
unix = null;
xhtml = null;
# These are now core libraries in GHC 8.4.x.
mtl = self.mtl_2_2_2;
parsec = self.parsec_3_1_13_0;
parsec_3_1_13_0 = addBuildDepends super.parsec_3_1_13_0 [self.fail self.semigroups];
stm = self.stm_2_4_5_0;
text = self.text_1_2_3_0;
# Build jailbreak-cabal with the latest version of Cabal.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_24_2_0; };
gtk2hs-buildtools = super.gtk2hs-buildtools.override { Cabal = self.buildHaskellPackages.Cabal_1_24_2_0; };
# https://github.com/mrkkrp/megaparsec/issues/282
megaparsec = addBuildDepend (dontCheck super.megaparsec) self.fail;
Extra = appendPatch super.Extra (pkgs.fetchpatch {
url = "https://github.com/seereason/sr-extra/commit/29787ad4c20c962924b823d02a7335da98143603.patch";
sha256 = "193i1xmq6z0jalwmq0mhqk1khz6zz0i1hs6lgfd7ybd6qyaqnf5f";
});
# Requires ghc 8.2
ghc-proofs = dontDistribute super.ghc-proofs;
# haddock: No input file(s).
nats = dontHaddock super.nats;
bytestring-builder = dontHaddock super.bytestring-builder;
# Setup: At least the following dependencies are missing: base <4.8
hspec-expectations = overrideCabal super.hspec-expectations (drv: {
postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
});
utf8-string = overrideCabal super.utf8-string (drv: {
postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
});
# acid-state/safecopy#25 acid-state/safecopy#26
safecopy = dontCheck (super.safecopy);
# test suite broken, some instance is declared twice.
# https://bitbucket.org/FlorianHartwig/attobencode/issue/1
AttoBencode = dontCheck super.AttoBencode;
# Test suite fails with some (seemingly harmless) error.
# https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24
syb = dontCheck super.syb;
# Test suite has stricter version bounds
retry = dontCheck super.retry;
# test/System/Posix/Types/OrphansSpec.hs:19:13:
# Not in scope: type constructor or class Int32
base-orphans = dontCheck super.base-orphans;
# Test suite fails with time >= 1.5
http-date = dontCheck super.http-date;
# Version 1.19.5 fails its test suite.
happy = dontCheck super.happy;
# Upstream was notified about the over-specified constraint on 'base'
# but refused to do anything about it because he "doesn't want to
# support a moving target". Go figure.
barecheck = doJailbreak super.barecheck;
# https://github.com/kazu-yamamoto/unix-time/issues/30
unix-time = dontCheck super.unix-time;
# diagrams/monoid-extras#19
monoid-extras = overrideCabal super.monoid-extras (drv: {
prePatch = "sed -i 's|4\.8|4.9|' monoid-extras.cabal";
});
# diagrams/statestack#5
statestack = overrideCabal super.statestack (drv: {
prePatch = "sed -i 's|4\.8|4.9|' statestack.cabal";
});
# diagrams/diagrams-core#83
diagrams-core = overrideCabal super.diagrams-core (drv: {
prePatch = "sed -i 's|4\.8|4.9|' diagrams-core.cabal";
});
timezone-olson = doJailbreak super.timezone-olson;
xmonad-extras = overrideCabal super.xmonad-extras (drv: {
postPatch = ''
sed -i -e "s,<\*,<¤,g" XMonad/Actions/Volume.hs
'';
});
# Workaround for a workaround, see comment for "ghcjs" flag.
jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs";
in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3
self.webkitgtk3-javascriptcore ];
# https://github.com/lymar/hastache/issues/47
hastache = dontCheck super.hastache;
# The compat library is empty in the presence of mtl 2.2.x.
mtl-compat = dontHaddock super.mtl-compat;
# https://github.com/bos/bloomfilter/issues/11
bloomfilter = dontHaddock (appendConfigureFlag super.bloomfilter "--ghc-option=-XFlexibleContexts");
# https://github.com/ocharles/tasty-rerun/issues/5
tasty-rerun = dontHaddock (appendConfigureFlag super.tasty-rerun "--ghc-option=-XFlexibleContexts");
# http://hub.darcs.net/ivanm/graphviz/issue/5
graphviz = dontCheck (appendPatch super.graphviz ./patches/graphviz-fix-ghc710.patch);
# https://github.com/HugoDaniel/RFC3339/issues/14
timerep = dontCheck super.timerep;
# Required to fix version 0.91.0.0.
wx = dontHaddock (appendConfigureFlag super.wx "--ghc-option=-XFlexibleContexts");
# Inexplicable haddock failure
# https://github.com/gregwebs/aeson-applicative/issues/2
aeson-applicative = dontHaddock super.aeson-applicative;
# GHC 7.10.1 is affected by https://github.com/srijs/hwsl2/issues/1.
hwsl2 = dontCheck super.hwsl2;
# https://github.com/haskell/haddock/issues/427
haddock = dontCheck self.haddock_2_16_1;
# haddock-api >= 2.17 is GHC 8.0 only
haddock-api = self.haddock-api_2_16_1;
haddock-library = self.haddock-library_1_2_1;
# The tests in vty-ui do not build, but vty-ui itself builds.
vty-ui = enableCabalFlag super.vty-ui "no-tests";
# https://github.com/fpco/stackage/issues/1112
vector-algorithms = addBuildDepends (dontCheck super.vector-algorithms) [ self.mtl self.mwc-random ];
# vector with ghc < 8.0 needs semigroups
vector = addBuildDepend super.vector self.semigroups;
# too strict dependency on directory
tasty-ant-xml = doJailbreak super.tasty-ant-xml;
# https://github.com/thoughtpolice/hs-ed25519/issues/13
ed25519 = dontCheck super.ed25519;
# Breaks a dependency cycle between QuickCheck and semigroups
hashable = dontCheck super.hashable;
unordered-containers = dontCheck super.unordered-containers;
# GHC versions prior to 8.x require additional build inputs.
aeson = disableCabalFlag (addBuildDepend super.aeson self.semigroups) "old-locale";
ansi-wl-pprint = addBuildDepend super.ansi-wl-pprint self.semigroups;
attoparsec = addBuildDepends super.attoparsec (with self; [semigroups fail]);
bytes = addBuildDepend super.bytes self.doctest;
case-insensitive = addBuildDepend super.case-insensitive self.semigroups;
cmdargs = addBuildDepend super.cmdargs self.semigroups;
contravariant = addBuildDepend super.contravariant self.semigroups;
dependent-map = addBuildDepend super.dependent-map self.semigroups;
distributive = addBuildDepend (dontCheck super.distributive) self.semigroups;
Glob = addBuildDepends super.Glob (with self; [semigroups]);
hoauth2 = overrideCabal super.hoauth2 (drv: { testDepends = (drv.testDepends or []) ++ [ self.wai self.warp ]; });
hslogger = addBuildDepend super.hslogger self.HUnit;
intervals = addBuildDepends super.intervals (with self; [doctest QuickCheck]);
lens = addBuildDepend super.lens self.generic-deriving;
mono-traversable = addBuildDepend super.mono-traversable self.semigroups;
natural-transformation = addBuildDepend super.natural-transformation self.semigroups;
optparse-applicative = addBuildDepends super.optparse-applicative [self.semigroups self.fail];
parser-combinators = addBuildDepend super.parser-combinators self.semigroups;
QuickCheck = addBuildDepend super.QuickCheck self.semigroups;
reflection = addBuildDepend super.reflection self.semigroups;
semigroups = addBuildDepends (dontCheck super.semigroups) (with self; [hashable tagged text unordered-containers]);
tar = addBuildDepend super.tar self.semigroups;
texmath = addBuildDepend super.texmath self.network-uri;
yesod-auth-oauth2 = overrideCabal super.yesod-auth-oauth2 (drv: { testDepends = (drv.testDepends or []) ++ [ self.load-env self.yesod ]; });
# cereal must have `fail` in pre-ghc-8.0.x versions and tests require
# bytestring>=0.10.8.1.
cereal = dontCheck (addBuildDepend super.cereal self.fail);
# The test suite requires Cabal 1.24.x or later to compile.
comonad = dontCheck super.comonad;
semigroupoids = dontCheck super.semigroupoids;
# Newer versions require base >=4.9 && <5.
colour = self.colour_2_3_3;
# https://github.com/atzedijkstra/chr/issues/1
chr-pretty = doJailbreak super.chr-pretty;
chr-parse = doJailbreak super.chr-parse;
# The autogenerated Nix expressions don't take into
# account `if impl(ghc >= x.y)`, which is a common method to depend
# on `semigroups` or `fail` when building with GHC < 8.0.
system-filepath = addBuildDepend super.system-filepath self.semigroups;
haskell-src-exts = addBuildDepend super.haskell-src-exts self.semigroups;
free = addBuildDepend super.free self.fail;
# Newer versions don't build without base-4.9
resourcet = self.resourcet_1_1_11;
conduit = self.conduit_1_2_13_1;
}

View File

@@ -1,84 +0,0 @@
{ pkgs, haskellLib }:
with haskellLib;
self: super: {
# Suitable LLVM version.
llvmPackages = pkgs.llvmPackages_37;
# Disable GHC 8.0.x core libraries.
array = null;
base = null;
binary = null;
bytestring = null;
Cabal = null;
containers = null;
deepseq = null;
directory = null;
filepath = null;
ghc-boot = null;
ghc-boot-th = null;
ghc-compact = null;
ghc-prim = null;
ghci = null;
haskeline = null;
hoopl = null;
hpc = null;
integer-gmp = null;
pretty = null;
process = null;
rts = null;
template-haskell = null;
terminfo = null;
time = null;
transformers = null;
unix = null;
xhtml = null;
# These are now core libraries in GHC 8.4.x.
mtl = self.mtl_2_2_2;
parsec = self.parsec_3_1_13_0;
stm = self.stm_2_4_5_0;
text = self.text_1_2_3_0;
# https://github.com/bmillwood/applicative-quoters/issues/6
applicative-quoters = appendPatch super.applicative-quoters (pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/bmillwood/applicative-quoters/pull/7.patch";
sha256 = "026vv2k3ks73jngwifszv8l59clg88pcdr4mz0wr0gamivkfa1zy";
});
# Requires ghc 8.2
ghc-proofs = dontDistribute super.ghc-proofs;
# https://github.com/thoughtbot/yesod-auth-oauth2/pull/77
yesod-auth-oauth2 = doJailbreak super.yesod-auth-oauth2;
# https://github.com/nominolo/ghc-syb/issues/20
ghc-syb-utils = dontCheck super.ghc-syb-utils;
# Newer versions require ghc>=8.2
apply-refact = super.apply-refact_0_3_0_1;
# This builds needs the latest Cabal version.
cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_2_0_1_1; });
# Add appropriate Cabal library to build this code.
stack = addSetupDepend super.stack self.Cabal_2_0_1_1;
# inline-c > 0.5.6.0 requires template-haskell >= 2.12
inline-c = super.inline-c_0_5_6_1;
inline-c-cpp = super.inline-c-cpp_0_1_0_0;
# test dep hedgehog pulls in concurrent-output, which does not build
# due to processing version mismatch
either = dontCheck super.either;
# test dep tasty has a version mismatch
indents = dontCheck super.indents;
# Newer versions require GHC 8.2.
haddock-library = self.haddock-library_1_4_3;
haddock-api = self.haddock-api_2_17_4;
haddock = self.haddock_2_17_5;
}

View File

@@ -39,8 +39,8 @@ self: super: {
# These are now core libraries in GHC 8.4.x.
mtl = self.mtl_2_2_2;
parsec = self.parsec_3_1_13_0;
stm = self.stm_2_4_5_0;
text = self.text_1_2_3_0;
stm = self.stm_2_5_0_0;
text = self.text_1_2_3_1;
# Make sure we can still build Cabal 1.x.
Cabal_1_24_2_0 = overrideCabal super.Cabal_1_24_2_0 (drv: {
@@ -96,4 +96,7 @@ self: super: {
haddock-library = dontHaddock (dontCheck self.haddock-library_1_5_0_1);
}));
# GHC 8.2 doesn't have semigroups included by default
ListLike = addBuildDepend super.ListLike self.semigroups;
}

View File

@@ -56,4 +56,19 @@ self: super: {
};
in appendPatch super.hadoop-rpc patch;
# stack-1.9.1 needs Cabal 2.4.x, a recent version of hpack, and a non-recent
# version of yaml. Go figure. We avoid overrideScope here because using it to
# change Cabal would re-compile every single package instead of just those
# that have it as an actual library dependency. The explicit overrides are
# more verbose but friendlier for Hydra.
stack = (doJailbreak super.stack).override {
Cabal = self.Cabal_2_4_0_1;
hpack = self.hpack_0_31_1.override { Cabal = self.Cabal_2_4_0_1; };
yaml = self.yaml_0_11_0_0;
hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_0_1; };
};
hpack_0_31_1 = super.hpack_0_31_1.override {
yaml = self.yaml_0_11_0_0;
};
}

View File

@@ -44,17 +44,72 @@ self: super: {
# Use to be a core-library, but no longer is since GHC 8.4.x.
hoopl = self.hoopl_3_10_2_2;
# lts-12.x versions do not compile.
# LTS-12.x versions do not compile.
base-orphans = self.base-orphans_0_8;
brick = self.brick_0_41_2;
cassava-megaparsec = doJailbreak super.cassava-megaparsec;
config-ini = doJailbreak super.config-ini; # https://github.com/aisamanra/config-ini/issues/18
contravariant = self.contravariant_1_5;
free = self.free_5_1;
haddock-library = dontCheck super.haddock-library_1_7_0;
HaTeX = doJailbreak super.HaTeX;
hledger = doJailbreak super.hledger;
hledger-lib = doJailbreak super.hledger-lib;
hledger-ui = doJailbreak super.hledger-ui;
hpack = self.hpack_0_31_1;
hslua = self.hslua_1_0_1;
hslua-module-text = self.hslua-module-text_0_2_0;
hspec = self.hspec_2_6_0;
hspec-core = self.hspec-core_2_6_0;
hspec-discover = self.hspec-discover_2_6_0;
hspec-megaparsec = doJailbreak super.hspec-megaparsec; # newer versions need megaparsec 7.x
hspec-meta = self.hspec-meta_2_5_6;
JuicyPixels = self.JuicyPixels_3_3_2;
lens = self.lens_4_17;
megaparsec = dontCheck (doJailbreak super.megaparsec);
neat-interpolation = dontCheck super.neat-interpolation; # test suite depends on broken HTF
patience = markBrokenVersion "0.1.1" super.patience;
polyparse = self.polyparse_1_12_1;
primitive = self.primitive_0_6_4_0;
QuickCheck = self.QuickCheck_2_12_6_1;
semigroupoids = self.semigroupoids_5_3_1;
tagged = self.tagged_0_8_6;
vty = self.vty_5_25_1;
wizards = doJailbreak super.wizards;
wl-pprint-extras = doJailbreak super.wl-pprint-extras;
yaml = self.yaml_0_11_0_0;
# Over-specified constraints.
async = doJailbreak super.async; # base >=4.3 && <4.12, stm >=2.2 && <2.5
ChasingBottoms = doJailbreak super.ChasingBottoms; # base >=4.2 && <4.12, containers >=0.3 && <0.6
hashable = doJailbreak super.hashable; # base >=4.4 && <4.1
hashable-time = doJailbreak super.hashable-time; # base >=4.7 && <4.12
integer-logarithms = doJailbreak super.integer-logarithms; # base >=4.3 && <4.12
tar = doJailbreak super.tar; # containers >=0.2 && <0.6
test-framework = doJailbreak super.test-framework; # containers >=0.1 && <0.6
# https://github.com/tibbe/unordered-containers/issues/214
unordered-containers = dontCheck super.unordered-containers;
# https://github.com/haskell/fgl/issues/79
# https://github.com/haskell/fgl/issues/81
fgl = appendPatch (overrideCabal super.fgl (drv: { editedCabalFile = null; })) ./patches/fgl-monad-fail.patch;
# Test suite does not compile.
cereal = dontCheck super.cereal;
data-clist = doJailbreak super.data-clist; # won't cope with QuickCheck 2.12.x
Diff = dontCheck super.Diff;
http-api-data = doJailbreak super.http-api-data;
persistent-sqlite = dontCheck super.persistent-sqlite;
psqueues = dontCheck super.psqueues; # won't cope with QuickCheck 2.12.x
system-fileio = dontCheck super.system-fileio; # avoid dependency on broken "patience"
unicode-transforms = dontCheck super.unicode-transforms;
monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
# https://github.com/bmillwood/haskell-src-meta/pull/80
haskell-src-meta = doJailbreak super.haskell-src-meta;
# https://github.com/skogsbaer/HTF/issues/69
HTF = markBrokenVersion "0.13.2.4" super.HTF;
# https://github.com/jgm/skylighting/issues/55
skylighting-core = dontCheck super.skylighting-core;
# https://github.com/jgm/pandoc/issues/4974
pandoc = doJailbreak super.pandoc_2_4;
# Break out of "yaml >=0.10.4.0 && <0.11".
stack = doJailbreak super.stack;
}

View File

@@ -25,7 +25,7 @@ self: super:
# GHCJS does not ship with the same core packages as GHC.
# https://github.com/ghcjs/ghcjs/issues/676
stm = self.stm_2_4_5_0;
stm = self.stm_2_5_0_0;
ghc-compact = self.ghc-compact_0_1_0_0;
network = addBuildTools super.network (pkgs.lib.optional pkgs.buildPlatform.isDarwin pkgs.buildPackages.darwin.libiconv);

View File

@@ -1,59 +0,0 @@
{ pkgs, haskellLib }:
with haskellLib;
self: super: {
# Suitable LLVM version.
llvmPackages = pkgs.llvmPackages_35;
# Disable GHC 8.0.x core libraries.
array = null;
base = null;
binary = null;
bytestring = null;
Cabal = null;
containers = null;
deepseq = null;
directory = null;
filepath = null;
ghc-boot = null;
ghc-boot-th = null;
ghc-prim = null;
ghci = null;
haskeline = null;
hoopl = null;
hpc = null;
integer-gmp = null;
pretty = null;
process = null;
rts = null;
template-haskell = null;
terminfo = null;
time = null;
transformers = null;
unix = null;
xhtml = null;
# cabal-install can use the native Cabal library.
cabal-install = super.cabal-install.override { Cabal = null; };
# jailbreak-cabal can use the native Cabal library.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };
# https://github.com/bmillwood/applicative-quoters/issues/6
applicative-quoters = appendPatch super.applicative-quoters (pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/bmillwood/applicative-quoters/pull/7.patch";
sha256 = "026vv2k3ks73jngwifszv8l59clg88pcdr4mz0wr0gamivkfa1zy";
});
# https://github.com/christian-marie/xxhash/issues/3
xxhash = doJailbreak super.xxhash;
# https://github.com/Deewiant/glob/issues/8
Glob = doJailbreak super.Glob;
# http://hub.darcs.net/dolio/vector-algorithms/issue/9#comment-20170112T145715
vector-algorithms = dontCheck super.vector-algorithms;
}

View File

@@ -131,8 +131,16 @@ self: super: builtins.intersectAttrs super {
x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc
then let inherit (pkgs.darwin) security_tool;
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
# darwin.security_tool is broken in Mojave (#45042)
# We will use the system provided security for now.
# Beware this WILL break in sandboxes!
# TODO(matthewbauer): If someone really needs this to work in sandboxes,
# I think we can add a propagatedImpureHost dep here, but Im hoping to
# get a proper fix available soonish.
postPatch = (drv.postPatch or "") + ''
substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
'';
})
else super.x509-system;
@@ -314,9 +322,6 @@ self: super: builtins.intersectAttrs super {
# https://github.com/bos/pcap/issues/5
pcap = addExtraLibrary super.pcap pkgs.libpcap;
# https://github.com/snoyberg/yaml/issues/106
yaml = disableCabalFlag super.yaml "system-libyaml";
# The cabal files for these libraries do not list the required system dependencies.
miniball = overrideCabal super.miniball (drv: {
librarySystemDepends = [ pkgs.miniball ];
@@ -510,4 +515,36 @@ self: super: builtins.intersectAttrs super {
LDAP = dontCheck (overrideCabal super.LDAP (drv: {
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
}));
# Doctests hang only when compiling with nix.
# https://github.com/cdepillabout/termonad/issues/15
termonad = dontCheck super.termonad;
# Expects z3 to be on path so we replace it with a hard
sbv = overrideCabal super.sbv (drv: {
postPatch = ''
sed -i -e 's|"z3"|"${pkgs.z3}/bin/z3"|' Data/SBV/Provers/Z3.hs'';
});
# The test-suite requires a running PostgreSQL server.
Frames-beam = dontCheck super.Frames-beam;
futhark = with pkgs;
let path = stdenv.lib.makeBinPath [ gcc ];
in overrideCabal (addBuildTool super.futhark makeWrapper) (_drv: {
postInstall = ''
wrapProgram $out/bin/futhark-c \
--prefix PATH : "${path}"
wrapProgram $out/bin/futhark-opencl \
--prefix PATH : "${path}" \
--set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \
--set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \
--set NIX_CFLAGS_LINK "-L${ocl-icd}/lib"
'';
});
# The test suite has undeclared dependencies on git.
githash = dontCheck super.githash;
}

View File

@@ -55,13 +55,29 @@ in
tensorflow-logging = super.tensorflow-logging.override {
inherit proto-lens;
};
tensorflow-mnist = super.tensorflow-mnist.override {
tensorflow-mnist = overrideCabal (super.tensorflow-mnist.override {
inherit proto-lens;
};
# https://github.com/tensorflow/haskell/issues/215
tensorflow-mnist-input-data = self.tensorflow-mnist-input-data;
}) (_drv: { broken = false; });
tensorflow-mnist-input-data = setSourceRoot "tensorflow-mnist-input-data" (super.callPackage (
{ mkDerivation, base, bytestring, Cabal, cryptonite, directory
, filepath, HTTP, network-uri, stdenv
}:
let
fileInfos = {
"train-images-idx3-ubyte.gz" = "440fcabf73cc546fa21475e81ea370265605f56be210a4024d2ca8f203523609";
"train-labels-idx1-ubyte.gz" = "3552534a0a558bbed6aed32b30c495cca23d567ec52cac8be1a0730e8010255c";
"t10k-images-idx3-ubyte.gz" = "8d422c7b0a1c1c79245a5bcf07fe86e33eeafee792b84584aec276f5a2dbc4e6";
"t10k-labels-idx1-ubyte.gz" = "f7ae60f92e00ec6debd23a6088c31dbd2371eca3ffa0defaefb259924204aec6";
};
downloads = with pkgs.lib; flip mapAttrsToList fileInfos (name: sha256:
pkgs.fetchurl {
url = "http://yann.lecun.com/exdb/mnist/${name}";
inherit sha256;
});
in
mkDerivation {
pname = "tensorflow-mnist-input-data";
version = "0.1.0.0";
@@ -71,6 +87,9 @@ in
base bytestring Cabal cryptonite directory filepath HTTP
network-uri
];
preConfigure = pkgs.lib.strings.concatStringsSep "\n" (
map (x: "ln -s ${x} data/$(stripHash ${x})") downloads
);
libraryHaskellDepends = [ base ];
homepage = "https://github.com/tensorflow/haskell#readme";
description = "Downloader of input data for training MNIST";

View File

@@ -4,6 +4,7 @@
, packageSetConfig ? (self: super: {})
, overrides ? (self: super: {})
, initialPackages ? import ./initial-packages.nix
, nonHackagePackages ? import ./non-hackage-packages.nix
, configurationCommon ? import ./configuration-common.nix
, configurationNix ? import ./configuration-nix.nix
}:
@@ -26,7 +27,9 @@ let
(extends packageSetConfig
(extends compilerConfig
(extends commonConfiguration
(extends nixConfiguration haskellPackages)))));
(extends nixConfiguration
(extends nonHackagePackages
haskellPackages))))));
in

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPackages, buildHaskellPackages, ghc
, jailbreak-cabal, hscolour, cpphs, nodejs
, jailbreak-cabal, hscolour, cpphs, nodejs, shellFor
}:
let
@@ -26,7 +26,7 @@ in
, editedCabalFile ? null
, enableLibraryProfiling ? true
, enableExecutableProfiling ? false
, profilingDetail ? "all-functions"
, profilingDetail ? "exported-functions"
# TODO enable shared libs for cross-compiling
, enableSharedExecutables ? false
, enableSharedLibraries ? (ghc.enableShared or false)
@@ -48,7 +48,9 @@ in
# We cannot enable -j<n> parallelism for libraries because GHC is far more
# likely to generate a non-determistic library ID in that case. Further
# details are at <https://github.com/peti/ghc-library-id-bug>.
, enableParallelBuilding ? (stdenv.lib.versionOlder "7.8" ghc.version && !isLibrary) || stdenv.lib.versionOlder "8.0.1" ghc.version
#
# Currently disabled for aarch64. See https://ghc.haskell.org/trac/ghc/ticket/15449.
, enableParallelBuilding ? ((stdenv.lib.versionOlder "7.8" ghc.version && !isLibrary) || stdenv.lib.versionOlder "8.0.1" ghc.version) && !(stdenv.buildPlatform.isAarch64)
, maintainers ? []
, doCoverage ? false
, doHaddock ? !(ghc.isHaLVM or false)
@@ -135,7 +137,7 @@ let
buildFlagsString = optionalString (buildFlags != []) (" " + concatStringsSep " " buildFlags);
defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$abi/\\$libname"
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
(optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}")
"--with-gcc=$CC" # Clang won't work without that extra information.
@@ -153,6 +155,7 @@ let
(optionalString (versionOlder "8.4" ghc.version) (enableFeature enableStaticLibraries "static"))
(optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic"))
(optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests"))
(enableFeature doBenchmark "benchmarks")
"--enable-library-vanilla" # TODO: Should this be configurable?
"--enable-library-for-ghci" # TODO: Should this be configurable?
] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [
@@ -173,8 +176,7 @@ let
(optionalString (versionOlder "7.10" ghc.version && !isHaLVM) "-threaded")
];
isHaskellPkg = x: (x ? pname) && (x ? version) && (x ? env);
isSystemPkg = x: !isHaskellPkg x;
isHaskellPkg = x: x ? isHaskellLibrary;
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
@@ -191,20 +193,15 @@ let
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testFrameworkDepends) ++
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkFrameworkDepends);
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
haskellBuildInputs = stdenv.lib.filter isHaskellPkg allBuildInputs;
systemBuildInputs = stdenv.lib.filter isSystemPkg allBuildInputs;
# When not cross compiling, also include Setup.hs dependencies.
ghcEnv = ghc.withPackages (p:
haskellBuildInputs ++ stdenv.lib.optional (!isCross) setupHaskellDepends);
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs ++ depsBuildBuild ++ nativeBuildInputs;
isHaskellPartition =
stdenv.lib.partition isHaskellPkg allBuildInputs;
setupCommand = "./Setup";
ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
ghcCommandCaps= toUpper ghcCommand';
nativeGhcCommand = "${nativeGhc.targetPrefix}ghc";
@@ -214,8 +211,7 @@ let
continue
fi
'';
in
in stdenv.lib.fix (drv:
assert allPkgconfigDepends != [] -> pkgconfig != null;
@@ -428,6 +424,13 @@ stdenv.mkDerivation ({
compiler = ghc;
getBuildInputs = {
inherit propagatedBuildInputs otherBuildInputs allPkgconfigDepends;
haskellBuildInputs = isHaskellPartition.right;
systemBuildInputs = isHaskellPartition.wrong;
};
isHaskellLibrary = isLibrary;
# TODO: ask why the split outputs are configurable at all?
@@ -438,23 +441,11 @@ stdenv.mkDerivation ({
# TODO: fetch the self from the fixpoint instead
haddockDir = self: if doHaddock then "${docdir self.doc}/html" else null;
env = stdenv.mkDerivation {
name = "interactive-${pname}-${version}-environment";
buildInputs = systemBuildInputs;
nativeBuildInputs = [ ghcEnv ] ++ nativeBuildInputs;
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
shellHook = ''
export NIX_${ghcCommandCaps}="${ghcEnv}/bin/${ghcCommand}"
export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg"
# TODO: is this still valid?
export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html"
${if isHaLVM
then ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/HaLVM-${ghc.version}"''
else ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcCommand}-${ghc.version}"''}
${shellHook}
'';
env = shellFor {
packages = p: [ drv ];
inherit shellHook;
};
};
meta = { inherit homepage license platforms; }
@@ -488,3 +479,4 @@ stdenv.mkDerivation ({
// optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; }
// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
)
)

File diff suppressed because it is too large Load Diff

View File

@@ -245,12 +245,13 @@ rec {
on hackage. This can be used as a test for the source distribution,
assuming the build fails when packaging mistakes are in the cabal file.
*/
buildFromSdist = pkg: lib.overrideDerivation pkg (drv: {
unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
echo "Source tarball is at ${src}/${tarname}.tar.gz"
tar xf ${src}/${tarname}.tar.gz
cd ${pkg.pname}-*
'';
buildFromSdist = pkg: overrideCabal pkg (drv: {
src = "${sdistTarball pkg}/${pkg.pname}-${pkg.version}.tar.gz";
# Revising and jailbreaking the cabal file has been handled in sdistTarball
revision = null;
editedCabalFile = null;
jailbreak = false;
});
/* Build the package in a strict way to uncover potential problems.
@@ -299,12 +300,7 @@ rec {
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
# Get all of the build inputs of a haskell package, divided by category.
getBuildInputs = p:
(overrideCabal p (args: {
passthru = (args.passthru or {}) // {
_getBuildInputs = extractBuildInputs p.compiler args;
};
}))._getBuildInputs;
getBuildInputs = p: p.getBuildInputs;
# Extract the haskell build inputs of a haskell package.
# This is useful to build environments for developing on that
@@ -339,55 +335,6 @@ rec {
, ...
}: { inherit doCheck doBenchmark; };
# Divide the build inputs of the package into useful sets.
extractBuildInputs = ghc:
{ setupHaskellDepends ? [], extraLibraries ? []
, librarySystemDepends ? [], executableSystemDepends ? []
, pkgconfigDepends ? [], libraryPkgconfigDepends ? []
, executablePkgconfigDepends ? [], testPkgconfigDepends ? []
, benchmarkPkgconfigDepends ? [], testDepends ? []
, testHaskellDepends ? [], testSystemDepends ? []
, testToolDepends ? [], benchmarkDepends ? []
, benchmarkHaskellDepends ? [], benchmarkSystemDepends ? []
, benchmarkToolDepends ? [], buildDepends ? []
, libraryHaskellDepends ? [], executableHaskellDepends ? []
, ...
}@args:
let inherit (ghcInfo ghc) isGhcjs nativeGhc;
inherit (controlPhases ghc args) doCheck doBenchmark;
isHaskellPkg = x: x ? isHaskellLibrary;
allPkgconfigDepends =
pkgconfigDepends ++ libraryPkgconfigDepends ++
executablePkgconfigDepends ++
lib.optionals doCheck testPkgconfigDepends ++
lib.optionals doBenchmark benchmarkPkgconfigDepends;
otherBuildInputs =
setupHaskellDepends ++ extraLibraries ++
librarySystemDepends ++ executableSystemDepends ++
allPkgconfigDepends ++
lib.optionals doCheck ( testDepends ++ testHaskellDepends ++
testSystemDepends ++ testToolDepends
) ++
# ghcjs's hsc2hs calls out to the native hsc2hs
lib.optional isGhcjs nativeGhc ++
lib.optionals doBenchmark ( benchmarkDepends ++
benchmarkHaskellDepends ++
benchmarkSystemDepends ++
benchmarkToolDepends
);
propagatedBuildInputs =
buildDepends ++ libraryHaskellDepends ++
executableHaskellDepends;
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
isHaskellPartition =
lib.partition isHaskellPkg allBuildInputs;
in
{ haskellBuildInputs = isHaskellPartition.right;
systemBuildInputs = isHaskellPartition.wrong;
inherit propagatedBuildInputs otherBuildInputs
allPkgconfigDepends;
};
# Utility to convert a directory full of `cabal2nix`-generated files into a
# package override set
#

View File

@@ -43,7 +43,7 @@ let
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
inherit stdenv;
nodejs = buildPackages.nodejs-slim;
inherit (self) buildHaskellPackages ghc;
inherit (self) buildHaskellPackages ghc shellFor;
inherit (self.buildHaskellPackages) jailbreak-cabal;
hscolour = overrideCabal self.buildHaskellPackages.hscolour (drv: {
isLibrary = false;
@@ -176,34 +176,39 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
callHackage = name: version: callPackageKeepDeriver (self.hackage2nix name version);
# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nix = name: src: args: let
filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
baseNameOf path == "package.yaml";
expr = self.haskellSrc2nix {
inherit name;
src = if pkgs.lib.canCleanSource src
then pkgs.lib.cleanSourceWith { inherit src filter; }
else src;
};
in overrideCabal (callPackageKeepDeriver expr args) (orig: {
inherit src;
});
callCabal2nixWithOptions = name: src: extraCabal2nixOptions: args:
let
filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
baseNameOf path == "package.yaml";
expr = self.haskellSrc2nix {
inherit name extraCabal2nixOptions;
src = if pkgs.lib.canCleanSource src
then pkgs.lib.cleanSourceWith { inherit src filter; }
else src;
};
in overrideCabal (callPackageKeepDeriver expr args) (orig: {
inherit src;
});
callCabal2nix = name: src: args: self.callCabal2nixWithOptions name src "" args;
# : { root : Path
# , name : Defaulted String
# , source-overrides : Defaulted (Either Path VersionNumber)
# , overrides : Defaulted (HaskellPackageOverrideSet)
# , modifier : Defaulted
# , returnShellEnv : Defaulted
# } -> NixShellAwareDerivation
# Given a path to a haskell package directory whose cabal file is
# named the same as the directory name, an optional set of
# source overrides as appropriate for the 'packageSourceOverrides'
# function, an optional set of arbitrary overrides, and an optional
# haskell package modifier, return a derivation appropriate
# for nix-build or nix-shell to build that package.
# Given a path to a haskell package directory, an optional package name
# which defaults to the base name of the path, an optional set of source
# overrides as appropriate for the 'packageSourceOverrides' function, an
# optional set of arbitrary overrides, and an optional haskell package
# modifier, return a derivation appropriate for nix-build or nix-shell to
# build that package.
developPackage =
{ root
, name ? builtins.baseNameOf root
, source-overrides ? {}
, overrides ? self: super: {}
, modifier ? drv: drv
@@ -213,7 +218,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
(pkgs.lib.composeExtensions
(self.packageSourceOverrides source-overrides)
overrides))
.callCabal2nix (builtins.baseNameOf root) root {};
.callCabal2nix name root {};
in if returnShellEnv then (modifier drv).env else modifier drv;
ghcWithPackages = selectFrom: withPackages (selectFrom self);
@@ -256,20 +261,46 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
shellFor = { packages, withHoogle ? false, ... } @ args:
let
selected = packages self;
packageInputs = builtins.map getBuildInputs selected;
haskellInputs =
builtins.filter
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
(pkgs.lib.concatMap (p: p.haskellBuildInputs) packageInputs);
packageInputs = map getBuildInputs selected;
name = if pkgs.lib.length selected == 1
then "ghc-shell-for-${(pkgs.lib.head selected).name}"
else "ghc-shell-for-packages";
# If `packages = [ a b ]` and `a` depends on `b`, don't build `b`,
# because cabal will end up ignoring that built version, assuming
# new-style commands.
haskellInputs = pkgs.lib.filter
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
(pkgs.lib.concatMap (p: p.haskellBuildInputs) packageInputs);
systemInputs = pkgs.lib.concatMap (p: p.systemBuildInputs) packageInputs;
withPackages = if withHoogle then self.ghcWithHoogle else self.ghcWithPackages;
ghcEnv = withPackages (p: haskellInputs);
nativeBuildInputs = pkgs.lib.concatMap (p: p.nativeBuildInputs) selected;
ghcCommand' = if ghc.isGhcjs or false then "ghcjs" else "ghc";
ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
ghcCommandCaps= pkgs.lib.toUpper ghcCommand';
mkDrvArgs = builtins.removeAttrs args ["packages" "withHoogle"];
in pkgs.stdenv.mkDerivation (mkDrvArgs // {
name = "ghc-shell-for-packages";
nativeBuildInputs = [(withPackages (_: haskellInputs))] ++ mkDrvArgs.nativeBuildInputs or [];
name = mkDrvArgs.name or name;
buildInputs = systemInputs ++ mkDrvArgs.buildInputs or [];
nativeBuildInputs = [ ghcEnv ] ++ nativeBuildInputs ++ mkDrvArgs.nativeBuildInputs or [];
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = pkgs.lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
"NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
"NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";
# TODO: is this still valid?
"NIX_${ghcCommandCaps}_DOCDIR" = "${ghcEnv}/share/doc/ghc/html";
"NIX_${ghcCommandCaps}_LIBDIR" = if ghc.isHaLVM or false
then "${ghcEnv}/lib/HaLVM-${ghc.version}"
else "${ghcEnv}/lib/${ghcCommand}-${ghc.version}";
});
ghc = ghc // {

View File

@@ -0,0 +1,18 @@
# EXTRA HASKELL PACKAGES NOT ON HACKAGE
#
# This file should only contain packages that are not in ./hackage-packages.nix.
# Attributes in this set should be nothing more than a callPackage call.
# Overrides to these packages should go to either configuration-nix.nix,
# configuration-common.nix or to one of the compiler specific configuration
# files.
self: super: {
multi-ghc-travis = throw ("haskellPackages.multi-ghc-travis has been renamed"
+ "to haskell-ci, which is now on hackage");
# https://github.com/channable/vaultenv/issues/1
vaultenv = self.callPackage ../tools/haskell/vaultenv { };
# https://github.com/diku-dk/futhark/issues/614
futhark = self.callPackage ../compilers/futhark { };
}

View File

@@ -0,0 +1,61 @@
From 344a7e452630ace0f5c647e525e0299d99de5902 Mon Sep 17 00:00:00 2001
From: Alex Washburn <github@recursion.ninja>
Date: Mon, 20 Aug 2018 23:46:32 -0400
Subject: [PATCH] Fixing issue with MonadFailDesugaring.
---
.travis.yml | 9 +++++++++
Data/Graph/Inductive/Monad.hs | 14 ++++++++++++--
fgl.cabal | 3 ++-
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index db5eeb1..f026dd1 100644
--- a/Data/Graph/Inductive/Monad.hs
+++ b/Data/Graph/Inductive/Monad.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE CPP, MultiParamTypeClasses #-}
-- (c) 2002 by Martin Erwig [see file COPYRIGHT]
-- | Monadic Graphs
@@ -19,6 +19,10 @@ module Data.Graph.Inductive.Monad(
import Data.Graph.Inductive.Graph
+#if MIN_VERSION_base(4,12,0)
+import Control.Monad.Fail
+import Prelude hiding (fail)
+#endif
{-# ANN module "HLint: ignore Redundant lambda" #-}
@@ -39,7 +43,13 @@ import Data.Graph.Inductive.Graph
-- Monadic Graph
--
-class (Monad m) => GraphM m gr where
+class
+#if MIN_VERSION_base(4,12,0)
+ (MonadFail m)
+#else
+ (Monad m)
+#endif
+ => GraphM m gr where
{-# MINIMAL emptyM, isEmptyM, matchM, mkGraphM, labNodesM #-}
emptyM :: m (gr a b)
diff --git a/fgl.cabal b/fgl.cabal
index 4251a21..4b2a039 100644
--- a/fgl.cabal
+++ b/fgl.cabal
@@ -18,7 +18,8 @@ extra-source-files:
ChangeLog
tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
- GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
+ GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2,
+ GHC == 8.4.3, GHC == 8.6.1
source-repository head
type: git