2017-02-02 15:49:28 +00:00
|
|
|
|
# NIX-SPECIFIC OVERRIDES/PATCHES FOR HASKELL PACKAGES
|
|
|
|
|
#
|
|
|
|
|
# This file contains overrides which are needed because of Nix. For example,
|
|
|
|
|
# some packages may need help finding the location of native libraries. In
|
|
|
|
|
# general, overrides in this file are (mostly) due to one of the following reasons:
|
|
|
|
|
#
|
|
|
|
|
# * packages that hard code the location of native libraries, so they need to be patched/
|
|
|
|
|
# supplied the patch explicitly
|
|
|
|
|
# * passing native libraries that are not detected correctly by cabal2nix
|
|
|
|
|
# * test suites that fail due to some features not available in the nix sandbox
|
|
|
|
|
# (networking being a common one)
|
|
|
|
|
#
|
|
|
|
|
# In general, this file should *not* contain overrides that fix build failures that could
|
|
|
|
|
# also occur on standard, FHS-compliant non-Nix systems. For example, if tests have a compile
|
|
|
|
|
# error, that is a bug in the package, and that failure has nothing to do with Nix.
|
|
|
|
|
#
|
|
|
|
|
# Common examples which should *not* be a part of this file:
|
|
|
|
|
#
|
|
|
|
|
# * overriding a specific version of a haskell library because some package fails
|
|
|
|
|
# to build with a newer version. Such overrides have nothing to do with Nix itself,
|
|
|
|
|
# and they would also be neccessary outside of Nix if you use the same set of
|
|
|
|
|
# package versions.
|
|
|
|
|
# * disabling tests that fail due to missing files in the tarball or compile errors
|
|
|
|
|
# * disabling tests that require too much memory
|
|
|
|
|
# * enabling/disabling certain features in packages
|
|
|
|
|
#
|
|
|
|
|
# If you have an override of this kind, see configuration-common.nix instead.
|
2017-08-01 17:44:08 +01:00
|
|
|
|
{ pkgs, haskellLib }:
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
2017-08-01 17:44:08 +01:00
|
|
|
|
with haskellLib;
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
2017-03-12 21:45:19 +00:00
|
|
|
|
# All of the overrides in this set should look like:
|
|
|
|
|
#
|
|
|
|
|
# foo = ... something involving super.foo ...
|
|
|
|
|
#
|
2017-03-12 21:47:28 +00:00
|
|
|
|
# but that means that we add `foo` attribute even if there is no `super.foo`! So if
|
2017-03-12 21:45:19 +00:00
|
|
|
|
# you want to use this configuration for a package set that only contains a subset of
|
|
|
|
|
# the packages that have overrides defined here, you'll end up with a set that contains
|
|
|
|
|
# a bunch of attributes that trigger an evaluation error.
|
|
|
|
|
#
|
|
|
|
|
# To avoid this, we use `intersectAttrs` here so we never add packages that are not present
|
|
|
|
|
# in the parent package set (`super`).
|
2017-02-02 15:49:28 +00:00
|
|
|
|
self: super: builtins.intersectAttrs super {
|
|
|
|
|
|
|
|
|
|
# Apply NixOS-specific patches.
|
|
|
|
|
ghc-paths = appendPatch super.ghc-paths ./patches/ghc-paths-nix.patch;
|
|
|
|
|
|
|
|
|
|
# fix errors caused by hardening flags
|
|
|
|
|
epanet-haskell = disableHardening super.epanet-haskell ["format"];
|
|
|
|
|
|
|
|
|
|
# Link the proper version.
|
|
|
|
|
zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; };
|
|
|
|
|
|
|
|
|
|
# Use the default version of mysql to build this package (which is actually mariadb).
|
|
|
|
|
# test phase requires networking
|
2019-09-22 08:38:09 +01:00
|
|
|
|
mysql = dontCheck (super.mysql.override { mysql = pkgs.libmysqlclient; });
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
# CUDA needs help finding the SDK headers and libraries.
|
|
|
|
|
cuda = overrideCabal super.cuda (drv: {
|
|
|
|
|
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
|
2018-03-09 07:33:28 +00:00
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib"
|
2017-02-02 15:49:28 +00:00
|
|
|
|
"--extra-include-dirs=${pkgs.cudatoolkit}/include"
|
|
|
|
|
];
|
|
|
|
|
preConfigure = ''
|
2017-07-24 16:39:53 +01:00
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
nvvm = overrideCabal super.nvvm (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
cufft = overrideCabal super.cufft (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
2017-02-02 15:49:28 +00:00
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# jni needs help finding libjvm.so because it's in a weird location.
|
|
|
|
|
jni = overrideCabal super.jni (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" )
|
|
|
|
|
configureFlags+=" --extra-lib-dir=''${libdir[0]}"
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# The package doesn't know about the AL include hierarchy.
|
|
|
|
|
# https://github.com/phaazon/al/issues/1
|
|
|
|
|
al = appendConfigureFlag super.al "--extra-include-dirs=${pkgs.openal}/include/AL";
|
|
|
|
|
|
|
|
|
|
# Won't find it's header files without help.
|
|
|
|
|
sfml-audio = appendConfigureFlag super.sfml-audio "--extra-include-dirs=${pkgs.openal}/include/AL";
|
|
|
|
|
|
2019-10-03 09:08:42 +01:00
|
|
|
|
# profiling is disabled to allow C++/C mess to work, which is fixed in GHC 8.8
|
2019-10-03 09:52:06 +01:00
|
|
|
|
cachix = disableLibraryProfiling super.cachix;
|
2019-09-29 08:52:11 +01:00
|
|
|
|
|
2019-10-13 08:31:45 +01:00
|
|
|
|
# avoid compiling twice by providing executable as a separate output (with small closure size)
|
2019-09-29 08:52:11 +01:00
|
|
|
|
niv = enableSeparateBinOutput super.niv;
|
2019-10-13 08:31:45 +01:00
|
|
|
|
ormolu = enableSeparateBinOutput super.ormolu;
|
|
|
|
|
ghcid = enableSeparateBinOutput super.ghcid;
|
2019-09-09 08:52:08 +01:00
|
|
|
|
|
2019-10-05 20:44:09 +01:00
|
|
|
|
# Ensure the necessary frameworks for Darwin.
|
|
|
|
|
OpenAL = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addExtraLibrary super.OpenAL pkgs.darwin.apple_sdk.frameworks.OpenAL
|
|
|
|
|
else super.OpenAL;
|
|
|
|
|
|
2019-10-01 06:06:54 +01:00
|
|
|
|
# Ensure the necessary frameworks for Darwin.
|
|
|
|
|
proteaaudio = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addExtraLibrary super.proteaaudio pkgs.darwin.apple_sdk.frameworks.AudioToolbox
|
|
|
|
|
else super.proteaaudio;
|
|
|
|
|
|
2019-03-29 08:10:54 +00:00
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
hzk = overrideCabal super.hzk (drv: {
|
|
|
|
|
preConfigure = "sed -i -e /include-dirs/d hzk.cabal";
|
2019-10-30 02:23:29 +00:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ];
|
2017-02-02 15:49:28 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
haskakafka = overrideCabal super.haskakafka (drv: {
|
|
|
|
|
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal";
|
2019-10-30 02:23:29 +00:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
|
2017-09-08 12:31:02 +01:00
|
|
|
|
});
|
|
|
|
|
|
2017-09-08 13:45:56 +01:00
|
|
|
|
# library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32
|
2017-09-08 13:08:26 +01:00
|
|
|
|
hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: {
|
2017-09-08 12:31:02 +01:00
|
|
|
|
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal";
|
2019-10-30 02:23:29 +00:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
|
2017-09-08 13:08:26 +01:00
|
|
|
|
}));
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
# Foreign dependency name clashes with another Haskell package.
|
|
|
|
|
libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; };
|
|
|
|
|
|
|
|
|
|
# Fix Darwin build.
|
|
|
|
|
halive = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addBuildDepend super.halive pkgs.darwin.apple_sdk.frameworks.AppKit
|
|
|
|
|
else super.halive;
|
|
|
|
|
|
|
|
|
|
# Heist's test suite requires system pandoc
|
|
|
|
|
heist = overrideCabal super.heist (drv: {
|
|
|
|
|
testToolDepends = [pkgs.pandoc];
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# the system-fileio tests use canonicalizePath, which fails in the sandbox
|
|
|
|
|
system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio;
|
|
|
|
|
|
2019-05-12 17:00:00 +01:00
|
|
|
|
# Prevents needing to add `security_tool` as a run-time dependency for
|
|
|
|
|
# everything using x509-system to give access to the `security` executable.
|
|
|
|
|
x509-system =
|
|
|
|
|
if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc
|
|
|
|
|
then
|
|
|
|
|
# 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 I’m hoping to
|
|
|
|
|
# get a proper fix available soonish.
|
|
|
|
|
overrideCabal super.x509-system (drv: {
|
|
|
|
|
postPatch = (drv.postPatch or "") + ''
|
|
|
|
|
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
|
|
|
|
|
'';
|
|
|
|
|
})
|
|
|
|
|
else super.x509-system;
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
|
2018-07-09 17:22:23 +01:00
|
|
|
|
gio = disableHardening (addPkgconfigDepend (addBuildTool super.gio self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];
|
|
|
|
|
glib = disableHardening (addPkgconfigDepend (addBuildTool super.glib self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];
|
2017-02-02 15:49:28 +00:00
|
|
|
|
gtk3 = disableHardening (super.gtk3.override { inherit (pkgs) gtk3; }) ["fortify"];
|
2019-10-07 13:09:43 +01:00
|
|
|
|
gtk = let gtk1 = addBuildTool super.gtk self.buildHaskellPackages.gtk2hs-buildtools;
|
|
|
|
|
gtk2 = addPkgconfigDepend gtk1 pkgs.gtk2;
|
|
|
|
|
gtk3 = disableHardening gtk1 ["fortify"];
|
|
|
|
|
gtk4 = if pkgs.stdenv.isDarwin then appendConfigureFlag gtk3 "-fhave-quartz-gtk" else gtk4;
|
|
|
|
|
in gtk3;
|
2017-04-21 14:55:56 +01:00
|
|
|
|
gtksourceview2 = addPkgconfigDepend super.gtksourceview2 pkgs.gtk2;
|
2018-04-05 00:27:01 +01:00
|
|
|
|
gtk-traymanager = addPkgconfigDepend super.gtk-traymanager pkgs.gtk3;
|
2018-06-06 01:53:06 +01:00
|
|
|
|
|
2018-06-06 01:52:05 +01:00
|
|
|
|
# Add necessary reference to gtk3 package
|
|
|
|
|
gi-dbusmenugtk3 = addPkgconfigDepend super.gi-dbusmenugtk3 pkgs.gtk3;
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# Need WebkitGTK, not just webkit.
|
2017-05-26 14:43:25 +01:00
|
|
|
|
webkit = super.webkit.override { webkit = pkgs.webkitgtk24x-gtk2; };
|
|
|
|
|
websnap = super.websnap.override { webkit = pkgs.webkitgtk24x-gtk3; };
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
hs-mesos = overrideCabal super.hs-mesos (drv: {
|
|
|
|
|
# Pass _only_ mesos; the correct protobuf is propagated.
|
|
|
|
|
extraLibraries = [ pkgs.mesos ];
|
|
|
|
|
preConfigure = "sed -i -e /extra-lib-dirs/d -e 's|, /usr/include, /usr/local/include/mesos||' hs-mesos.cabal";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# These packages try to access the network.
|
|
|
|
|
amqp = dontCheck super.amqp;
|
|
|
|
|
amqp-conduit = dontCheck super.amqp-conduit;
|
|
|
|
|
bitcoin-api = dontCheck super.bitcoin-api;
|
|
|
|
|
bitcoin-api-extra = dontCheck super.bitcoin-api-extra;
|
|
|
|
|
bitx-bitcoin = dontCheck super.bitx-bitcoin; # http://hydra.cryp.to/build/926187/log/raw
|
|
|
|
|
concurrent-dns-cache = dontCheck super.concurrent-dns-cache;
|
|
|
|
|
digitalocean-kzs = dontCheck super.digitalocean-kzs; # https://github.com/KazumaSATO/digitalocean-kzs/issues/1
|
|
|
|
|
github-types = dontCheck super.github-types; # http://hydra.cryp.to/build/1114046/nixlog/1/raw
|
|
|
|
|
hadoop-rpc = dontCheck super.hadoop-rpc; # http://hydra.cryp.to/build/527461/nixlog/2/raw
|
|
|
|
|
hasql = dontCheck super.hasql; # http://hydra.cryp.to/build/502489/nixlog/4/raw
|
|
|
|
|
hasql-transaction = dontCheck super.hasql-transaction; # wants to connect to postgresql
|
|
|
|
|
hjsonschema = overrideCabal super.hjsonschema (drv: { testTarget = "local"; });
|
|
|
|
|
marmalade-upload = dontCheck super.marmalade-upload; # http://hydra.cryp.to/build/501904/nixlog/1/raw
|
|
|
|
|
mongoDB = dontCheck super.mongoDB;
|
|
|
|
|
network-transport-tcp = dontCheck super.network-transport-tcp;
|
|
|
|
|
network-transport-zeromq = dontCheck super.network-transport-zeromq; # https://github.com/tweag/network-transport-zeromq/issues/30
|
|
|
|
|
pipes-mongodb = dontCheck super.pipes-mongodb; # http://hydra.cryp.to/build/926195/log/raw
|
|
|
|
|
raven-haskell = dontCheck super.raven-haskell; # http://hydra.cryp.to/build/502053/log/raw
|
|
|
|
|
riak = dontCheck super.riak; # http://hydra.cryp.to/build/498763/log/raw
|
|
|
|
|
scotty-binding-play = dontCheck super.scotty-binding-play;
|
|
|
|
|
servant-router = dontCheck super.servant-router;
|
|
|
|
|
serversession-backend-redis = dontCheck super.serversession-backend-redis;
|
|
|
|
|
slack-api = dontCheck super.slack-api; # https://github.com/mpickering/slack-api/issues/5
|
|
|
|
|
socket = dontCheck super.socket;
|
|
|
|
|
stackage = dontCheck super.stackage; # http://hydra.cryp.to/build/501867/nixlog/1/raw
|
|
|
|
|
textocat-api = dontCheck super.textocat-api; # http://hydra.cryp.to/build/887011/log/raw
|
|
|
|
|
warp = dontCheck super.warp; # http://hydra.cryp.to/build/501073/nixlog/5/raw
|
|
|
|
|
wreq = dontCheck super.wreq; # http://hydra.cryp.to/build/501895/nixlog/1/raw
|
|
|
|
|
wreq-sb = dontCheck super.wreq-sb; # http://hydra.cryp.to/build/783948/log/raw
|
|
|
|
|
wuss = dontCheck super.wuss; # http://hydra.cryp.to/build/875964/nixlog/2/raw
|
2017-02-02 17:29:48 +00:00
|
|
|
|
download = dontCheck super.download;
|
2017-02-02 15:49:28 +00:00
|
|
|
|
http-client = dontCheck super.http-client;
|
|
|
|
|
http-client-openssl = dontCheck super.http-client-openssl;
|
|
|
|
|
http-client-tls = dontCheck super.http-client-tls;
|
|
|
|
|
http-conduit = dontCheck super.http-conduit;
|
|
|
|
|
transient-universe = dontCheck super.transient-universe;
|
2017-02-19 10:34:21 +00:00
|
|
|
|
typed-process = dontCheck super.typed-process;
|
|
|
|
|
js-jquery = dontCheck super.js-jquery;
|
|
|
|
|
hPDB-examples = dontCheck super.hPDB-examples;
|
|
|
|
|
configuration-tools = dontCheck super.configuration-tools; # https://github.com/alephcloud/hs-configuration-tools/issues/40
|
|
|
|
|
tcp-streams = dontCheck super.tcp-streams;
|
|
|
|
|
holy-project = dontCheck super.holy-project;
|
|
|
|
|
mustache = dontCheck super.mustache;
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
# Tries to mess with extended POSIX attributes, but can't in our chroot environment.
|
|
|
|
|
xattr = dontCheck super.xattr;
|
|
|
|
|
|
2018-04-08 22:27:03 +01:00
|
|
|
|
# Needs access to locale data, but looks for it in the wrong place.
|
2017-02-02 15:49:28 +00:00
|
|
|
|
scholdoc-citeproc = dontCheck super.scholdoc-citeproc;
|
|
|
|
|
|
2018-08-21 01:16:59 +01:00
|
|
|
|
# Disable tests because they require a mattermost server
|
|
|
|
|
mattermost-api = dontCheck super.mattermost-api;
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# 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"; });
|
|
|
|
|
|
|
|
|
|
# Nix-specific workaround
|
|
|
|
|
xmonad = appendPatch (dontCheck super.xmonad) ./patches/xmonad-nix.patch;
|
|
|
|
|
|
|
|
|
|
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
|
|
|
|
|
# http://hydra.cryp.to/build/1331287/log/raw
|
2017-12-05 08:36:08 +00:00
|
|
|
|
wxc = (addBuildDepend super.wxc self.split).override { wxGTK = pkgs.wxGTK30; };
|
2017-02-02 15:49:28 +00:00
|
|
|
|
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; };
|
|
|
|
|
|
|
|
|
|
# Test suite wants to connect to $DISPLAY.
|
2019-11-10 16:44:34 +00:00
|
|
|
|
hsqml = dontCheck (addExtraLibraries (super.hsqml.override { qt5 = pkgs.qt5Full; }) [pkgs.libGLU pkgs.libGL]);
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
# Tests attempt to use NPM to install from the network into
|
|
|
|
|
# /homeless-shelter. Disabled.
|
|
|
|
|
purescript = dontCheck super.purescript;
|
|
|
|
|
|
2017-09-26 18:00:13 +01:00
|
|
|
|
# https://github.com/haskell-foundation/foundation/pull/412
|
|
|
|
|
foundation =
|
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
|
then dontCheck super.foundation
|
|
|
|
|
else super.foundation;
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# Hardcoded include path
|
|
|
|
|
poppler = overrideCabal super.poppler (drv: {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# Uses OpenGL in testing
|
|
|
|
|
caramia = dontCheck super.caramia;
|
|
|
|
|
|
2018-08-04 20:41:04 +01:00
|
|
|
|
llvm-hs =
|
2020-03-26 07:29:23 +00:00
|
|
|
|
let llvmHsWithLlvm9 = super.llvm-hs.override { llvm-config = pkgs.llvm_9; };
|
2019-11-15 01:21:36 +00:00
|
|
|
|
in
|
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
|
then
|
2020-03-26 07:29:23 +00:00
|
|
|
|
overrideCabal llvmHsWithLlvm9 (oldAttrs: {
|
2019-11-15 01:21:36 +00:00
|
|
|
|
# One test fails on darwin.
|
|
|
|
|
doCheck = false;
|
|
|
|
|
# llvm-hs's Setup.hs file tries to add the lib/ directory from LLVM8 to
|
|
|
|
|
# the DYLD_LIBRARY_PATH environment variable. This messes up clang
|
|
|
|
|
# when called from GHC, probably because clang is version 7, but we are
|
|
|
|
|
# using LLVM8.
|
|
|
|
|
preCompileBuildDriver = oldAttrs.preCompileBuildDriver or "" + ''
|
|
|
|
|
substituteInPlace Setup.hs --replace "addToLdLibraryPath libDir" "pure ()"
|
|
|
|
|
'';
|
|
|
|
|
})
|
2020-03-26 07:29:23 +00:00
|
|
|
|
else llvmHsWithLlvm9;
|
2017-04-05 08:37:47 +01:00
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# Needs help finding LLVM.
|
|
|
|
|
spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm;
|
|
|
|
|
|
|
|
|
|
# Tries to run GUI in tests
|
|
|
|
|
leksah = dontCheck (overrideCabal super.leksah (drv: {
|
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [
|
2019-02-13 21:47:50 +00:00
|
|
|
|
gnome3.adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ...
|
2017-02-02 15:49:28 +00:00
|
|
|
|
wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system
|
|
|
|
|
gtk3 # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
|
|
|
|
|
]);
|
|
|
|
|
postPatch = (drv.postPatch or "") + ''
|
|
|
|
|
for f in src/IDE/Leksah.hs src/IDE/Utils/ServerConnection.hs
|
|
|
|
|
do
|
|
|
|
|
substituteInPlace "$f" --replace "\"leksah-server\"" "\"${self.leksah-server}/bin/leksah-server\""
|
|
|
|
|
done
|
|
|
|
|
'';
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
# Patch to consider NIX_GHC just like xmonad does
|
|
|
|
|
dyre = appendPatch super.dyre ./patches/dyre-nix.patch;
|
|
|
|
|
|
|
|
|
|
yesod-bin = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addBuildDepend super.yesod-bin pkgs.darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
|
else super.yesod-bin;
|
|
|
|
|
|
|
|
|
|
hmatrix = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addBuildDepend super.hmatrix pkgs.darwin.apple_sdk.frameworks.Accelerate
|
|
|
|
|
else super.hmatrix;
|
|
|
|
|
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/13
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/14
|
2018-07-09 17:22:23 +01:00
|
|
|
|
epic = addExtraLibraries (addBuildTool super.epic self.buildHaskellPackages.happy) [pkgs.boehmgc pkgs.gmp];
|
2017-02-02 15:49:28 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/ekmett/wl-pprint-terminfo/issues/7
|
|
|
|
|
wl-pprint-terminfo = addExtraLibrary super.wl-pprint-terminfo pkgs.ncurses;
|
|
|
|
|
|
|
|
|
|
# https://github.com/bos/pcap/issues/5
|
|
|
|
|
pcap = addExtraLibrary super.pcap pkgs.libpcap;
|
|
|
|
|
|
2019-01-04 08:13:36 +00:00
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/53336
|
|
|
|
|
greenclip = addExtraLibrary super.greenclip pkgs.xorg.libXdmcp;
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# The cabal files for these libraries do not list the required system dependencies.
|
|
|
|
|
miniball = overrideCabal super.miniball (drv: {
|
|
|
|
|
librarySystemDepends = [ pkgs.miniball ];
|
|
|
|
|
});
|
|
|
|
|
SDL-image = overrideCabal super.SDL-image (drv: {
|
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or [];
|
|
|
|
|
});
|
|
|
|
|
SDL-ttf = overrideCabal super.SDL-ttf (drv: {
|
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ];
|
|
|
|
|
});
|
|
|
|
|
SDL-mixer = overrideCabal super.SDL-mixer (drv: {
|
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ];
|
|
|
|
|
});
|
|
|
|
|
SDL-gfx = overrideCabal super.SDL-gfx (drv: {
|
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ];
|
|
|
|
|
});
|
|
|
|
|
SDL-mpeg = overrideCabal super.SDL-mpeg (drv: {
|
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.smpeg}/lib"
|
|
|
|
|
"--extra-include-dirs=${pkgs.smpeg}/include/smpeg"
|
|
|
|
|
];
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# https://github.com/ivanperez-keera/hcwiid/pull/4
|
|
|
|
|
hcwiid = overrideCabal super.hcwiid (drv: {
|
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.bluez.out}/lib"
|
|
|
|
|
"--extra-lib-dirs=${pkgs.cwiid}/lib"
|
|
|
|
|
"--extra-include-dirs=${pkgs.cwiid}/include"
|
|
|
|
|
"--extra-include-dirs=${pkgs.bluez.dev}/include"
|
|
|
|
|
];
|
|
|
|
|
prePatch = '' sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal" '';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# cabal2nix doesn't pick up some of the dependencies.
|
|
|
|
|
ginsu = let
|
|
|
|
|
g = addBuildDepend super.ginsu pkgs.perl;
|
|
|
|
|
g' = overrideCabal g (drv: {
|
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ [
|
|
|
|
|
pkgs.ncurses
|
|
|
|
|
];
|
|
|
|
|
});
|
|
|
|
|
in g';
|
|
|
|
|
|
|
|
|
|
# Tests require `docker` command in PATH
|
|
|
|
|
# Tests require running docker service :on localhost
|
|
|
|
|
docker = dontCheck super.docker;
|
|
|
|
|
|
|
|
|
|
# https://github.com/deech/fltkhs/issues/16
|
|
|
|
|
fltkhs = overrideCabal super.fltkhs (drv: {
|
|
|
|
|
libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.autoconf];
|
2018-02-24 12:06:44 +00:00
|
|
|
|
librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.fltk13 pkgs.libGL pkgs.libjpeg];
|
2017-02-02 15:49:28 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# https://github.com/skogsbaer/hscurses/pull/26
|
|
|
|
|
hscurses = overrideCabal super.hscurses (drv: {
|
|
|
|
|
librarySystemDepends = (drv.librarySystemDepends or []) ++ [ pkgs.ncurses ];
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# Looks like Avahi provides the missing library
|
|
|
|
|
dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; };
|
|
|
|
|
|
|
|
|
|
# Ensure the necessary frameworks are propagatedBuildInputs on darwin
|
|
|
|
|
OpenGLRaw = overrideCabal super.OpenGLRaw (drv: {
|
|
|
|
|
librarySystemDepends =
|
|
|
|
|
pkgs.lib.optionals (!pkgs.stdenv.isDarwin) drv.librarySystemDepends;
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends
|
|
|
|
|
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
|
|
|
|
[ pkgs.darwin.apple_sdk.frameworks.OpenGL ];
|
|
|
|
|
preConfigure = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
|
|
|
|
|
frameworkPaths=($(for i in $nativeBuildInputs; do if [ -d "$i"/Library/Frameworks ]; then echo "-F$i/Library/Frameworks"; fi done))
|
|
|
|
|
frameworkPaths=$(IFS=, ; echo "''${frameworkPaths[@]}")
|
|
|
|
|
configureFlags+=$(if [ -n "$frameworkPaths" ]; then echo -n "--ghc-options=-optl=$frameworkPaths"; fi)
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
GLURaw = overrideCabal super.GLURaw (drv: {
|
|
|
|
|
librarySystemDepends =
|
|
|
|
|
pkgs.lib.optionals (!pkgs.stdenv.isDarwin) drv.librarySystemDepends;
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends
|
|
|
|
|
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
|
|
|
|
[ pkgs.darwin.apple_sdk.frameworks.OpenGL ];
|
|
|
|
|
});
|
|
|
|
|
bindings-GLFW = overrideCabal super.bindings-GLFW (drv: {
|
|
|
|
|
doCheck = false; # requires an active X11 display
|
|
|
|
|
librarySystemDepends =
|
|
|
|
|
pkgs.lib.optionals (!pkgs.stdenv.isDarwin) drv.librarySystemDepends;
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends
|
|
|
|
|
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
|
|
|
|
(with pkgs.darwin.apple_sdk.frameworks;
|
|
|
|
|
[ AGL Cocoa OpenGL IOKit Kernel CoreVideo
|
|
|
|
|
pkgs.darwin.CF ]);
|
|
|
|
|
});
|
|
|
|
|
OpenCL = overrideCabal super.OpenCL (drv: {
|
|
|
|
|
librarySystemDepends =
|
|
|
|
|
pkgs.lib.optionals (!pkgs.stdenv.isDarwin) drv.librarySystemDepends;
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends
|
|
|
|
|
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
|
|
|
|
[ pkgs.darwin.apple_sdk.frameworks.OpenCL ];
|
|
|
|
|
});
|
|
|
|
|
|
2019-10-14 21:03:39 +01:00
|
|
|
|
# depends on 'hie' executable
|
|
|
|
|
lsp-test = dontCheck super.lsp-test;
|
|
|
|
|
|
|
|
|
|
# tests depend on executable
|
|
|
|
|
ghcide = overrideCabal super.ghcide (drv: {
|
|
|
|
|
preCheck = ''export PATH="$PWD/dist/build/ghcide:$PATH"'';
|
|
|
|
|
});
|
|
|
|
|
|
2017-02-02 15:49:28 +00:00
|
|
|
|
# GLUT uses `dlopen` to link to freeglut, so we need to set the RUNPATH correctly for
|
|
|
|
|
# it to find `libglut.so` from the nix store. We do this by patching GLUT.cabal to pkg-config
|
|
|
|
|
# depend on freeglut, which provides GHC to necessary information to generate a correct RPATH.
|
|
|
|
|
#
|
|
|
|
|
# Note: Simply patching the dynamic library (.so) of the GLUT build will *not* work, since the
|
|
|
|
|
# RPATH also needs to be propagated when using static linking. GHC automatically handles this for
|
|
|
|
|
# us when we patch the cabal file (Link options will be recored in the ghc package registry).
|
|
|
|
|
#
|
|
|
|
|
# Additional note: nixpkgs' freeglut and macOS's OpenGL implementation do not cooperate,
|
|
|
|
|
# so disable this on Darwin only
|
|
|
|
|
${if pkgs.stdenv.isDarwin then null else "GLUT"} = addPkgconfigDepend (appendPatch super.GLUT ./patches/GLUT.patch) pkgs.freeglut;
|
|
|
|
|
|
|
|
|
|
libsystemd-journal = overrideCabal super.libsystemd-journal (old: {
|
|
|
|
|
librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
|
|
|
|
|
});
|
|
|
|
|
|
2017-02-19 10:34:21 +00:00
|
|
|
|
# does not specify tests in cabal file, instead has custom runTest cabal hook,
|
|
|
|
|
# so cabal2nix will not detect test dependencies.
|
|
|
|
|
either-unwrap = overrideCabal super.either-unwrap (drv: {
|
|
|
|
|
testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
|
|
|
|
|
});
|
|
|
|
|
|
2017-08-06 09:41:23 +01:00
|
|
|
|
# cabal2nix likes to generate dependencies on hinotify when hfsevents is really required
|
|
|
|
|
# on darwin: https://github.com/NixOS/cabal2nix/issues/146.
|
|
|
|
|
hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify;
|
|
|
|
|
|
|
|
|
|
# FSEvents API is very buggy and tests are unreliable. See
|
|
|
|
|
# http://openradar.appspot.com/10207999 and similar issues.
|
|
|
|
|
# https://github.com/haskell-fswatch/hfsnotify/issues/62
|
|
|
|
|
fsnotify = if pkgs.stdenv.isDarwin
|
|
|
|
|
then addBuildDepend (dontCheck super.fsnotify) pkgs.darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
|
else dontCheck super.fsnotify;
|
|
|
|
|
|
2018-07-17 21:11:16 +01:00
|
|
|
|
hidapi = addExtraLibrary super.hidapi pkgs.udev;
|
2017-02-19 10:34:21 +00:00
|
|
|
|
|
|
|
|
|
hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; };
|
|
|
|
|
|
|
|
|
|
discount = super.discount.override { markdown = pkgs.discount; };
|
|
|
|
|
|
|
|
|
|
# tests require working stack installation with all-cabal-hashes cloned in $HOME
|
|
|
|
|
stackage-curator = dontCheck super.stackage-curator;
|
|
|
|
|
|
|
|
|
|
# hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
|
|
|
|
|
io-streams = enableCabalFlag super.io-streams "NoInteractiveTests";
|
2017-02-18 13:33:26 +00:00
|
|
|
|
|
2017-02-19 10:34:21 +00:00
|
|
|
|
# requires autotools to build
|
2018-07-09 17:22:23 +01:00
|
|
|
|
secp256k1 = addBuildTools super.secp256k1 [ pkgs.buildPackages.autoconf pkgs.buildPackages.automake pkgs.buildPackages.libtool ];
|
2017-02-19 10:34:21 +00:00
|
|
|
|
|
2020-03-14 08:41:34 +00:00
|
|
|
|
# requires libsecp256k1 in pkgconfig-depends
|
|
|
|
|
secp256k1-haskell = addPkgconfigDepend super.secp256k1-haskell pkgs.secp256k1;
|
|
|
|
|
|
2019-11-07 16:36:14 +00:00
|
|
|
|
# tests require git and zsh
|
2019-11-07 21:04:45 +00:00
|
|
|
|
hapistrano = addBuildTools super.hapistrano [ pkgs.buildPackages.git pkgs.buildPackages.zsh ];
|
2017-02-19 10:34:21 +00:00
|
|
|
|
|
2017-03-07 13:24:22 +00:00
|
|
|
|
# This propagates this to everything depending on haskell-gi-base
|
2018-12-02 11:41:15 +00:00
|
|
|
|
haskell-gi-base = addBuildDepend super.haskell-gi-base pkgs.gobject-introspection;
|
2017-03-07 13:24:22 +00:00
|
|
|
|
|
2017-02-19 10:34:21 +00:00
|
|
|
|
# requires valid, writeable $HOME
|
|
|
|
|
hatex-guide = overrideCabal super.hatex-guide (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
${drv.preConfigure or ""}
|
|
|
|
|
export HOME=$PWD
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
2018-07-23 13:18:48 +01:00
|
|
|
|
# https://github.com/plow-technologies/servant-streaming/issues/12
|
|
|
|
|
servant-streaming-server = dontCheck super.servant-streaming-server;
|
|
|
|
|
|
2019-11-12 11:48:05 +00:00
|
|
|
|
# https://github.com/haskell-servant/servant/pull/1238
|
|
|
|
|
servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then
|
|
|
|
|
appendPatch super.servant-client-core ./patches/servant-client-core-redact-auth-header.patch
|
2019-07-05 13:28:58 +01:00
|
|
|
|
else
|
|
|
|
|
super.servant-client-core;
|
|
|
|
|
|
2019-02-22 10:03:29 +00:00
|
|
|
|
|
2017-02-19 10:34:21 +00:00
|
|
|
|
# tests run executable, relying on PATH
|
|
|
|
|
# without this, tests fail with "Couldn't launch intero process"
|
|
|
|
|
intero = overrideCabal super.intero (drv: {
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH="$PWD/dist/build/intero:$PATH"
|
|
|
|
|
'';
|
|
|
|
|
});
|
2017-05-09 09:56:22 +01:00
|
|
|
|
|
2020-02-07 10:09:13 +00:00
|
|
|
|
# Break infinite recursion cycle with criterion and network-uri.
|
|
|
|
|
js-flot = dontCheck super.js-flot;
|
|
|
|
|
|
2019-08-10 10:23:49 +01:00
|
|
|
|
# Break infinite recursion cycle between QuickCheck and splitmix.
|
|
|
|
|
splitmix = dontCheck super.splitmix;
|
|
|
|
|
|
|
|
|
|
# Break infinite recursion cycle between tasty and clock.
|
|
|
|
|
clock = dontCheck super.clock;
|
|
|
|
|
|
2017-05-09 09:56:22 +01:00
|
|
|
|
# loc and loc-test depend on each other for testing. Break that infinite cycle:
|
|
|
|
|
loc-test = super.loc-test.override { loc = dontCheck self.loc; };
|
|
|
|
|
|
2017-05-26 19:41:12 +01:00
|
|
|
|
# The test suites try to run the "fixpoint" and "liquid" executables built just
|
|
|
|
|
# before and fail because the library search paths aren't configured properly.
|
|
|
|
|
# Also needs https://github.com/ucsd-progsys/liquidhaskell/issues/1038 resolved.
|
2017-05-26 18:53:52 +01:00
|
|
|
|
liquid-fixpoint = disableSharedExecutables super.liquid-fixpoint;
|
2017-05-26 19:41:12 +01:00
|
|
|
|
liquidhaskell = dontCheck (disableSharedExecutables super.liquidhaskell);
|
2017-05-26 18:53:52 +01:00
|
|
|
|
|
2017-06-28 17:50:08 +01:00
|
|
|
|
# Without this override, the builds lacks pkg-config.
|
2018-02-25 19:07:46 +00:00
|
|
|
|
opencv-extra = addPkgconfigDepend super.opencv-extra pkgs.opencv3;
|
2017-06-28 17:50:08 +01:00
|
|
|
|
|
2017-10-17 10:49:29 +01:00
|
|
|
|
# Break cyclic reference that results in an infinite recursion.
|
|
|
|
|
partial-semigroup = dontCheck super.partial-semigroup;
|
2017-12-14 12:18:23 +00:00
|
|
|
|
colour = dontCheck super.colour;
|
2018-07-18 12:21:48 +01:00
|
|
|
|
spatial-rotations = dontCheck super.spatial-rotations;
|
2017-10-17 10:49:29 +01:00
|
|
|
|
|
2017-12-29 10:41:49 +00:00
|
|
|
|
LDAP = dontCheck (overrideCabal super.LDAP (drv: {
|
|
|
|
|
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
|
|
|
|
|
}));
|
2018-08-28 01:55:59 +01:00
|
|
|
|
|
2018-09-20 11:45:16 +01:00
|
|
|
|
# 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'';
|
|
|
|
|
});
|
2018-09-23 20:57:17 +01:00
|
|
|
|
|
|
|
|
|
# The test-suite requires a running PostgreSQL server.
|
|
|
|
|
Frames-beam = dontCheck super.Frames-beam;
|
2018-08-20 21:14:32 +01:00
|
|
|
|
|
2020-03-30 07:18:51 +01:00
|
|
|
|
# * Compile manpages (which are in RST and are compiled with Sphinx).
|
|
|
|
|
#
|
|
|
|
|
# * Wrap so that binary can find GCC and OpenCL headers (dubious if
|
|
|
|
|
# a good idea).
|
|
|
|
|
futhark = with pkgs;
|
|
|
|
|
let maybeWrap =
|
|
|
|
|
if pkgs.stdenv.isDarwin then ""
|
|
|
|
|
else
|
|
|
|
|
let path = stdenv.lib.makeBinPath [ gcc ];
|
|
|
|
|
in ''
|
|
|
|
|
wrapProgram $out/bin/futhark \
|
|
|
|
|
--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"
|
|
|
|
|
'';
|
|
|
|
|
in overrideCabal (addBuildTools super.futhark [makeWrapper python37Packages.sphinx])
|
|
|
|
|
(_drv: {
|
|
|
|
|
postBuild = (_drv.postBuild or "") + ''
|
|
|
|
|
make -C docs man
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
postInstall = (_drv.postInstall or "") + ''
|
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
mv docs/_build/man/*.1 $out/share/man/man1/
|
|
|
|
|
''
|
|
|
|
|
+ maybeWrap;
|
|
|
|
|
});
|
2018-10-18 13:57:00 +01:00
|
|
|
|
|
2019-01-06 05:53:21 +00:00
|
|
|
|
git-annex = with pkgs;
|
|
|
|
|
if (!stdenv.isLinux) then
|
|
|
|
|
let path = stdenv.lib.makeBinPath [ coreutils ];
|
|
|
|
|
in overrideCabal (addBuildTool super.git-annex makeWrapper) (_drv: {
|
2019-12-24 02:04:34 +00:00
|
|
|
|
# This is an instance of https://github.com/NixOS/nix/pull/1085
|
|
|
|
|
# Fails with:
|
|
|
|
|
# gpg: can't connect to the agent: File name too long
|
|
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
|
substituteInPlace Test.hs \
|
|
|
|
|
--replace ', testCase "crypto" test_crypto' ""
|
|
|
|
|
'';
|
|
|
|
|
# On Darwin, git-annex mis-detects options to `cp`, so we wrap the
|
|
|
|
|
# binary to ensure it uses Nixpkgs' coreutils.
|
2019-01-06 05:53:21 +00:00
|
|
|
|
postFixup = ''
|
|
|
|
|
wrapProgram $out/bin/git-annex \
|
|
|
|
|
--prefix PATH : "${path}"
|
|
|
|
|
'';
|
|
|
|
|
})
|
|
|
|
|
else super.git-annex;
|
|
|
|
|
|
2018-10-18 13:57:00 +01:00
|
|
|
|
# The test suite has undeclared dependencies on git.
|
|
|
|
|
githash = dontCheck super.githash;
|
|
|
|
|
|
2019-01-06 13:30:37 +00:00
|
|
|
|
# Avoid infitite recursion with yaya.
|
|
|
|
|
yaya-hedgehog = super.yaya-hedgehog.override { yaya = dontCheck self.yaya; };
|
|
|
|
|
|
2019-01-29 09:08:07 +00:00
|
|
|
|
# Avoid infitite recursion with tonatona.
|
|
|
|
|
tonaparser = dontCheck super.tonaparser;
|
|
|
|
|
|
2019-06-01 16:44:48 +01:00
|
|
|
|
# Needs internet to run tests
|
|
|
|
|
HTTP = dontCheck super.HTTP;
|
|
|
|
|
|
|
|
|
|
# Break infinite recursions.
|
|
|
|
|
Dust-crypto = dontCheck super.Dust-crypto;
|
|
|
|
|
nanospec = dontCheck super.nanospec;
|
|
|
|
|
options = dontCheck super.options;
|
|
|
|
|
snap-server = dontCheck super.snap-server;
|
|
|
|
|
|
|
|
|
|
# Tests require internet
|
2019-08-11 19:30:19 +01:00
|
|
|
|
http-download = dontCheck super.http-download;
|
2019-08-11 19:36:54 +01:00
|
|
|
|
pantry = dontCheck super.pantry;
|
2019-06-01 16:44:48 +01:00
|
|
|
|
|
2019-09-23 18:50:32 +01:00
|
|
|
|
# Hadolint wants to build a statically linked binary by default.
|
|
|
|
|
hadolint = overrideCabal super.hadolint (drv: {
|
|
|
|
|
preConfigure = "sed -i -e /ld-options:/d hadolint.cabal";
|
|
|
|
|
});
|
2019-10-06 11:42:08 +01:00
|
|
|
|
|
|
|
|
|
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
|
|
|
|
# need it during the build itself, too.
|
|
|
|
|
cairo = addBuildTool super.cairo self.buildHaskellPackages.gtk2hs-buildtools;
|
|
|
|
|
pango = disableHardening (addBuildTool super.pango self.buildHaskellPackages.gtk2hs-buildtools) ["fortify"];
|
2019-11-29 01:13:35 +00:00
|
|
|
|
|
|
|
|
|
spago =
|
|
|
|
|
let
|
2020-04-15 14:41:09 +01:00
|
|
|
|
# Spago needs a small patch to work with the latest versions of rio.
|
|
|
|
|
# https://github.com/purescript/spago/pull/616
|
|
|
|
|
# This can probably be removed when a version after spago-0.15.1 is released.
|
2020-02-29 08:58:42 +00:00
|
|
|
|
spagoWithPatches = appendPatch super.spago (pkgs.fetchpatch {
|
2020-04-15 14:41:09 +01:00
|
|
|
|
url = "https://github.com/purescript/spago/pull/616/commits/95b5fa0f1d3bfb07972d1ef5004b8bee8a070667.patch";
|
|
|
|
|
sha256 = "0v3890lwhddfrq9mhbq92962pkxra8kwbin97wg3s0b02dk65ysc";
|
2020-02-29 08:58:42 +00:00
|
|
|
|
});
|
|
|
|
|
|
2019-11-29 01:13:35 +00:00
|
|
|
|
# Spago basically compiles with LTS-14, but it requires a newer version
|
|
|
|
|
# of directory. This is to work around a bug only present on windows, so
|
|
|
|
|
# we can safely jailbreak spago and use the older directory package from
|
|
|
|
|
# LTS-14.
|
2020-04-15 14:41:09 +01:00
|
|
|
|
spagoWithOverrides = doJailbreak spagoWithPatches;
|
2019-11-29 01:13:35 +00:00
|
|
|
|
|
2020-02-10 03:54:23 +00:00
|
|
|
|
# This defines the version of the purescript-docs-search release we are using.
|
|
|
|
|
# This is defined in the src/Spago/Prelude.hs file in the spago source.
|
|
|
|
|
docsSearchVersion = "v0.0.8";
|
|
|
|
|
|
2019-11-29 01:13:35 +00:00
|
|
|
|
docsSearchAppJsFile = pkgs.fetchurl {
|
2020-02-10 03:54:23 +00:00
|
|
|
|
url = "https://github.com/spacchetti/purescript-docs-search/releases/download/${docsSearchVersion}/docs-search-app.js";
|
|
|
|
|
sha256 = "00pzi7pgjicpa0mg0al80gh2q1q2lqiyb3kjarpydlmn8dfjny7v";
|
2019-11-29 01:13:35 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
purescriptDocsSearchFile = pkgs.fetchurl {
|
2020-02-10 03:54:23 +00:00
|
|
|
|
url = "https://github.com/spacchetti/purescript-docs-search/releases/download/${docsSearchVersion}/purescript-docs-search";
|
|
|
|
|
sha256 = "1hsi1hc4p1z2xbw82w2jxmmczw6mravli1r89vrkivb72sqdjya7";
|
2019-11-29 01:13:35 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
spagoFixHpack = overrideCabal spagoWithOverrides (drv: {
|
|
|
|
|
postUnpack = (drv.postUnpack or "") + ''
|
|
|
|
|
# The source for spago is pulled directly from GitHub. It uses a
|
|
|
|
|
# package.yaml file with hpack, not a .cabal file. In the package.yaml file,
|
|
|
|
|
# it uses defaults from the master branch of the hspec repo. It will try to
|
|
|
|
|
# fetch these at build-time (but it will fail if running in the sandbox).
|
|
|
|
|
#
|
|
|
|
|
# The following line modifies the package.yaml to not pull in
|
|
|
|
|
# defaults from the hspec repo.
|
|
|
|
|
substituteInPlace "$sourceRoot/package.yaml" --replace 'defaults: hspec/hspec@master' ""
|
|
|
|
|
|
|
|
|
|
# Spago includes the following two files directly into the binary
|
|
|
|
|
# with Template Haskell. They are fetched at build-time from the
|
|
|
|
|
# `purescript-docs-search` repo above. If they cannot be fetched at
|
|
|
|
|
# build-time, they are pulled in from the `templates/` directory in
|
|
|
|
|
# the spago source.
|
|
|
|
|
#
|
|
|
|
|
# However, they are not actually available in the spago source, so they
|
|
|
|
|
# need to fetched with nix and put in the correct place.
|
|
|
|
|
# https://github.com/spacchetti/spago/issues/510
|
|
|
|
|
cp ${docsSearchAppJsFile} "$sourceRoot/templates/docs-search-app.js"
|
|
|
|
|
cp ${purescriptDocsSearchFile} "$sourceRoot/templates/purescript-docs-search"
|
2020-02-18 11:08:00 +00:00
|
|
|
|
|
|
|
|
|
# For some weird reason, on Darwin, the open(2) call to embed these files
|
|
|
|
|
# requires write permissions. The easiest resolution is just to permit that
|
|
|
|
|
# (doesn't cause any harm on other systems).
|
|
|
|
|
chmod u+w "$sourceRoot/templates/docs-search-app.js" "$sourceRoot/templates/purescript-docs-search"
|
2019-11-29 01:13:35 +00:00
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
# Because of the problem above with pulling in hspec defaults to the
|
|
|
|
|
# package.yaml file, the tests are disabled.
|
2019-12-20 07:12:29 +00:00
|
|
|
|
spagoWithoutChecks = dontCheck spagoFixHpack;
|
2019-11-29 01:13:35 +00:00
|
|
|
|
in
|
|
|
|
|
spagoWithoutChecks;
|
2020-01-02 12:30:18 +00:00
|
|
|
|
|
|
|
|
|
# checks SQL statements at compile time, and so requires a running PostgreSQL
|
|
|
|
|
# database to run it's test suite
|
|
|
|
|
postgresql-typed = dontCheck super.postgresql-typed;
|
2020-02-13 01:23:23 +00:00
|
|
|
|
|
|
|
|
|
# mplayer-spot uses mplayer at runtime.
|
|
|
|
|
mplayer-spot =
|
|
|
|
|
let path = pkgs.stdenv.lib.makeBinPath [ pkgs.mplayer ];
|
|
|
|
|
in overrideCabal (addBuildTool super.mplayer-spot pkgs.makeWrapper) (oldAttrs: {
|
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/mplayer-spot --prefix PATH : "${path}"
|
|
|
|
|
'';
|
|
|
|
|
});
|
2020-02-21 11:02:00 +00:00
|
|
|
|
|
|
|
|
|
# break infinite recursion with base-orphans
|
|
|
|
|
primitive = dontCheck super.primitive;
|
|
|
|
|
|
2020-02-29 08:14:00 +00:00
|
|
|
|
# dhall-1.29.0 tests access the network. This override can be removed when
|
|
|
|
|
# dhall_1_29_0 is no longer used, since more recent versions of dhall don't
|
|
|
|
|
# access the network in checks.
|
|
|
|
|
dhall_1_29_0 = dontCheck super.dhall_1_29_0;
|
2017-02-02 15:49:28 +00:00
|
|
|
|
}
|