2017-02-02 16:49:28 +01: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 18:44:08 +02:00
|
|
|
|
{ pkgs, haskellLib }:
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2017-08-01 18:44:08 +02:00
|
|
|
|
with haskellLib;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2017-03-12 22:45:19 +01:00
|
|
|
|
# All of the overrides in this set should look like:
|
|
|
|
|
#
|
|
|
|
|
# foo = ... something involving super.foo ...
|
|
|
|
|
#
|
2017-03-12 22:47:28 +01:00
|
|
|
|
# but that means that we add `foo` attribute even if there is no `super.foo`! So if
|
2017-03-12 22:45:19 +01: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 16:49:28 +01:00
|
|
|
|
self: super: builtins.intersectAttrs super {
|
|
|
|
|
|
|
|
|
|
# Apply NixOS-specific patches.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
ghc-paths = appendPatch ./patches/ghc-paths-nix.patch super.ghc-paths;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# fix errors caused by hardening flags
|
2021-10-26 12:20:34 +02:00
|
|
|
|
epanet-haskell = disableHardening ["format"] super.epanet-haskell;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# 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
|
2021-06-10 14:10:39 +02:00
|
|
|
|
mysql = dontCheck super.mysql;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# CUDA needs help finding the SDK headers and libraries.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
cuda = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
|
2018-03-09 08:33:28 +01:00
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib"
|
2017-02-02 16:49:28 +01:00
|
|
|
|
"--extra-include-dirs=${pkgs.cudatoolkit}/include"
|
|
|
|
|
];
|
|
|
|
|
preConfigure = ''
|
2017-07-24 17:39:53 +02:00
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.cuda;
|
2017-07-24 17:39:53 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
nvvm = overrideCabal (drv: {
|
2017-07-24 17:39:53 +02:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.nvvm;
|
2017-07-24 17:39:53 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
cufft = overrideCabal (drv: {
|
2017-07-24 17:39:53 +02:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
2017-02-02 16:49:28 +01:00
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.cufft;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# jni needs help finding libjvm.so because it's in a weird location.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
jni = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" )
|
|
|
|
|
configureFlags+=" --extra-lib-dir=''${libdir[0]}"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.jni;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# The package doesn't know about the AL include hierarchy.
|
|
|
|
|
# https://github.com/phaazon/al/issues/1
|
2021-10-26 12:20:34 +02:00
|
|
|
|
al = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.al;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Won't find it's header files without help.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
sfml-audio = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.sfml-audio;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2019-10-13 09:31:45 +02:00
|
|
|
|
# avoid compiling twice by providing executable as a separate output (with small closure size)
|
2019-09-29 09:52:11 +02:00
|
|
|
|
niv = enableSeparateBinOutput super.niv;
|
2019-10-13 09:31:45 +02:00
|
|
|
|
ormolu = enableSeparateBinOutput super.ormolu;
|
|
|
|
|
ghcid = enableSeparateBinOutput super.ghcid;
|
2019-09-09 09:52:08 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hzk = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
preConfigure = "sed -i -e /include-dirs/d hzk.cabal";
|
2019-10-30 03:23:29 +01:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hzk;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
haskakafka = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal";
|
2019-10-30 03:23:29 +01:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.haskakafka;
|
2017-09-08 13:31:02 +02:00
|
|
|
|
|
2017-09-08 14:45:56 +02:00
|
|
|
|
# library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hw-kafka-client = dontCheck (overrideCabal (drv: {
|
2017-09-08 13:31:02 +02:00
|
|
|
|
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal";
|
2019-10-30 03:23:29 +01:00
|
|
|
|
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hw-kafka-client);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Foreign dependency name clashes with another Haskell package.
|
|
|
|
|
libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; };
|
|
|
|
|
|
|
|
|
|
# Heist's test suite requires system pandoc
|
2021-10-26 12:20:34 +02:00
|
|
|
|
heist = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
testToolDepends = [pkgs.pandoc];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.heist;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
|
2021-10-26 12:20:34 +02:00
|
|
|
|
gio = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.gio));
|
|
|
|
|
glib = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.glib));
|
|
|
|
|
gtk3 = disableHardening ["fortify"] (super.gtk3.override { inherit (pkgs) gtk3; });
|
|
|
|
|
gtk = let gtk1 = addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.gtk;
|
|
|
|
|
gtk2 = addPkgconfigDepend pkgs.gtk2 gtk1;
|
|
|
|
|
gtk3 = disableHardening ["fortify"] gtk1;
|
|
|
|
|
gtk4 = if pkgs.stdenv.isDarwin then appendConfigureFlag "-fhave-quartz-gtk" gtk3 else gtk4;
|
2019-10-07 14:09:43 +02:00
|
|
|
|
in gtk3;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2;
|
|
|
|
|
gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager;
|
2018-06-06 02:53:06 +02:00
|
|
|
|
|
2018-06-06 02:52:05 +02:00
|
|
|
|
# Add necessary reference to gtk3 package
|
2021-10-26 12:20:34 +02:00
|
|
|
|
gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3;
|
2018-06-06 02:52:05 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hs-mesos = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
# 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";
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hs-mesos;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# 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
|
2021-11-18 17:13:31 +01:00
|
|
|
|
hasql-interpolate = dontCheck super.hasql-interpolate; # wants to connect to postgresql
|
2017-02-02 16:49:28 +01:00
|
|
|
|
hasql-transaction = dontCheck super.hasql-transaction; # wants to connect to postgresql
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hjsonschema = overrideCabal (drv: { testTarget = "local"; }) super.hjsonschema;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
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
|
2021-08-19 09:34:01 +02:00
|
|
|
|
oidc-client = dontCheck super.oidc-client; # the spec runs openid against google.com
|
2017-02-02 16:49:28 +01:00
|
|
|
|
pipes-mongodb = dontCheck super.pipes-mongodb; # http://hydra.cryp.to/build/926195/log/raw
|
2021-02-14 10:07:10 +01:00
|
|
|
|
pixiv = dontCheck super.pixiv;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
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 18:29:48 +01:00
|
|
|
|
download = dontCheck super.download;
|
2017-02-02 16:49:28 +01: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;
|
2021-02-14 09:54:27 +01:00
|
|
|
|
telegraph = dontCheck super.telegraph;
|
2017-02-19 11:34:21 +01: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;
|
2021-06-02 05:28:42 +02:00
|
|
|
|
arch-web = dontCheck super.arch-web;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Tries to mess with extended POSIX attributes, but can't in our chroot environment.
|
|
|
|
|
xattr = dontCheck super.xattr;
|
|
|
|
|
|
2018-04-08 23:27:03 +02:00
|
|
|
|
# Needs access to locale data, but looks for it in the wrong place.
|
2017-02-02 16:49:28 +01:00
|
|
|
|
scholdoc-citeproc = dontCheck super.scholdoc-citeproc;
|
|
|
|
|
|
2018-08-21 02:16:59 +02:00
|
|
|
|
# Disable tests because they require a mattermost server
|
|
|
|
|
mattermost-api = dontCheck super.mattermost-api;
|
|
|
|
|
|
2017-02-02 16:49:28 +01:00
|
|
|
|
# Expect to find sendmail(1) in $PATH.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
mime-mail = appendConfigureFlag "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\"" super.mime-mail;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Help the test suite find system timezone data.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
tz = overrideCabal (drv: {
|
2021-09-26 20:27:25 +02:00
|
|
|
|
preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo";
|
|
|
|
|
patches = [
|
|
|
|
|
# Fix tests failing with libSystem, musl etc. due to a lack of
|
|
|
|
|
# support for glibc's non-POSIX TZDIR environment variable.
|
|
|
|
|
# https://github.com/nilcons/haskell-tz/pull/29
|
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
|
name = "support-non-glibc-tzset.patch";
|
|
|
|
|
url = "https://github.com/sternenseemann/haskell-tz/commit/64928f1a50a1a276a718491ae3eeef63abcdb393.patch";
|
|
|
|
|
sha256 = "1f53w8k1vpy39hzalyykpvm946ykkarj2714w988jdp4c2c4l4cf";
|
|
|
|
|
})
|
|
|
|
|
] ++ (drv.patches or []);
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.tz;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Nix-specific workaround
|
2021-10-26 12:20:34 +02:00
|
|
|
|
xmonad = appendPatch ./patches/xmonad-nix.patch (dontCheck super.xmonad);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
|
|
|
|
|
# http://hydra.cryp.to/build/1331287/log/raw
|
2021-10-26 12:20:34 +02:00
|
|
|
|
wxc = (addBuildDepend self.split super.wxc).override { wxGTK = pkgs.wxGTK30; };
|
2017-02-02 16:49:28 +01:00
|
|
|
|
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; };
|
|
|
|
|
|
|
|
|
|
# Test suite wants to connect to $DISPLAY.
|
2021-08-21 17:27:14 +02:00
|
|
|
|
bindings-GLFW = dontCheck super.bindings-GLFW;
|
|
|
|
|
gi-gtk-declarative = dontCheck super.gi-gtk-declarative;
|
|
|
|
|
gi-gtk-declarative-app-simple = dontCheck super.gi-gtk-declarative-app-simple;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hsqml = dontCheck (addExtraLibraries [pkgs.libGLU pkgs.libGL] (super.hsqml.override { qt5 = pkgs.qt5Full; }));
|
2021-08-21 17:27:14 +02:00
|
|
|
|
monomer = dontCheck super.monomer;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2021-08-12 14:17:36 +02:00
|
|
|
|
# Wants to check against a real DB, Needs freetds
|
2021-10-26 12:20:34 +02:00
|
|
|
|
odbc = dontCheck (addExtraLibraries [ pkgs.freetds ] super.odbc);
|
2021-08-12 14:17:36 +02:00
|
|
|
|
|
2017-02-02 16:49:28 +01:00
|
|
|
|
# Tests attempt to use NPM to install from the network into
|
|
|
|
|
# /homeless-shelter. Disabled.
|
|
|
|
|
purescript = dontCheck super.purescript;
|
|
|
|
|
|
|
|
|
|
# Hardcoded include path
|
2021-10-26 12:20:34 +02:00
|
|
|
|
poppler = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
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
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.poppler;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Uses OpenGL in testing
|
|
|
|
|
caramia = dontCheck super.caramia;
|
|
|
|
|
|
2021-05-08 17:36:40 +02:00
|
|
|
|
# requires llvm 9 specifically https://github.com/llvm-hs/llvm-hs/#building-from-source
|
2021-05-08 17:32:54 +02:00
|
|
|
|
llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_9; };
|
2017-04-05 09:37:47 +02:00
|
|
|
|
|
2017-02-02 16:49:28 +01:00
|
|
|
|
# Needs help finding LLVM.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
spaceprobe = addBuildTool self.buildHaskellPackages.llvmPackages.llvm super.spaceprobe;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Tries to run GUI in tests
|
2021-10-26 12:20:34 +02:00
|
|
|
|
leksah = dontCheck (overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [
|
2021-05-07 23:18:14 +02:00
|
|
|
|
gnome.adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ...
|
2017-02-02 16:49:28 +01: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
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.leksah);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2021-05-20 09:14:45 +02:00
|
|
|
|
dyre =
|
|
|
|
|
appendPatch
|
|
|
|
|
# Dyre needs special support for reading the NIX_GHC env var. This is
|
|
|
|
|
# available upstream in https://github.com/willdonnelly/dyre/pull/43, but
|
|
|
|
|
# hasn't been released to Hackage as of dyre-0.9.1. Likely included in
|
|
|
|
|
# next version.
|
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
|
url = "https://github.com/willdonnelly/dyre/commit/c7f29d321aae343d6b314f058812dffcba9d7133.patch";
|
|
|
|
|
sha256 = "10m22k35bi6cci798vjpy4c2l08lq5nmmj24iwp0aflvmjdgscdb";
|
2021-10-26 12:20:34 +02:00
|
|
|
|
})
|
|
|
|
|
# dyre's tests appear to be trying to directly call GHC.
|
|
|
|
|
(dontCheck super.dyre);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/13
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/14
|
2021-10-26 12:20:34 +02:00
|
|
|
|
epic = addExtraLibraries [pkgs.boehmgc pkgs.gmp] (addBuildTool self.buildHaskellPackages.happy super.epic);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/ekmett/wl-pprint-terminfo/issues/7
|
2021-10-26 12:20:34 +02:00
|
|
|
|
wl-pprint-terminfo = addExtraLibrary pkgs.ncurses super.wl-pprint-terminfo;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/bos/pcap/issues/5
|
2021-10-26 12:20:34 +02:00
|
|
|
|
pcap = addExtraLibrary pkgs.libpcap super.pcap;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2019-01-04 09:13:36 +01:00
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/53336
|
2021-10-26 12:20:34 +02:00
|
|
|
|
greenclip = addExtraLibrary pkgs.xorg.libXdmcp super.greenclip;
|
2019-01-04 09:13:36 +01:00
|
|
|
|
|
2017-02-02 16:49:28 +01:00
|
|
|
|
# The cabal files for these libraries do not list the required system dependencies.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
miniball = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = [ pkgs.miniball ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.miniball;
|
|
|
|
|
SDL-image = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or [];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.SDL-image;
|
|
|
|
|
SDL-ttf = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.SDL-ttf;
|
|
|
|
|
SDL-mixer = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.SDL-mixer;
|
|
|
|
|
SDL-gfx = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.SDL-gfx;
|
|
|
|
|
SDL-mpeg = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.smpeg}/lib"
|
|
|
|
|
"--extra-include-dirs=${pkgs.smpeg}/include/smpeg"
|
|
|
|
|
];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.SDL-mpeg;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/ivanperez-keera/hcwiid/pull/4
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hcwiid = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
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" '';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hcwiid;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# cabal2nix doesn't pick up some of the dependencies.
|
|
|
|
|
ginsu = let
|
2021-10-26 12:20:34 +02:00
|
|
|
|
g = addBuildDepend pkgs.perl super.ginsu;
|
|
|
|
|
g' = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ [
|
|
|
|
|
pkgs.ncurses
|
|
|
|
|
];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) g;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
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
|
2021-10-26 12:20:34 +02:00
|
|
|
|
fltkhs = overrideCabal (drv: {
|
2021-06-19 22:12:32 +02:00
|
|
|
|
libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.autoconf];
|
2018-02-24 13:06:44 +01:00
|
|
|
|
librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.fltk13 pkgs.libGL pkgs.libjpeg];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.fltkhs;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# https://github.com/skogsbaer/hscurses/pull/26
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hscurses = overrideCabal (drv: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = (drv.librarySystemDepends or []) ++ [ pkgs.ncurses ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hscurses;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
|
|
|
|
# Looks like Avahi provides the missing library
|
|
|
|
|
dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; };
|
|
|
|
|
|
2019-10-14 22:03:39 +02:00
|
|
|
|
# tests depend on executable
|
2021-10-26 12:20:34 +02:00
|
|
|
|
ghcide = overrideCabal (drv: {
|
2019-10-14 22:03:39 +02:00
|
|
|
|
preCheck = ''export PATH="$PWD/dist/build/ghcide:$PATH"'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.ghcide;
|
2019-10-14 22:03:39 +02:00
|
|
|
|
|
2017-02-02 16:49:28 +01: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
|
2021-10-26 12:20:34 +02:00
|
|
|
|
${if pkgs.stdenv.isDarwin then null else "GLUT"} = addPkgconfigDepend pkgs.freeglut (appendPatch ./patches/GLUT.patch super.GLUT);
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
libsystemd-journal = overrideCabal (old: {
|
2017-02-02 16:49:28 +01:00
|
|
|
|
librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.libsystemd-journal;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
|
2017-02-19 11:34:21 +01:00
|
|
|
|
# does not specify tests in cabal file, instead has custom runTest cabal hook,
|
|
|
|
|
# so cabal2nix will not detect test dependencies.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
either-unwrap = overrideCabal (drv: {
|
2017-02-19 11:34:21 +01:00
|
|
|
|
testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.either-unwrap;
|
2017-02-19 11:34:21 +01:00
|
|
|
|
|
2017-08-06 10:41:23 +02:00
|
|
|
|
# https://github.com/haskell-fswatch/hfsnotify/issues/62
|
2021-05-08 17:32:54 +02:00
|
|
|
|
fsnotify = dontCheck super.fsnotify;
|
2017-08-06 10:41:23 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hidapi = addExtraLibrary pkgs.udev super.hidapi;
|
2017-02-19 11:34:21 +01: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
|
2021-10-26 12:20:34 +02:00
|
|
|
|
io-streams = enableCabalFlag "NoInteractiveTests" super.io-streams;
|
2017-02-18 14:33:26 +01:00
|
|
|
|
|
2017-02-19 11:34:21 +01:00
|
|
|
|
# requires autotools to build
|
2021-10-26 12:20:34 +02:00
|
|
|
|
secp256k1 = addBuildTools [ pkgs.buildPackages.autoconf pkgs.buildPackages.automake pkgs.buildPackages.libtool ] super.secp256k1;
|
2017-02-19 11:34:21 +01:00
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
|
# requires libsecp256k1 in pkg-config-depends
|
2021-10-26 12:20:34 +02:00
|
|
|
|
secp256k1-haskell = addPkgconfigDepend pkgs.secp256k1 super.secp256k1-haskell;
|
2020-03-14 09:41:34 +01:00
|
|
|
|
|
2019-11-07 17:36:14 +01:00
|
|
|
|
# tests require git and zsh
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hapistrano = addBuildTools [ pkgs.buildPackages.git pkgs.buildPackages.zsh ] super.hapistrano;
|
2017-02-19 11:34:21 +01:00
|
|
|
|
|
2017-03-07 14:24:22 +01:00
|
|
|
|
# This propagates this to everything depending on haskell-gi-base
|
2021-10-26 12:20:34 +02:00
|
|
|
|
haskell-gi-base = addBuildDepend pkgs.gobject-introspection super.haskell-gi-base;
|
2017-03-07 14:24:22 +01:00
|
|
|
|
|
2017-02-19 11:34:21 +01:00
|
|
|
|
# requires valid, writeable $HOME
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hatex-guide = overrideCabal (drv: {
|
2017-02-19 11:34:21 +01:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
${drv.preConfigure or ""}
|
|
|
|
|
export HOME=$PWD
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hatex-guide;
|
2017-02-19 11:34:21 +01:00
|
|
|
|
|
2018-07-23 14:18:48 +02:00
|
|
|
|
# https://github.com/plow-technologies/servant-streaming/issues/12
|
|
|
|
|
servant-streaming-server = dontCheck super.servant-streaming-server;
|
|
|
|
|
|
2019-11-12 12:48:05 +01:00
|
|
|
|
# https://github.com/haskell-servant/servant/pull/1238
|
|
|
|
|
servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then
|
2021-10-26 12:20:34 +02:00
|
|
|
|
appendPatch ./patches/servant-client-core-redact-auth-header.patch super.servant-client-core
|
2019-07-05 14:28:58 +02:00
|
|
|
|
else
|
|
|
|
|
super.servant-client-core;
|
|
|
|
|
|
2019-02-22 11:03:29 +01:00
|
|
|
|
|
2017-02-19 11:34:21 +01:00
|
|
|
|
# tests run executable, relying on PATH
|
|
|
|
|
# without this, tests fail with "Couldn't launch intero process"
|
2021-10-26 12:20:34 +02:00
|
|
|
|
intero = overrideCabal (drv: {
|
2017-02-19 11:34:21 +01:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH="$PWD/dist/build/intero:$PATH"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.intero;
|
2017-05-09 10:56:22 +02:00
|
|
|
|
|
2020-02-07 11:09:13 +01:00
|
|
|
|
# Break infinite recursion cycle with criterion and network-uri.
|
|
|
|
|
js-flot = dontCheck super.js-flot;
|
|
|
|
|
|
2019-08-10 11:23:49 +02: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;
|
|
|
|
|
|
2020-05-29 18:23:30 +02:00
|
|
|
|
# Break infinite recursion cycle between devtools and mprelude.
|
|
|
|
|
devtools = super.devtools.override { mprelude = dontCheck super.mprelude; };
|
|
|
|
|
|
2021-01-12 10:09:27 +01:00
|
|
|
|
# Break dependency cycle between tasty-hedgehog and tasty-expected-failure
|
|
|
|
|
tasty-hedgehog = dontCheck super.tasty-hedgehog;
|
|
|
|
|
|
|
|
|
|
# Break dependency cycle between hedgehog, tasty-hedgehog and lifted-async
|
|
|
|
|
lifted-async = dontCheck super.lifted-async;
|
|
|
|
|
|
2017-05-09 10:56:22 +02: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 20:41:12 +02: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 19:53:52 +02:00
|
|
|
|
liquid-fixpoint = disableSharedExecutables super.liquid-fixpoint;
|
2017-05-26 20:41:12 +02:00
|
|
|
|
liquidhaskell = dontCheck (disableSharedExecutables super.liquidhaskell);
|
2017-05-26 19:53:52 +02:00
|
|
|
|
|
2017-06-28 18:50:08 +02:00
|
|
|
|
# Without this override, the builds lacks pkg-config.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
opencv-extra = addPkgconfigDepend pkgs.opencv3 super.opencv-extra;
|
2017-06-28 18:50:08 +02:00
|
|
|
|
|
2017-10-17 11:49:29 +02:00
|
|
|
|
# Break cyclic reference that results in an infinite recursion.
|
|
|
|
|
partial-semigroup = dontCheck super.partial-semigroup;
|
2017-12-14 13:18:23 +01:00
|
|
|
|
colour = dontCheck super.colour;
|
2018-07-18 13:21:48 +02:00
|
|
|
|
spatial-rotations = dontCheck super.spatial-rotations;
|
2017-10-17 11:49:29 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
LDAP = dontCheck (overrideCabal (drv: {
|
2017-12-29 11:41:49 +01:00
|
|
|
|
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.LDAP);
|
2018-08-28 02:55:59 +02:00
|
|
|
|
|
2018-09-20 12:45:16 +02:00
|
|
|
|
# Expects z3 to be on path so we replace it with a hard
|
2020-09-14 06:43:11 +02:00
|
|
|
|
#
|
|
|
|
|
# The tests expect additional solvers on the path, replace the
|
|
|
|
|
# available ones also with hard coded paths, and remove the missing
|
|
|
|
|
# ones from the test.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
sbv = overrideCabal (drv: {
|
2018-09-20 12:45:16 +02:00
|
|
|
|
postPatch = ''
|
2020-09-14 06:43:11 +02:00
|
|
|
|
sed -i -e 's|"abc"|"${pkgs.abc-verifier}/bin/abc"|' Data/SBV/Provers/ABC.hs
|
|
|
|
|
sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs
|
|
|
|
|
sed -i -e 's|"cvc4"|"${pkgs.cvc4}/bin/cvc4"|' Data/SBV/Provers/CVC4.hs
|
|
|
|
|
sed -i -e 's|"yices-smt2"|"${pkgs.yices}/bin/yices-smt2"|' Data/SBV/Provers/Yices.hs
|
|
|
|
|
sed -i -e 's|"z3"|"${pkgs.z3}/bin/z3"|' Data/SBV/Provers/Z3.hs
|
|
|
|
|
|
|
|
|
|
sed -i -e 's|\[abc, boolector, cvc4, mathSAT, yices, z3, dReal\]|[abc, boolector, cvc4, yices, z3]|' SBVTestSuite/SBVConnectionTest.hs
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.sbv;
|
2018-09-23 21:57:17 +02:00
|
|
|
|
|
|
|
|
|
# The test-suite requires a running PostgreSQL server.
|
|
|
|
|
Frames-beam = dontCheck super.Frames-beam;
|
2018-08-20 22:14:32 +02:00
|
|
|
|
|
2020-04-15 18:02:43 +02:00
|
|
|
|
# Compile manpages (which are in RST and are compiled with Sphinx).
|
2021-06-19 22:12:32 +02:00
|
|
|
|
futhark =
|
2021-10-26 12:20:34 +02:00
|
|
|
|
overrideCabal
|
2020-03-30 08:18:51 +02:00
|
|
|
|
(_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/
|
2020-04-15 18:02:43 +02:00
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
})
|
|
|
|
|
(addBuildTools (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx]) super.futhark);
|
2018-10-18 14:57:00 +02:00
|
|
|
|
|
2021-11-14 11:19:51 +01:00
|
|
|
|
git-annex = let
|
|
|
|
|
pathForDarwin = pkgs.lib.makeBinPath [ pkgs.coreutils ];
|
|
|
|
|
in overrideCabal (drv: pkgs.lib.optionalAttrs (!pkgs.stdenv.isLinux) {
|
|
|
|
|
# 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 = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
|
|
|
|
|
substituteInPlace Test.hs \
|
|
|
|
|
--replace ', testCase "crypto" test_crypto' ""
|
|
|
|
|
'' + (drv.postPatch or "");
|
|
|
|
|
# On Darwin, git-annex mis-detects options to `cp`, so we wrap the
|
|
|
|
|
# binary to ensure it uses Nixpkgs' coreutils.
|
|
|
|
|
postFixup = ''
|
|
|
|
|
wrapProgram $out/bin/git-annex \
|
|
|
|
|
--prefix PATH : "${pathForDarwin}"
|
|
|
|
|
'' + (drv.postFixup or "");
|
|
|
|
|
buildTools = [
|
|
|
|
|
pkgs.buildPackages.makeWrapper
|
|
|
|
|
] ++ (drv.buildTools or []);
|
2021-11-14 11:21:27 +01:00
|
|
|
|
}) (super.git-annex.override {
|
|
|
|
|
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
|
|
|
|
|
fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null;
|
|
|
|
|
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
|
|
|
|
|
});
|
2019-01-06 06:53:21 +01:00
|
|
|
|
|
2018-10-18 14:57:00 +02:00
|
|
|
|
# The test suite has undeclared dependencies on git.
|
|
|
|
|
githash = dontCheck super.githash;
|
|
|
|
|
|
2019-01-06 14:30:37 +01:00
|
|
|
|
# Avoid infitite recursion with yaya.
|
|
|
|
|
yaya-hedgehog = super.yaya-hedgehog.override { yaya = dontCheck self.yaya; };
|
|
|
|
|
|
2019-01-29 10:08:07 +01:00
|
|
|
|
# Avoid infitite recursion with tonatona.
|
|
|
|
|
tonaparser = dontCheck super.tonaparser;
|
|
|
|
|
|
2019-06-01 17:44:48 +02: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 20:30:19 +02:00
|
|
|
|
http-download = dontCheck super.http-download;
|
2019-08-11 20:36:54 +02:00
|
|
|
|
pantry = dontCheck super.pantry;
|
2019-06-01 17:44:48 +02:00
|
|
|
|
|
2019-10-06 12:42:08 +02:00
|
|
|
|
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
|
|
|
|
# need it during the build itself, too.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
cairo = addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.cairo;
|
|
|
|
|
pango = disableHardening ["fortify"] (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.pango);
|
2019-11-29 02:13:35 +01:00
|
|
|
|
|
|
|
|
|
spago =
|
|
|
|
|
let
|
2021-04-21 15:21:55 +02:00
|
|
|
|
docsSearchApp_0_0_10 = pkgs.fetchurl {
|
|
|
|
|
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/docs-search-app.js";
|
2020-08-16 13:50:44 +02:00
|
|
|
|
sha256 = "0m5ah29x290r0zk19hx2wix2djy7bs4plh9kvjz6bs9r45x25pa5";
|
2019-11-29 02:13:35 +01:00
|
|
|
|
};
|
|
|
|
|
|
2021-04-21 15:21:55 +02:00
|
|
|
|
docsSearchApp_0_0_11 = pkgs.fetchurl {
|
|
|
|
|
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.11/docs-search-app.js";
|
|
|
|
|
sha256 = "17qngsdxfg96cka1cgrl3zdrpal8ll6vyhhnazqm4hwj16ywjm02";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
purescriptDocsSearch_0_0_10 = pkgs.fetchurl {
|
|
|
|
|
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/purescript-docs-search";
|
2020-08-16 13:50:44 +02:00
|
|
|
|
sha256 = "0wc1zyhli4m2yykc6i0crm048gyizxh7b81n8xc4yb7ibjqwhyj3";
|
2019-11-29 02:13:35 +01:00
|
|
|
|
};
|
|
|
|
|
|
2021-04-21 15:21:55 +02:00
|
|
|
|
purescriptDocsSearch_0_0_11 = pkgs.fetchurl {
|
|
|
|
|
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.11/purescript-docs-search";
|
|
|
|
|
sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6";
|
|
|
|
|
};
|
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
spagoWithPatches = appendPatch (
|
2021-06-21 06:33:24 +02:00
|
|
|
|
# Spago needs a small patch to work with versions-5.0.0:
|
|
|
|
|
# https://github.com/purescript/spago/pull/798
|
|
|
|
|
# This can probably be removed with >spago-0.20.3.
|
|
|
|
|
pkgs.fetchpatch {
|
|
|
|
|
url = "https://github.com/purescript/spago/commit/dd4bf4413d9675c1c8065d24d0ed7b345c7fa5dd.patch";
|
|
|
|
|
sha256 = "1i1r3f4n9mlkckx15bfrdy5m7gjf0zx7ycwyqra6qn34zpcbzpmf";
|
|
|
|
|
}
|
2021-10-26 12:20:34 +02:00
|
|
|
|
) super.spago;
|
2021-06-21 06:33:24 +02:00
|
|
|
|
|
|
|
|
|
spagoWithOverrides = spagoWithPatches.override {
|
2021-06-14 03:48:56 +02:00
|
|
|
|
# spago has not yet been updated for the latest dhall.
|
|
|
|
|
dhall = self.dhall_1_38_1;
|
|
|
|
|
};
|
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
spagoDocs = overrideCabal (drv: {
|
2019-11-29 02:13:35 +01:00
|
|
|
|
postUnpack = (drv.postUnpack or "") + ''
|
|
|
|
|
# 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
|
2021-04-21 15:21:55 +02:00
|
|
|
|
cp ${docsSearchApp_0_0_10} "$sourceRoot/templates/docs-search-app-0.0.10.js"
|
|
|
|
|
cp ${docsSearchApp_0_0_11} "$sourceRoot/templates/docs-search-app-0.0.11.js"
|
|
|
|
|
cp ${purescriptDocsSearch_0_0_10} "$sourceRoot/templates/purescript-docs-search-0.0.10"
|
|
|
|
|
cp ${purescriptDocsSearch_0_0_11} "$sourceRoot/templates/purescript-docs-search-0.0.11"
|
2020-02-18 12:08:00 +01: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).
|
2021-04-21 15:21:55 +02:00
|
|
|
|
chmod u+w \
|
|
|
|
|
"$sourceRoot/templates/docs-search-app-0.0.10.js" \
|
|
|
|
|
"$sourceRoot/templates/purescript-docs-search-0.0.10" \
|
|
|
|
|
"$sourceRoot/templates/docs-search-app-0.0.11.js" \
|
|
|
|
|
"$sourceRoot/templates/purescript-docs-search-0.0.11"
|
2019-11-29 02:13:35 +01:00
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) spagoWithOverrides;
|
2019-11-29 02:13:35 +01:00
|
|
|
|
|
2021-05-07 03:27:27 +02:00
|
|
|
|
# Tests require network access.
|
|
|
|
|
spagoWithoutChecks = dontCheck spagoDocs;
|
2019-11-29 02:13:35 +01:00
|
|
|
|
in
|
|
|
|
|
spagoWithoutChecks;
|
2020-01-02 13:30:18 +01: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 02:23:23 +01:00
|
|
|
|
|
|
|
|
|
# mplayer-spot uses mplayer at runtime.
|
|
|
|
|
mplayer-spot =
|
2021-01-10 20:08:30 +01:00
|
|
|
|
let path = pkgs.lib.makeBinPath [ pkgs.mplayer ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
in overrideCabal (oldAttrs: {
|
2020-02-13 02:23:23 +01:00
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/mplayer-spot --prefix PATH : "${path}"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) (addBuildTool pkgs.buildPackages.makeWrapper super.mplayer-spot);
|
2020-02-21 12:02:00 +01:00
|
|
|
|
|
|
|
|
|
# break infinite recursion with base-orphans
|
|
|
|
|
primitive = dontCheck super.primitive;
|
2020-10-16 22:37:09 +02:00
|
|
|
|
primitive_0_7_1_0 = dontCheck super.primitive_0_7_1_0;
|
2020-02-21 12:02:00 +01:00
|
|
|
|
|
2020-04-16 14:27:36 +02:00
|
|
|
|
cut-the-crap =
|
2021-05-17 12:52:17 +02:00
|
|
|
|
let path = pkgs.lib.makeBinPath [ pkgs.ffmpeg pkgs.youtube-dl ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
in overrideCabal (_drv: {
|
2020-04-16 14:27:36 +02:00
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/cut-the-crap \
|
|
|
|
|
--prefix PATH : "${path}"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap);
|
2020-05-03 16:51:09 +02:00
|
|
|
|
|
|
|
|
|
# Tests access homeless-shelter.
|
|
|
|
|
hie-bios = dontCheck super.hie-bios;
|
2020-06-04 00:20:49 +02:00
|
|
|
|
hie-bios_0_5_0 = dontCheck super.hie-bios_0_5_0;
|
2020-05-07 19:43:28 +02:00
|
|
|
|
|
|
|
|
|
# Compiling the readme throws errors and has no purpose in nixpkgs
|
|
|
|
|
aeson-gadt-th =
|
2021-10-26 12:20:34 +02:00
|
|
|
|
disableCabalFlag "build-readme" (doJailbreak super.aeson-gadt-th);
|
2020-05-07 19:43:28 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
neuron = overrideCabal (drv: {
|
2020-05-07 19:43:28 +02:00
|
|
|
|
# neuron expects the neuron-search script to be in PATH at built-time.
|
2021-06-19 22:12:32 +02:00
|
|
|
|
buildTools = [ pkgs.buildPackages.makeWrapper ];
|
2020-05-07 19:43:28 +02:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp src-bash/neuron-search $out/bin/neuron-search
|
|
|
|
|
chmod +x $out/bin/neuron-search
|
|
|
|
|
wrapProgram $out/bin/neuron-search --prefix 'PATH' ':' ${
|
|
|
|
|
with pkgs;
|
|
|
|
|
lib.makeBinPath [ fzf ripgrep gawk bat findutils envsubst ]
|
|
|
|
|
}
|
|
|
|
|
PATH=$PATH:$out/bin
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.neuron;
|
2020-05-07 19:43:28 +02:00
|
|
|
|
|
2020-05-24 08:37:41 +02:00
|
|
|
|
# Fix compilation of Setup.hs by removing the module declaration.
|
|
|
|
|
# See: https://github.com/tippenein/guid/issues/1
|
2021-10-26 12:20:34 +02:00
|
|
|
|
guid = overrideCabal (drv: {
|
2020-05-24 08:37:41 +02:00
|
|
|
|
prePatch = "sed -i '1d' Setup.hs"; # 1st line is module declaration, remove it
|
|
|
|
|
doCheck = false;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.guid;
|
2020-05-24 08:37:41 +02:00
|
|
|
|
|
2020-05-27 03:48:34 +02:00
|
|
|
|
# Tests disabled as recommended at https://github.com/luke-clifton/shh/issues/39
|
|
|
|
|
shh = dontCheck super.shh;
|
|
|
|
|
|
2020-06-19 21:13:44 +02:00
|
|
|
|
# The test suites fail because there's no PostgreSQL database running in our
|
|
|
|
|
# build sandbox.
|
2020-06-19 21:14:12 +02:00
|
|
|
|
hasql-queue = dontCheck super.hasql-queue;
|
2020-06-19 21:17:43 +02:00
|
|
|
|
postgresql-libpq-notify = dontCheck super.postgresql-libpq-notify;
|
|
|
|
|
postgresql-pure = dontCheck super.postgresql-pure;
|
2020-06-19 21:13:44 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
retrie = overrideCabal (drv: {
|
2020-08-16 13:47:49 +02:00
|
|
|
|
testToolDepends = [ pkgs.git pkgs.mercurial ];
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.retrie;
|
2020-08-16 13:47:49 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
nix-output-monitor = overrideCabal {
|
2020-10-09 22:43:10 +02:00
|
|
|
|
# Can't ran the golden-tests with nix, because they call nix
|
|
|
|
|
testTarget = "unit-tests";
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.nix-output-monitor;
|
2020-10-09 22:43:10 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
haskell-language-server = overrideCabal (drv: {
|
2021-10-04 21:56:48 +02:00
|
|
|
|
postInstall = "ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${self.ghc.version}";
|
2020-11-18 23:32:53 +01:00
|
|
|
|
testToolDepends = [ self.cabal-install pkgs.git ];
|
|
|
|
|
testTarget = "func-test"; # wrapper test accesses internet
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH=$PATH:$PWD/dist/build/haskell-language-server:$PWD/dist/build/haskell-language-server-wrapper
|
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.haskell-language-server;
|
2020-11-29 00:08:39 +01:00
|
|
|
|
|
|
|
|
|
# tests depend on a specific version of solc
|
|
|
|
|
hevm = dontCheck (doJailbreak super.hevm);
|
2021-02-16 10:44:14 +01:00
|
|
|
|
|
2021-02-16 13:03:00 +01:00
|
|
|
|
# hadolint enables static linking by default in the cabal file, so we have to explicitly disable it.
|
|
|
|
|
# https://github.com/hadolint/hadolint/commit/e1305042c62d52c2af4d77cdce5d62f6a0a3ce7b
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hadolint = disableCabalFlag "static" super.hadolint;
|
2021-03-12 15:32:31 +01:00
|
|
|
|
|
|
|
|
|
# Test suite tries to execute the build product "doctest-driver-gen", but it's not in $PATH.
|
|
|
|
|
doctest-driver-gen = dontCheck super.doctest-driver-gen;
|
|
|
|
|
|
2021-03-12 16:53:26 +01:00
|
|
|
|
# Tests access internet
|
|
|
|
|
prune-juice = dontCheck super.prune-juice;
|
2021-05-04 13:23:03 +02:00
|
|
|
|
|
|
|
|
|
# based on https://github.com/gibiansky/IHaskell/blob/aafeabef786154d81ab7d9d1882bbcd06fc8c6c4/release.nix
|
2021-10-26 12:20:34 +02:00
|
|
|
|
ihaskell = overrideCabal (drv: {
|
2021-05-04 13:23:03 +02:00
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
# ihaskell's cabal file forces building a shared executable,
|
|
|
|
|
# but without passing --enable-executable-dynamic, the RPATH
|
|
|
|
|
# contains /build/ and leads to a build failure with nix
|
|
|
|
|
"--enable-executable-dynamic"
|
|
|
|
|
];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
export PATH=$PWD/dist/build/ihaskell:$PATH
|
|
|
|
|
export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.ihaskell;
|
2021-05-04 11:20:34 +02:00
|
|
|
|
|
|
|
|
|
# tests need to execute the built executable
|
2021-10-26 12:20:34 +02:00
|
|
|
|
stutter = overrideCabal (drv: {
|
2021-05-04 11:20:34 +02:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH=dist/build/stutter:$PATH
|
|
|
|
|
'' + (drv.preCheck or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.stutter;
|
2021-05-04 11:38:46 +02:00
|
|
|
|
|
|
|
|
|
# Install man page and generate shell completions
|
|
|
|
|
pinboard-notes-backup = overrideCabal
|
|
|
|
|
(drv: {
|
|
|
|
|
postInstall = ''
|
|
|
|
|
install -D man/pnbackup.1 $out/share/man/man1/pnbackup.1
|
|
|
|
|
'' + (drv.postInstall or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
})
|
|
|
|
|
(generateOptparseApplicativeCompletion "pnbackup" super.pinboard-notes-backup);
|
2021-05-06 17:53:13 +02:00
|
|
|
|
|
2021-05-07 12:35:42 +02:00
|
|
|
|
# set more accurate set of platforms instead of maintaining
|
|
|
|
|
# an ever growing list of platforms to exclude via unsupported-platforms
|
2021-10-26 12:20:34 +02:00
|
|
|
|
cpuid = overrideCabal {
|
2021-05-07 12:35:42 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.cpuid;
|
2021-05-07 16:14:07 +02:00
|
|
|
|
|
|
|
|
|
# Pass the correct libarchive into the package.
|
|
|
|
|
streamly-archive = super.streamly-archive.override { archive = pkgs.libarchive; };
|
2021-05-07 13:08:31 +02:00
|
|
|
|
|
|
|
|
|
# passes the -msse2 flag which only works on x86 platforms
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hsignal = overrideCabal {
|
2021-05-07 13:08:31 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.hsignal;
|
2021-05-08 01:04:00 +02:00
|
|
|
|
|
2021-05-18 17:00:53 +02:00
|
|
|
|
# uses x86 intrinsics
|
2021-10-26 12:20:34 +02:00
|
|
|
|
blake3 = overrideCabal {
|
2021-05-18 17:00:53 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.blake3;
|
2021-05-18 17:00:53 +02:00
|
|
|
|
|
|
|
|
|
# uses x86 intrinsics, see also https://github.com/NixOS/nixpkgs/issues/122014
|
2021-10-26 12:20:34 +02:00
|
|
|
|
crc32c = overrideCabal {
|
2021-05-18 17:00:53 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.crc32c;
|
2021-05-18 17:00:53 +02:00
|
|
|
|
|
|
|
|
|
# uses x86 intrinsics
|
2021-10-26 12:20:34 +02:00
|
|
|
|
seqalign = overrideCabal {
|
2021-05-18 17:00:53 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.seqalign;
|
2021-05-18 17:00:53 +02:00
|
|
|
|
|
2021-08-06 15:03:34 +02:00
|
|
|
|
# uses x86 intrinsics
|
2021-10-26 12:20:34 +02:00
|
|
|
|
geomancy = overrideCabal {
|
2021-08-06 15:03:34 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.geomancy;
|
2021-08-06 15:03:34 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hls-brittany-plugin = overrideCabal (drv: {
|
2021-05-08 01:04:00 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-brittany-plugin;
|
|
|
|
|
hls-class-plugin = overrideCabal (drv: {
|
2021-05-08 01:04:00 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-class-plugin;
|
|
|
|
|
hls-ormolu-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-ormolu-plugin;
|
|
|
|
|
hls-fourmolu-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-fourmolu-plugin;
|
|
|
|
|
hls-module-name-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-module-name-plugin;
|
|
|
|
|
hls-rename-plugin = overrideCabal (drv: {
|
2021-09-29 14:18:35 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'' + (drv.preCheck or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-rename-plugin;
|
|
|
|
|
hls-splice-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-splice-plugin;
|
|
|
|
|
hls-floskell-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-floskell-plugin;
|
|
|
|
|
hls-pragmas-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-pragmas-plugin;
|
2021-11-20 02:54:04 +01:00
|
|
|
|
hls-hlint-plugin = overrideCabal (drv: {
|
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
|
|
|
|
}) super.hls-hlint-plugin;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hiedb = overrideCabal (drv: {
|
2021-09-14 01:04:39 +02:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH=$PWD/dist/build/hiedb:$PATH
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hiedb;
|
|
|
|
|
hls-call-hierarchy-plugin = overrideCabal (drv: {
|
2021-09-14 01:04:39 +02:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-call-hierarchy-plugin;
|
2021-05-08 01:04:00 +02:00
|
|
|
|
# Tests have file permissions expections that don‘t work with the nix store.
|
|
|
|
|
hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hls-haddock-comments-plugin = overrideCabal (drv: {
|
2021-05-08 01:04:00 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-haddock-comments-plugin;
|
|
|
|
|
hls-eval-plugin = overrideCabal (drv: {
|
2021-06-20 21:56:34 +02:00
|
|
|
|
testToolDepends = [ pkgs.git ];
|
2021-05-08 01:04:00 +02:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.hls-eval-plugin;
|
2021-05-18 00:05:15 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
taglib = overrideCabal (drv: {
|
2021-05-18 00:05:15 +02:00
|
|
|
|
librarySystemDepends = [
|
|
|
|
|
pkgs.zlib
|
|
|
|
|
] ++ (drv.librarySystemDepends or []);
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.taglib;
|
2021-05-18 17:03:48 +02:00
|
|
|
|
|
2021-05-18 17:46:04 +02:00
|
|
|
|
# uses x86 assembler
|
2021-10-26 12:20:34 +02:00
|
|
|
|
inline-asm = overrideCabal {
|
2021-05-18 18:12:18 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.inline-asm;
|
2021-05-18 17:48:31 +02:00
|
|
|
|
|
|
|
|
|
# uses x86 assembler in C bits
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hw-prim-bits = overrideCabal {
|
2021-05-18 17:48:31 +02:00
|
|
|
|
platforms = pkgs.lib.platforms.x86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.hw-prim-bits;
|
2021-05-19 14:51:41 +02:00
|
|
|
|
|
|
|
|
|
# random 1.2.0 has tests that indirectly depend on
|
|
|
|
|
# itself causing an infinite recursion at evaluation
|
|
|
|
|
# time
|
|
|
|
|
random = dontCheck super.random;
|
2021-06-05 16:52:14 +02:00
|
|
|
|
|
|
|
|
|
# Since this package is primarily used by nixpkgs maintainers and is probably
|
2021-06-17 09:52:14 +02:00
|
|
|
|
# not used to link against by anyone, we can make it’s closure smaller and
|
|
|
|
|
# add its runtime dependencies in `haskellPackages` (as opposed to cabal2nix).
|
|
|
|
|
cabal2nix-unstable = overrideCabal
|
|
|
|
|
(drv: {
|
|
|
|
|
buildTools = (drv.buildTools or []) ++ [
|
2021-06-19 22:12:32 +02:00
|
|
|
|
pkgs.buildPackages.makeWrapper
|
2021-06-17 09:52:14 +02:00
|
|
|
|
];
|
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/cabal2nix \
|
|
|
|
|
--prefix PATH ":" "${
|
|
|
|
|
pkgs.lib.makeBinPath [ pkgs.nix pkgs.nix-prefetch-scripts ]
|
|
|
|
|
}"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
})
|
|
|
|
|
(justStaticExecutables super.cabal2nix-unstable);
|
2021-06-05 17:56:33 +02:00
|
|
|
|
|
|
|
|
|
# test suite needs local redis daemon
|
|
|
|
|
nri-redis = dontCheck super.nri-redis;
|
2021-06-05 18:39:33 +02:00
|
|
|
|
|
|
|
|
|
# Make tophat find itself for _compiling_ its test suite
|
2021-10-26 12:20:34 +02:00
|
|
|
|
tophat = overrideCabal (drv: {
|
2021-06-05 18:39:33 +02:00
|
|
|
|
postPatch = ''
|
|
|
|
|
sed -i 's|"tophat"|"./dist/build/tophat/tophat"|' app-test-bin/*.hs
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.tophat;
|
2021-06-09 15:15:39 +02:00
|
|
|
|
|
|
|
|
|
# Runtime dependencies and CLI completion
|
|
|
|
|
nvfetcher = generateOptparseApplicativeCompletion "nvfetcher" (overrideCabal
|
2021-10-26 12:20:34 +02:00
|
|
|
|
(drv: {
|
2021-09-30 22:28:05 +02:00
|
|
|
|
# test needs network
|
|
|
|
|
doCheck = false;
|
2021-06-19 22:12:32 +02:00
|
|
|
|
buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
|
2021-06-09 15:15:39 +02:00
|
|
|
|
postInstall = drv.postInstall or "" + ''
|
|
|
|
|
wrapProgram "$out/bin/nvfetcher" --prefix 'PATH' ':' "${
|
|
|
|
|
pkgs.lib.makeBinPath [ pkgs.nvchecker pkgs.nix-prefetch-git ]
|
|
|
|
|
}"
|
|
|
|
|
'';
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.nvfetcher);
|
2021-06-09 15:15:39 +02:00
|
|
|
|
|
2021-10-26 12:20:34 +02:00
|
|
|
|
rel8 = addTestToolDepend pkgs.postgresql super.rel8;
|
2021-06-20 23:52:20 +02:00
|
|
|
|
|
2021-11-11 11:45:47 +01:00
|
|
|
|
cachix = generateOptparseApplicativeCompletion "cachix" (super.cachix.override { nix = pkgs.nix_2_4; });
|
2021-06-21 20:14:35 +02:00
|
|
|
|
|
2021-11-14 16:35:29 +01:00
|
|
|
|
hercules-ci-agent = appendConfigureFlag "-fnix-2_4" (super.hercules-ci-agent.override { nix = pkgs.nix_2_4; });
|
|
|
|
|
hercules-ci-cnix-expr = appendConfigureFlag "-fnix-2_4" (super.hercules-ci-cnix-expr.override { nix = pkgs.nix_2_4; });
|
|
|
|
|
hercules-ci-cnix-store = appendConfigureFlag "-fnix-2_4" (super.hercules-ci-cnix-store.override { nix = pkgs.nix_2_4; });
|
2021-06-21 20:14:35 +02:00
|
|
|
|
|
2021-07-14 22:51:07 +02:00
|
|
|
|
# Enable extra optimisations which increase build time, but also
|
|
|
|
|
# later compiler performance, so we should do this for user's benefit.
|
|
|
|
|
# Flag added in Agda 2.6.2
|
2021-10-26 12:20:34 +02:00
|
|
|
|
Agda = appendConfigureFlag "-foptimise-heavily" super.Agda;
|
2021-07-14 22:51:07 +02:00
|
|
|
|
|
2021-08-06 02:46:16 +02:00
|
|
|
|
# ats-format uses cli-setup in Setup.hs which is quite happy to write
|
|
|
|
|
# to arbitrary files in $HOME. This doesn't either not achieve anything
|
|
|
|
|
# or even fail, so we prevent it and install everything necessary ourselves.
|
|
|
|
|
# See also: https://hackage.haskell.org/package/cli-setup-0.2.1.4/docs/src/Distribution.CommandLine.html#setManpathGeneric
|
|
|
|
|
ats-format = generateOptparseApplicativeCompletion "atsfmt" (
|
|
|
|
|
justStaticExecutables (
|
2021-10-26 12:20:34 +02:00
|
|
|
|
overrideCabal (drv: {
|
2021-08-06 02:46:16 +02:00
|
|
|
|
# use vanilla Setup.hs
|
|
|
|
|
preCompileBuildDriver = ''
|
|
|
|
|
cat > Setup.hs << EOF
|
|
|
|
|
module Main where
|
|
|
|
|
import Distribution.Simple
|
|
|
|
|
main = defaultMain
|
|
|
|
|
EOF
|
|
|
|
|
'' + (drv.preCompileBuildDriver or "");
|
|
|
|
|
# install man page
|
|
|
|
|
buildTools = [
|
|
|
|
|
pkgs.buildPackages.installShellFiles
|
|
|
|
|
] ++ (drv.buildTools or []);
|
|
|
|
|
postInstall = ''
|
|
|
|
|
installManPage man/atsfmt.1
|
|
|
|
|
'' + (drv.postInstall or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.ats-format
|
2021-08-06 02:46:16 +02:00
|
|
|
|
)
|
|
|
|
|
);
|
2021-09-06 19:12:15 +02:00
|
|
|
|
|
|
|
|
|
# Test suite is just the default example executable which doesn't work if not
|
|
|
|
|
# executed by Setup.hs, but works if started on a proper TTY
|
|
|
|
|
isocline = dontCheck super.isocline;
|
2021-10-02 12:50:30 +02:00
|
|
|
|
|
|
|
|
|
# Some hash implementations are x86 only, but part of the test suite.
|
|
|
|
|
# So executing and building it on non-x86 platforms will always fail.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
hashes = overrideCabal {
|
2021-10-02 12:50:30 +02:00
|
|
|
|
doCheck = with pkgs.stdenv; hostPlatform == buildPlatform
|
|
|
|
|
&& buildPlatform.isx86;
|
2021-10-26 12:20:34 +02:00
|
|
|
|
} super.hashes;
|
2021-10-13 12:31:31 +02:00
|
|
|
|
|
|
|
|
|
# procex relies on close_range which has been introduced in Linux 5.9,
|
|
|
|
|
# the test suite seems to force the use of this feature (or the fallback
|
|
|
|
|
# mechanism is broken), so we can't run the test suite on machines with a
|
|
|
|
|
# Kernel < 5.9. To check for this, we use uname -r to obtain the Kernel
|
|
|
|
|
# version and sort -V to compare against our minimum version. If the
|
|
|
|
|
# Kernel turns out to be older, we disable the test suite.
|
2021-10-26 12:20:34 +02:00
|
|
|
|
procex = overrideCabal (drv: {
|
2021-10-13 12:31:31 +02:00
|
|
|
|
postConfigure = ''
|
|
|
|
|
minimumKernel=5.9
|
|
|
|
|
higherVersion=`printf "%s\n%s\n" "$minimumKernel" "$(uname -r)" | sort -rV | head -n1`
|
|
|
|
|
if [[ "$higherVersion" = "$minimumKernel" ]]; then
|
|
|
|
|
echo "Used Kernel doesn't support close_range, disabling tests"
|
|
|
|
|
unset doCheck
|
|
|
|
|
fi
|
|
|
|
|
'' + (drv.postConfigure or "");
|
2021-10-26 12:20:34 +02:00
|
|
|
|
}) super.procex;
|
2017-02-02 16:49:28 +01:00
|
|
|
|
}
|