Merge branch master into staging

This commit is contained in:
Eric Seidel
2015-04-06 18:58:08 -07:00
430 changed files with 8926 additions and 4887 deletions
@@ -26,16 +26,13 @@ self: super: {
hslua = super.hslua.override { lua = pkgs.lua5_1; };
# Use the default version of mysql to build this package (which is actually mariadb).
mysql = super.mysql.override { inherit (pkgs) mysql; };
mysql = super.mysql.override { mysql = pkgs.mysql.lib; };
# Please also remove optparse-applicative special case from
# cabal2nix/hackage2nix.hs when removing the following.
elm-make = super.elm-make.override { optparse-applicative = self.optparse-applicative_0_10_0; };
elm-package = super.elm-package.override { optparse-applicative = self.optparse-applicative_0_10_0; };
# https://github.com/acid-state/safecopy/issues/17
safecopy = dontCheck super.safecopy;
# Link the proper version.
zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; };
@@ -65,7 +62,25 @@ self: super: {
al = appendConfigureFlag super.al "--extra-include-dirs=${pkgs.openal}/include/AL";
# Depends on code distributed under a non-free license.
accelerate-cublas = dontDistribute super.accelerate-cublas;
accelerate-cuda = dontDistribute super.accelerate-cuda;
accelerate-cufft = dontDistribute super.accelerate-cufft;
accelerate-examples = dontDistribute super.accelerate-examples;
accelerate-fft = dontDistribute super.accelerate-fft;
accelerate-fourier-benchmark = dontDistribute super.accelerate-fourier-benchmark;
AttoJson = markBroken super.AttoJson;
bindings-yices = dontDistribute super.bindings-yices;
cublas = dontDistribute super.cublas;
cufft = dontDistribute super.cufft;
gloss-accelerate = dontDistribute super.gloss-accelerate;
gloss-raster-accelerate = dontDistribute super.gloss-raster-accelerate;
GoogleTranslate = dontDistribute super.GoogleTranslate;
GoogleDirections = dontDistribute super.GoogleDirections;
libnvvm = dontDistribute super.libnvvm;
manatee-all = dontDistribute super.manatee-all;
manatee-ircclient = dontDistribute super.manatee-ircclient;
Obsidian = dontDistribute super.Obsidian;
patch-image = dontDistribute super.patch-image;
yices = dontDistribute super.yices;
yices-easy = dontDistribute super.yices-easy;
yices-painless = dontDistribute super.yices-painless;
@@ -97,8 +112,10 @@ self: super: {
# Cannot compile its own test suite: https://github.com/haskell/network-uri/issues/10.
network-uri = dontCheck super.network-uri;
# Agda-2.4.2.2 needs these overrides to compile.
Agda = super.Agda.override { equivalence = self.equivalence_0_2_5; cpphs = self.cpphs_1_18_9; };
# The Haddock phase fails for one reason or another.
Agda = dontHaddock super.Agda;
attoparsec-conduit = dontHaddock super.attoparsec-conduit;
blaze-builder-conduit = dontHaddock super.blaze-builder-conduit;
bytestring-progress = dontHaddock super.bytestring-progress;
@@ -170,15 +187,16 @@ self: super: {
'';
});
# Does not compile: <http://hydra.cryp.to/build/469842/nixlog/1/raw>.
base_4_7_0_2 = markBroken super.base_4_7_0_2;
# Does not compile: "fatal error: ieee-flpt.h: No such file or directory"
base_4_8_0_0 = markBroken super.base_4_8_0_0;
# Obsolete: https://github.com/massysett/prednote/issues/1.
prednote-test = markBrokenVersion "0.26.0.4" super.prednote-test;
# Doesn't compile: <http://hydra.cryp.to/build/465891/nixlog/1/raw>.
integer-gmp_0_5_1_0 = markBroken super.integer-gmp_0_5_1_0;
# Doesn't compile: "Setup: can't find include file ghc-gmp.h"
integer-gmp_1_0_0_0 = markBroken super.integer-gmp_1_0_0_0;
# Obsolete.
lushtags = markBrokenVersion "0.0.1" super.lushtags;
# https://github.com/haskell/bytestring/issues/41
@@ -197,6 +215,13 @@ self: super: {
glib = addBuildDepends super.glib [pkgs.pkgconfig pkgs.glib];
gtk3 = super.gtk3.override { inherit (pkgs) gtk3; };
gtk = addBuildDepends super.gtk [pkgs.pkgconfig pkgs.gtk];
gtksourceview3 = super.gtksourceview3.override { inherit (pkgs.gnome3) gtksourceview; };
# Need WebkitGTK, not just webkit.
webkit = super.webkit.override { webkit = pkgs.webkitgtk24x; };
webkitgtk3 = super.webkitgtk3.override { webkit = pkgs.webkitgtk24x; };
webkitgtk3-javascriptcore = super.webkitgtk3-javascriptcore.override { webkit = pkgs.webkitgtk24x; };
websnap = super.websnap.override { webkit = pkgs.webkitgtk24x; };
# https://github.com/jgm/zip-archive/issues/21
zip-archive = addBuildTool super.zip-archive pkgs.zip;
@@ -237,6 +262,7 @@ self: super: {
hakyll = dontCheck super.hakyll;
Hclip = dontCheck super.Hclip;
HList = dontCheck super.HList;
marquise = dontCheck super.marquise; # https://github.com/anchor/marquise/issues/69
memcached-binary = dontCheck super.memcached-binary;
persistent-zookeeper = dontCheck super.persistent-zookeeper;
pocket-dns = dontCheck super.pocket-dns;
@@ -430,15 +456,26 @@ self: super: {
# https://github.com/bos/snappy/issues/1
snappy = dontCheck super.snappy;
# Needs llvm to compile.
bytestring-arbitrary = addBuildTool super.bytestring-arbitrary self.llvm;
# Expect to find sendmail(1) in $PATH.
mime-mail = appendConfigureFlag super.mime-mail "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\"";
# Help the test suite find system timezone data.
tz = overrideCabal super.tz (drv: { preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo"; });
# Deprecated upstream and doesn't compile.
BASIC = dontDistribute super.BASIC;
bytestring-arbitrary = dontDistribute (addBuildTool super.bytestring-arbitrary self.llvm);
llvm = dontDistribute super.llvm;
llvm-base = markBroken super.llvm-base;
llvm-base-util = dontDistribute super.llvm-base-util;
llvm-extra = dontDistribute super.llvm-extra;
llvm-tf = dontDistribute super.llvm-tf;
objectid = dontDistribute super.objectid;
saltine-quickcheck = dontDistribute super.saltine-quickcheck;
stable-tree = dontDistribute super.stable-tree;
synthesizer-llvm = dontDistribute super.synthesizer-llvm;
optimal-blocks = dontDistribute super.optimal-blocks;
# https://ghc.haskell.org/trac/ghc/ticket/9625
vty = dontCheck super.vty;
@@ -577,6 +614,8 @@ self: super: {
# Build fails, but there seems to be no issue tracker available. :-(
hmidi = markBrokenVersion "0.2.1.0" super.hmidi;
padKONTROL = markBroken super.padKONTROL;
Bang = dontDistribute super.Bang;
launchpad-control = dontDistribute super.launchpad-control;
# Upstream provides no issue tracker and no contact details.
vivid = markBroken super.vivid;
@@ -584,6 +623,12 @@ self: super: {
# Test suite wants to connect to $DISPLAY.
hsqml = dontCheck (super.hsqml.override { qt5 = pkgs.qt53; });
# https://github.com/lookunder/RedmineHs/issues/4
Redmine = markBroken super.Redmine;
# HsColour: Language/Unlambda.hs: hGetContents: invalid argument (invalid byte sequence)
unlambda = dontHyperlinkSource super.unlambda;
# https://github.com/megantti/rtorrent-rpc/issues/1
rtorrent-rpc = markBroken super.rtorrent-rpc;
@@ -596,6 +641,9 @@ self: super: {
# https://github.com/junjihashimoto/test-sandbox-compose/issues/2
test-sandbox-compose = dontCheck super.test-sandbox-compose;
# https://github.com/jgm/pandoc/issues/2045
pandoc = dontCheck super.pandoc;
# Broken by GLUT update.
Monadius = markBroken super.Monadius;
@@ -603,10 +651,6 @@ self: super: {
haroonga = markBroken super.haroonga;
haroonga-httpd = markBroken super.haroonga-httpd;
# Cannot find pkg-config data for "webkit-1.0".
webkit = markBroken super.webkit;
websnap = markBroken super.websnap;
# Build is broken and no contact info available.
hopenpgp-tools = markBroken super.hopenpgp-tools;
@@ -629,6 +673,7 @@ self: super: {
# https://github.com/meteficha/Hipmunk/issues/8
Hipmunk = markBroken super.Hipmunk;
HipmunkPlayground = dontDistribute super.HipmunkPlayground;
click-clack = dontDistribute super.click-clack;
# https://github.com/prowdsponsor/esqueleto/issues/93
esqueleto = dontCheck super.esqueleto;
@@ -639,11 +684,6 @@ self: super: {
# https://github.com/fumieval/audiovisual/issues/1
audiovisual = markBroken super.audiovisual;
# https://github.com/cdupont/Nomyx/issues/85
Nomyx-Core = markBroken super.Nomyx-Core;
Nomyx-Web = dontDistribute super.Nomyx-Web;
Nomyx = dontDistribute super.Nomyx;
# https://github.com/alephcloud/hs-stm-queue-extras/issues/2
stm-queue-extras = overrideCabal super.stm-queue-extras (drv: { editedCabalFile = null; });
@@ -652,6 +692,28 @@ self: super: {
postUnpack = "rm -v ${drv.pname}-${drv.version}/Setup.hs";
});
# https://github.com/haskell/haddock/issues/378
haddock-library = dontCheck super.haddock-library;
# Already fixed in upstream darcs repo.
xmonad-contrib = overrideCabal super.xmonad-contrib (drv: {
patchPhase = ''
sed -i -e '24iimport Control.Applicative' XMonad/Util/Invisible.hs
sed -i -e '22iimport Control.Applicative' XMonad/Hooks/DebugEvents.hs
'';
});
# https://github.com/anton-k/csound-expression-dynamic/issues/1
csound-expression-dynamic = dontHaddock super.csound-expression-dynamic;
# Hardcoded include path
poppler = overrideCabal super.poppler (drv: {
patchPhase = ''
sed -i -e 's,glib/poppler.h,poppler.h,' poppler.cabal
sed -i -e 's,glib/poppler.h,poppler.h,' Graphics/UI/Gtk/Poppler/Structs.hsc
'';
});
} // {
# Not on Hackage.
@@ -660,8 +722,8 @@ self: super: {
version = "20150318";
src = pkgs.fetchgit {
url = "http://github.com/NixOS/cabal2nix.git";
rev = "d131b2b2db1bc37a10bbc40c3adea3f006633a5e";
sha256 = "0s92mdkgjqkqby6b1lrxs5dh9ja49sj5jpdc56g5v8g03h3g9m0a";
rev = "b56cc6de2c4900fb0d1dc3617591a2f536aca60d";
sha256 = "0pza9j3x1mfjqrzcqq6ndg0jiqx85mg0sw8n9fmq18fk5g4hzhis";
deepClone = true;
};
isLibrary = false;
@@ -33,6 +33,107 @@ self: super: {
unix = null;
xhtml = null;
# should be fixed in versions > 0.6
pandoc-citeproc = overrideCabal super.pandoc-citeproc (drv: {
patches = [
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/4e4f9c2.patch";
sha256 = "18b08k56g5q4zz6jxczkrddblyn52vmd0811n1icfdpzqhgykn4p";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/34cc147.patch";
sha256 = "09vrdvg5w14qckn154zlxvk6i2ikmmhpsl9mxycxkql3rl4dqam3";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/8242c70.patch";
sha256 = "1lqpwxzz2www81w4mym75z36bsavqfj67hyvzn20ffvxq42yw7ry";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/e59f88d.patch";
sha256 = "05699hj3qa2vrfdnikj7rzmc2ajrkd7p8yd4cjlhmqq9asq90xzb";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/ae6ca86.patch";
sha256 = "19cag39k5s7iqagpvss9c2ny5g0lwnrawaqcc0labihc1a181k8l";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/f5a9fc7.patch";
sha256 = "08lsinh3mkjpz3cqj5i1vcnzkyl07jp38qcjcwcw7m2b7gsjbpvm";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc-citeproc/commit/780a554.patch";
sha256 = "1kfn0mcp3vp32c9w8gyz0p0jv0xn90as9mxm8a2lmjng52jlzvy4";
})
];
});
# should be fixed in versions > 1.13.2
pandoc = overrideCabal super.pandoc (drv: {
patches = [
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/693f9ab.patch";
sha256 = "1niyrigs47ia1bhk6yrnzf0sq7hz5b7xisc8ph42wkp5sl8x9h1y";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/9c68017.patch";
sha256 = "0zccb6l5vmfyq7p8ii88fgggfhrff32hj43f5pp3w88l479f1qlh";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/dbe1b38.patch";
sha256 = "0d80692liyjx2y56w07k23adjcxb57w6vzcylmc4cfswzy8agrgy";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/5ea3856.patch";
sha256 = "1z15lc0ix9fv278v1xmfw3a6gl85ydahgs8kz61sfvh4jdiacabw";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/c80c9ac.patch";
sha256 = "0fk3j53zx0x88jmh0ism0aghs2w5qf87zcp9cwbfcgg5izh3b344";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/8b9bded.patch";
sha256 = "0f1dh1jmhq55mlv4dawvx3ck330y82qmys06bfkqcpl0jsyd9x1a";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/e4c7894.patch";
sha256 = "1rfdaq6swrl3m9bmbf6yhqq57kv3l3f4927xya3zq29dpvkmmi4z";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/2a6f68f.patch";
sha256 = "0sbh2x9jqvis9ln8r2dr6ihkjdn480mjskm4ny91870vg852228c";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/4e3281c.patch";
sha256 = "0zafhxxijli2mf1h0j7shp7kd7fxqbvlswm1m8ikax3aknvjxymi";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/cd5b1fe.patch";
sha256 = "0nxq7c0gpdiycgdrcj3llbfwxdni6k7hqqniwsbn2ha3h03i8hg1";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/ed7606d.patch";
sha256 = "0gchm46ziyj7vw6ibn3kk49cjzsc78z2lm8k7892g79q2livlc1f";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/b748833.patch";
sha256 = "03gj4qn9c5zyqrxyrw4xh21xlvbx9rbvw6gh8msgf5xk53ibs68b";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/10d5398.patch";
sha256 = "1nhp5b07vywk917bfap6pzahhqnwvvlbbfg5336a2nvb0c8iq6ih";
})
(pkgs.fetchpatch {
url = "https://github.com/jgm/pandoc/commit/f18ceb1.patch";
sha256 = "1vxsy5fn4nscvim9wcx1n78q7yh05x0z8p812csi3v3z79lbabhq";
})
];
# jailbreak-cabal omits part of the file
# https://github.com/peti/jailbreak-cabal/issues/9
postPatch = ''
sed -i '420i\ \ \ \ \ \ \ \ \ \ \ \ buildable: False' pandoc.cabal
'';
});
# Cabal_1_22_1_1 requires filepath >=1 && <1.4
cabal-install = dontCheck (super.cabal-install.override { Cabal = null; });
@@ -107,7 +208,6 @@ self: super: {
# but refused to do anything about it because he "doesn't want to
# support a moving target". Go figure.
barecheck = doJailbreak super.barecheck;
cartel = overrideCabal super.cartel (drv: { doCheck = false; patchPhase = "sed -i -e 's|base >= .*|base|' cartel.cabal"; });
syb-with-class = appendPatch super.syb-with-class (pkgs.fetchpatch {
url = "https://github.com/seereason/syb-with-class/compare/adc86a9...719e567.patch";
@@ -132,19 +232,6 @@ self: super: {
haskell-src-meta = overrideCabal (doJailbreak (appendPatch super.haskell-src-meta ./haskell-src-meta-ghc710.patch)) (drv: {
prePatch = "sed -i -e 's|template-haskell [^,]\\+|template-haskell|' haskell-src-meta.cabal && cat haskell-src-meta.cabal";
});
foldl = appendPatch super.foldl (pkgs.fetchpatch {
url = "https://github.com/Gabriel439/Haskell-Foldl-Library/pull/30.patch";
sha256 = "0q4gs3xkazh644ff7qn2mp2q1nq3jq71x82g7iaacxclkiv0bphx";
});
persistent-template = appendPatch super.persistent-template (pkgs.fetchpatch {
url = "https://github.com/yesodweb/persistent/commit/4d34960bc421ec0aa353d69fbb3eb0c73585db97.patch";
sha256 = "1gphl0v87y2fjwkwp6j0bnksd0d9dr4pis6aw97rij477bm5mrvw";
stripLen = 1;
});
stringsearch = appendPatch super.stringsearch (pkgs.fetchpatch {
url = "https://bitbucket.org/api/2.0/repositories/dafis/stringsearch/pullrequests/3/patch";
sha256 = "1j2a327m3bjl8k4dipc52nlh2ilg94gdcj9hdmdq62yh2drslvgx";
});
mono-traversable = appendPatch super.mono-traversable (pkgs.fetchpatch {
url = "https://github.com/snoyberg/mono-traversable/pull/68.patch";
sha256 = "11hqf6hi3sc34wl0fn4rpigdf7wfklcjv6jwp8c3129yphg8687h";
@@ -153,14 +240,9 @@ self: super: {
url = "https://github.com/fpco/conduit-combinators/pull/16.patch";
sha256 = "0jpwpi3shdn5rms3lcr4srajbhhfp5dbwy7pl23c9kmlil3d9mk3";
});
wai-extra = appendPatch super.wai-extra (pkgs.fetchpatch {
url = "https://github.com/yesodweb/wai/pull/339.patch";
sha256 = "1rmz1ijfch143v7jg4d5r50lqq9r46zhcmdafq8p9g9pjxlyc590";
stripLen = 1;
});
yesod-auth = appendPatch super.yesod-auth (pkgs.fetchpatch {
url = "https://github.com/yesodweb/yesod/pull/941.patch";
sha256 = "1fycvjfr1l9wa03k30bnppl3ns99lffh9kmp9r7sr8b6yiydcajq";
yesod-bin = appendPatch super.yesod-bin (pkgs.fetchpatch {
url = "https://github.com/yesodweb/yesod/pull/966.patch";
sha256 = "0mm4swyn7qh30hw7ya8ykz5qvsd4ni4vmipq364yqbsi9ysrc6nb";
stripLen = 1;
});
@@ -70,4 +70,7 @@ self: super: {
contravariant = addBuildDepend super.contravariant self.tagged;
reflection = dontHaddock (addBuildDepend super.reflection self.tagged);
# The compat library is empty in the presence of mtl 2.2.x.
mtl-compat = dontHaddock super.mtl-compat;
}
@@ -43,15 +43,20 @@ self: super: {
# Configure build for mtl 2.1.x.
mtl-compat = addBuildDepend (enableCabalFlag super.mtl-compat "two-point-one") self.transformers-compat;
# haddock-api 2.16 requires ghc>=7.10
haddock-api = super.haddock-api_2_15_0_2;
# Idris requires mtl 2.2.x.
idris = overrideCabal (super.idris.overrideScope (self: super: {
mkDerivation = drv: super.mkDerivation (drv // { doCheck = false; });
blaze-markup = self.blaze-markup_0_6_2_0;
blaze-html = self.blaze-html_0_7_0_3;
haskeline = self.haskeline_0_7_2_1;
lens = self.lens_4_7_0_1;
mtl = super.mtl_2_2_1;
transformers = super.transformers_0_4_3_0;
transformers-compat = disableCabalFlag super.transformers-compat "three";
haskeline = self.haskeline_0_7_2_1;
mtl = super.mtl_2_2_1;
})) (drv: {
jailbreak = true; # idris is scared of lens 4.7
patchPhase = "find . -name '*.hs' -exec sed -i -s 's|-Werror||' {} +";
}); # warning: "Module Control.Monad.Error is deprecated"
@@ -66,12 +71,15 @@ self: super: {
# Newer versions require mtl 2.2.x.
mtl-prelude = self.mtl-prelude_1_0_3;
equivalence = super.equivalence_0_2_5; # required by Agda
# The test suite pulls in mtl 2.2.x
command-qq = dontCheck super.command-qq;
# Doesn't support GHC < 7.10.x.
bound-gen = dontDistribute super.bound-gen;
ghc-exactprint = dontDistribute super.ghc-exactprint;
ghc-typelits-natnormalise = dontDistribute super.ghc-typelits-natnormalise;
# Newer versions require transformers 0.4.x.
seqid = super.seqid_0_1_0;
@@ -101,4 +109,7 @@ self: super: {
wai-middleware-preprocessor = dontCheck super.wai-middleware-preprocessor;
incremental-computing = dontCheck super.incremental-computing;
# Newer versions require base > 4.7
gloss = super.gloss_1_9_2_1;
}
@@ -55,8 +55,9 @@ let
isGhcjs = ghc.isGhcjs or false;
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
newCabalFile = fetchurl {
url = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
url = newCabalFileUrl;
sha256 = editedCabalFile;
name = "${pname}-${version}-r${revision}.cabal";
};
@@ -71,7 +72,7 @@ let
hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
enableParallelBuilding = versionOlder "7.8" ghc.version && !hasActiveLibrary;
enableParallelBuilding = versionOlder "7.10" ghc.version || (versionOlder "7.8" ghc.version && !hasActiveLibrary);
defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
@@ -134,17 +135,17 @@ stdenv.mkDerivation ({
LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase.
prePatch = optionalString (editedCabalFile != null) ''
echo "Replacing Cabal file with edited version ${newCabalFile}."
echo "Replace Cabal file with edited version from ${newCabalFileUrl}."
cp ${newCabalFile} ${pname}.cabal
'' + optionalString jailbreak ''
echo "Running jailbreak-cabal to lift version restrictions on build inputs."
echo "Run jailbreak-cabal to lift version restrictions on build inputs."
${jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal
'' + prePatch;
setupCompilerEnvironmentPhase = ''
runHook preSetupCompilerEnvironment
echo "Building with ${ghc}."
echo "Build with ${ghc}."
export PATH="${ghc}/bin:$PATH"
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
@@ -266,12 +267,6 @@ stdenv.mkDerivation ({
export NIX_GHC_DOCDIR="${ghcEnv}/share/doc/ghc/html"
export NIX_GHC_LIBDIR="${ghcEnv}/lib/${ghcEnv.name}"
'';
buildCommand = ''
echo >&2 ""
echo >&2 "*** Haskell 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
echo >&2 ""
exit 1
'';
};
};
File diff suppressed because it is too large Load Diff
+3
View File
@@ -55,4 +55,7 @@ rec {
appendPatch = drv: x: appendPatches drv [x];
appendPatches = drv: xs: overrideCabal drv (drv: { patches = (drv.patches or []) ++ xs; });
doHyperlinkSource = drv: overrideCabal drv (drv: { hyperlinkSource = true; });
dontHyperlinkSource = drv: overrideCabal drv (drv: { hyperlinkSource = false; });
}
@@ -1,11 +1,9 @@
{ stdenv, ghc, llvmPackages, packages, buildEnv
{ stdenv, lib, ghc, llvmPackages, packages, buildEnv
, makeWrapper
, ignoreCollisions ? false, withLLVM ? false }:
with stdenv.lib;
# This wrapper works only with GHC 6.12 or later.
assert versionOlder "6.12" ghc.version;
assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs;
# It's probably a good idea to include the library "ghc-paths" in the
# compiler environment, because we have a specially patched version of
@@ -30,19 +28,19 @@ assert versionOlder "6.12" ghc.version;
let
isGhcjs = ghc.isGhcjs or false;
ghc761OrLater = isGhcjs || versionOlder "7.6.1" ghc.version;
ghc761OrLater = isGhcjs || lib.versionOlder "7.6.1" ghc.version;
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
ghcCommand = if isGhcjs then "ghcjs" else "ghc";
libDir = "$out/lib/${ghcCommand}-${ghc.version}";
docDir = "$out/share/doc/ghc/html";
packageCfgDir = "${libDir}/package.conf.d";
paths = filter (x: x ? isHaskellLibrary) (closePropagation packages);
hasLibraries = any (x: x.isHaskellLibrary) paths;
paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
hasLibraries = lib.any (x: x.isHaskellLibrary) paths;
# CLang is needed on Darwin for -fllvm to work:
# https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html
llvm = makeSearchPath "bin"
llvm = lib.makeSearchPath "bin"
([ llvmPackages.llvm ]
++ optional stdenv.isDarwin llvmPackages.clang);
++ lib.optional stdenv.isDarwin llvmPackages.clang);
in
if paths == [] && !withLLVM then ghc else
buildEnv {
@@ -52,7 +50,7 @@ buildEnv {
postBuild = ''
. ${makeWrapper}/nix-support/setup-hook
${optionalString isGhcjs ''
${lib.optionalString isGhcjs ''
cp -r "${ghc}/${ghc.libDir}/"* ${libDir}/
''}
@@ -71,7 +69,7 @@ buildEnv {
--set "NIX_GHCPKG" "$out/bin/${ghcCommand}-pkg" \
--set "NIX_GHC_DOCDIR" "${docDir}" \
--set "NIX_GHC_LIBDIR" "${libDir}" \
${optionalString withLLVM ''--prefix "PATH" ":" "${llvm}"''}
${lib.optionalString withLLVM ''--prefix "PATH" ":" "${llvm}"''}
done
for prg in runghc runhaskell; do
@@ -89,7 +87,7 @@ buildEnv {
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
done
${optionalString hasLibraries "$out/bin/${ghcCommand}-pkg recache"}
${lib.optionalString hasLibraries "$out/bin/${ghcCommand}-pkg recache"}
$out/bin/${ghcCommand}-pkg check
'';
} // {