2020-04-24 23:36:52 +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.
|
|
|
|
|
{ pkgs, haskellLib }:
|
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
|
let
|
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
in
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
with haskellLib;
|
|
|
|
|
|
|
|
|
|
# All of the overrides in this set should look like:
|
|
|
|
|
#
|
|
|
|
|
# foo = ... something involving super.foo ...
|
|
|
|
|
#
|
|
|
|
|
# but that means that we add `foo` attribute even if there is no `super.foo`! So if
|
|
|
|
|
# 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`).
|
|
|
|
|
self: super: builtins.intersectAttrs super {
|
|
|
|
|
|
|
|
|
|
# Apply NixOS-specific patches.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
ghc-paths = appendPatch ./patches/ghc-paths-nix.patch super.ghc-paths;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
|
#######################################
|
|
|
|
|
### HASKELL-LANGUAGE-SERVER SECTION ###
|
|
|
|
|
#######################################
|
|
|
|
|
|
|
|
|
|
haskell-language-server = overrideCabal (drv: {
|
|
|
|
|
# starting with 1.6.1.1 haskell-language-server wants to be linked dynamically
|
|
|
|
|
# by default. Unless we reflect this in the generic builder, GHC is going to
|
|
|
|
|
# produce some illegal references to /build/.
|
|
|
|
|
enableSharedExecutables = true;
|
|
|
|
|
# The shell script wrapper checks that the runtime ghc and its boot packages match the ghc hls was compiled with.
|
|
|
|
|
# This prevents linking issues when running TH splices.
|
|
|
|
|
postInstall = ''
|
|
|
|
|
mv "$out/bin/haskell-language-server" "$out/bin/.haskell-language-server-${self.ghc.version}-unwrapped"
|
2024-07-27 06:49:29 +00:00
|
|
|
|
BOOT_PKGS="ghc-${self.ghc.version} template-haskell-$(ghc-pkg-${self.ghc.version} --global --simple-output field template-haskell version)"
|
2023-04-12 12:48:02 +00:00
|
|
|
|
${pkgs.buildPackages.gnused}/bin/sed \
|
|
|
|
|
-e "s!@@EXE_DIR@@!$out/bin!" \
|
|
|
|
|
-e "s/@@EXE_NAME@@/.haskell-language-server-${self.ghc.version}-unwrapped/" \
|
|
|
|
|
-e "s/@@GHC_VERSION@@/${self.ghc.version}/" \
|
|
|
|
|
-e "s/@@BOOT_PKGS@@/$BOOT_PKGS/" \
|
|
|
|
|
-e "s/@@ABI_HASHES@@/$(for dep in $BOOT_PKGS; do printf "%s:" "$dep" && ghc-pkg-${self.ghc.version} field $dep abi --simple-output ; done | tr '\n' ' ' | xargs)/" \
|
2023-10-09 19:29:22 +00:00
|
|
|
|
-e "s!Consider installing ghc.* via ghcup or build HLS from source.!Visit https://nixos.org/manual/nixpkgs/unstable/#haskell-language-server to learn how to correctly install a matching hls for your ghc with nix.!" \
|
2023-04-12 12:48:02 +00:00
|
|
|
|
bindist/wrapper.in > "$out/bin/haskell-language-server"
|
|
|
|
|
ln -s "$out/bin/haskell-language-server" "$out/bin/haskell-language-server-${self.ghc.version}"
|
|
|
|
|
chmod +x "$out/bin/haskell-language-server"
|
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
}) super.haskell-language-server;
|
|
|
|
|
|
|
|
|
|
# ghcide-bench tests need network
|
|
|
|
|
ghcide-bench = dontCheck super.ghcide-bench;
|
|
|
|
|
|
|
|
|
|
# 2023-04-01: TODO: Either reenable at least some tests or remove the preCheck override
|
|
|
|
|
ghcide = overrideCabal (drv: {
|
|
|
|
|
# tests depend on executable
|
|
|
|
|
preCheck = ''export PATH="$PWD/dist/build/ghcide:$PATH"'';
|
|
|
|
|
# tests disabled because they require network
|
|
|
|
|
doCheck = false;
|
|
|
|
|
}) super.ghcide;
|
|
|
|
|
|
|
|
|
|
hiedb = overrideCabal (drv: {
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH=$PWD/dist/build/hiedb:$PATH
|
|
|
|
|
'';
|
|
|
|
|
}) super.hiedb;
|
|
|
|
|
|
|
|
|
|
# Tests access homeless-shelter.
|
|
|
|
|
hie-bios = dontCheck super.hie-bios;
|
|
|
|
|
|
|
|
|
|
###########################################
|
|
|
|
|
### END HASKELL-LANGUAGE-SERVER SECTION ###
|
|
|
|
|
###########################################
|
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
|
# Test suite needs executable
|
|
|
|
|
agda2lagda = overrideCabal (drv: {
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH="$PWD/dist/build/agda2lagda:$PATH"
|
|
|
|
|
'' + drv.preCheck or "";
|
|
|
|
|
}) super.agda2lagda;
|
|
|
|
|
|
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
audacity = enableCabalFlag "buildExamples" (overrideCabal (drv: {
|
|
|
|
|
executableHaskellDepends = [self.optparse-applicative self.soxlib];
|
|
|
|
|
}) super.audacity);
|
|
|
|
|
# 2023-04-27: Deactivating examples for now because they cause a non-trivial build failure.
|
|
|
|
|
# med-module = enableCabalFlag "buildExamples" super.med-module;
|
|
|
|
|
spreadsheet = enableCabalFlag "buildExamples" (overrideCabal (drv: {
|
|
|
|
|
executableHaskellDepends = [self.optparse-applicative self.shell-utility];
|
|
|
|
|
}) super.spreadsheet);
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# fix errors caused by hardening flags
|
2021-12-06 16:07:01 +00:00
|
|
|
|
epanet-haskell = disableHardening ["format"] super.epanet-haskell;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Link the proper version.
|
|
|
|
|
zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; };
|
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
# cabal2nix incorrectly resolves this to pkgs.zip (could be improved over there).
|
|
|
|
|
streamly-zip = super.streamly-zip.override { zip = pkgs.libzip; };
|
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
threadscope = enableSeparateBinOutput super.threadscope;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Use the default version of mysql to build this package (which is actually mariadb).
|
|
|
|
|
# test phase requires networking
|
2021-06-28 23:13:55 +00:00
|
|
|
|
mysql = dontCheck super.mysql;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# CUDA needs help finding the SDK headers and libraries.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
cuda = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
|
|
|
|
|
configureFlags = (drv.configureFlags or []) ++ [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib"
|
|
|
|
|
"--extra-include-dirs=${pkgs.cudatoolkit}/include"
|
|
|
|
|
];
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.cuda;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
nvvm = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.nvvm;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
# hledger* overrides
|
|
|
|
|
inherit (
|
|
|
|
|
let
|
2024-09-19 14:19:46 +00:00
|
|
|
|
installHledgerExtraFiles = manpagePathPrefix: overrideCabal (drv: {
|
2023-07-15 17:15:38 +00:00
|
|
|
|
buildTools = drv.buildTools or [] ++ [
|
|
|
|
|
pkgs.buildPackages.installShellFiles
|
|
|
|
|
];
|
|
|
|
|
postInstall = ''
|
|
|
|
|
for i in $(seq 1 9); do
|
2024-09-19 14:19:46 +00:00
|
|
|
|
installManPage ./${manpagePathPrefix}/*.$i
|
2023-07-15 17:15:38 +00:00
|
|
|
|
done
|
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
install -v -Dm644 ./${manpagePathPrefix}/*.info* -t "$out/share/info/"
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
|
|
if [ -e shell-completion/hledger-completion.bash ]; then
|
|
|
|
|
installShellCompletion --name hledger shell-completion/hledger-completion.bash
|
|
|
|
|
fi
|
2023-07-15 17:15:38 +00:00
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
hledgerWebTestFix = overrideCabal (drv: {
|
|
|
|
|
preCheck = ''
|
|
|
|
|
${drv.preCheck or ""}
|
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
in
|
|
|
|
|
{
|
2024-09-19 14:19:46 +00:00
|
|
|
|
hledger = installHledgerExtraFiles "" super.hledger;
|
|
|
|
|
hledger-web = installHledgerExtraFiles "" (hledgerWebTestFix super.hledger-web);
|
|
|
|
|
hledger-ui = installHledgerExtraFiles "" super.hledger-ui;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
hledger_1_34 = installHledgerExtraFiles "embeddedfiles"
|
|
|
|
|
(doDistribute (super.hledger_1_34.override {
|
|
|
|
|
hledger-lib = self.hledger-lib_1_34;
|
|
|
|
|
}));
|
|
|
|
|
hledger-ui_1_34 = installHledgerExtraFiles ""
|
|
|
|
|
(doDistribute (super.hledger-ui_1_34.override {
|
|
|
|
|
hledger = self.hledger_1_34;
|
|
|
|
|
hledger-lib = self.hledger-lib_1_34;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
}));
|
2024-09-19 14:19:46 +00:00
|
|
|
|
hledger-web_1_34 = installHledgerExtraFiles "" (hledgerWebTestFix
|
|
|
|
|
(doDistribute (super.hledger-web_1_34.override {
|
|
|
|
|
hledger = self.hledger_1_34;
|
|
|
|
|
hledger-lib = self.hledger-lib_1_34;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
})));
|
|
|
|
|
}
|
|
|
|
|
) hledger
|
|
|
|
|
hledger-web
|
|
|
|
|
hledger-ui
|
2024-09-19 14:19:46 +00:00
|
|
|
|
hledger_1_34
|
|
|
|
|
hledger-ui_1_34
|
|
|
|
|
hledger-web_1_34
|
2023-07-15 17:15:38 +00:00
|
|
|
|
;
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
cufft = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
export CUDA_PATH=${pkgs.cudatoolkit}
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.cufft;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# jni needs help finding libjvm.so because it's in a weird location.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
jni = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" )
|
|
|
|
|
configureFlags+=" --extra-lib-dir=''${libdir[0]}"
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.jni;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Won't find it's header files without help.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
sfml-audio = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.sfml-audio;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# avoid compiling twice by providing executable as a separate output (with small closure size)
|
2023-07-15 17:15:38 +00:00
|
|
|
|
cabal-fmt = enableSeparateBinOutput super.cabal-fmt;
|
|
|
|
|
hindent = enableSeparateBinOutput super.hindent;
|
|
|
|
|
releaser = enableSeparateBinOutput super.releaser;
|
|
|
|
|
eventlog2html = enableSeparateBinOutput super.eventlog2html;
|
|
|
|
|
ghc-debug-brick = enableSeparateBinOutput super.ghc-debug-brick;
|
|
|
|
|
nixfmt = enableSeparateBinOutput super.nixfmt;
|
|
|
|
|
calligraphy = enableSeparateBinOutput super.calligraphy;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
niv = overrideCabal (drv: {
|
|
|
|
|
buildTools = (drv.buildTools or []) ++ [ pkgs.buildPackages.makeWrapper ];
|
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram ''${!outputBin}/bin/niv --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.nix ]}
|
|
|
|
|
'';
|
|
|
|
|
})
|
|
|
|
|
(enableSeparateBinOutput (self.generateOptparseApplicativeCompletions [ "niv" ] super.niv));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
ghcid = enableSeparateBinOutput super.ghcid;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu);
|
2023-08-22 20:05:09 +00:00
|
|
|
|
hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] super.hnix;
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
|
|
# Generate shell completion.
|
2022-10-21 18:38:19 +00:00
|
|
|
|
cabal2nix = self.generateOptparseApplicativeCompletions [ "cabal2nix" ] super.cabal2nix;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
|
arbtt = overrideCabal (drv: {
|
2024-07-27 06:49:29 +00:00
|
|
|
|
buildTools = drv.buildTools or [] ++ [
|
|
|
|
|
pkgs.buildPackages.installShellFiles
|
|
|
|
|
pkgs.buildPackages.libxslt
|
|
|
|
|
];
|
|
|
|
|
postBuild = ''
|
|
|
|
|
xsl=${pkgs.buildPackages.docbook_xsl}/share/xml/docbook-xsl
|
|
|
|
|
make -C doc man XSLTPROC_MAN_STYLESHEET=$xsl/manpages/profile-docbook.xsl
|
|
|
|
|
'';
|
|
|
|
|
postInstall = ''
|
|
|
|
|
for f in doc/man/man[1-9]/*; do
|
|
|
|
|
installManPage $f
|
|
|
|
|
done
|
|
|
|
|
'';
|
2022-06-26 10:26:21 +00:00
|
|
|
|
# The test suite needs the packages's executables in $PATH to succeed.
|
|
|
|
|
preCheck = ''
|
|
|
|
|
for i in $PWD/dist/build/*; do
|
|
|
|
|
export PATH="$i:$PATH"
|
|
|
|
|
done
|
|
|
|
|
'';
|
|
|
|
|
# One test uses timezone data
|
|
|
|
|
testToolDepends = drv.testToolDepends or [] ++ [
|
|
|
|
|
pkgs.tzdata
|
|
|
|
|
];
|
|
|
|
|
}) super.arbtt;
|
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
|
hzk = appendConfigureFlag "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" super.hzk;
|
2020-04-24 23:36:52 +00: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
|
2022-12-28 21:21:41 +00:00
|
|
|
|
heist = addTestToolDepend pkgs.pandoc super.heist;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
|
# Use Nixpkgs' double-conversion library
|
|
|
|
|
double-conversion = disableCabalFlag "embedded_double_conversion" (
|
|
|
|
|
addBuildDepends [ pkgs.double-conversion ] super.double-conversion
|
|
|
|
|
);
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
|
2023-05-24 13:37:59 +00:00
|
|
|
|
gio = lib.pipe super.gio
|
|
|
|
|
[ (disableHardening ["fortify"])
|
|
|
|
|
(addBuildTool self.buildHaskellPackages.gtk2hs-buildtools)
|
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
glib = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.glib));
|
|
|
|
|
gtk3 = disableHardening ["fortify"] (super.gtk3.override { inherit (pkgs) gtk3; });
|
2023-05-24 13:37:59 +00:00
|
|
|
|
gtk = lib.pipe super.gtk (
|
|
|
|
|
[ (disableHardening ["fortify"])
|
|
|
|
|
(addBuildTool self.buildHaskellPackages.gtk2hs-buildtools)
|
|
|
|
|
] ++
|
2024-09-26 11:04:55 +00:00
|
|
|
|
( if pkgs.stdenv.hostPlatform.isDarwin then [(appendConfigureFlag "-fhave-quartz-gtk")] else [] )
|
2023-05-24 13:37:59 +00:00
|
|
|
|
);
|
2021-12-06 16:07:01 +00:00
|
|
|
|
gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2;
|
|
|
|
|
gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
|
shelly = overrideCabal (drv: {
|
|
|
|
|
# /usr/bin/env is unavailable in the sandbox
|
|
|
|
|
preCheck = drv.preCheck or "" + ''
|
|
|
|
|
chmod +x ./test/data/*.sh
|
|
|
|
|
patchShebangs --build test/data
|
|
|
|
|
'';
|
|
|
|
|
}) super.shelly;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Add necessary reference to gtk3 package
|
2021-12-06 16:07:01 +00:00
|
|
|
|
gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
|
# Doesn't declare boost dependency
|
2024-09-19 14:19:46 +00:00
|
|
|
|
nix-serve-ng = (overrideSrc {
|
2024-01-02 11:29:13 +00:00
|
|
|
|
version = "1.0.0-unstable-2023-12-18";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
repo = "nix-serve-ng";
|
|
|
|
|
owner = "aristanetworks";
|
|
|
|
|
rev = "21e65cb4c62b5c9e3acc11c3c5e8197248fa46a4";
|
|
|
|
|
hash = "sha256-qseX+/8drgwxOb1I3LKqBYMkmyeI5d5gmHqbZccR660=";
|
|
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
|
} (addPkgconfigDepend pkgs.boost.dev super.nix-serve-ng)).override {
|
|
|
|
|
nix = pkgs.nixVersions.nix_2_18;
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00: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
|
2021-12-06 16:07:01 +00:00
|
|
|
|
hjsonschema = overrideCabal (drv: { testTarget = "local"; }) super.hjsonschema;
|
2020-04-24 23:36:52 +00: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-23 08:02:39 +00:00
|
|
|
|
oidc-client = dontCheck super.oidc-client; # the spec runs openid against google.com
|
2022-03-30 09:31:56 +00:00
|
|
|
|
persistent-migration = dontCheck super.persistent-migration; # spec requires pg_ctl binary
|
2020-04-24 23:36:52 +00:00
|
|
|
|
pipes-mongodb = dontCheck super.pipes-mongodb; # http://hydra.cryp.to/build/926195/log/raw
|
2021-02-22 21:28:39 +00:00
|
|
|
|
pixiv = dontCheck super.pixiv;
|
2020-04-24 23:36:52 +00: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
|
|
|
|
|
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
|
|
|
|
|
download = dontCheck super.download;
|
|
|
|
|
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-22 21:28:39 +00:00
|
|
|
|
telegraph = dontCheck super.telegraph;
|
2020-04-24 23:36:52 +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;
|
2021-06-04 09:07:49 +00:00
|
|
|
|
arch-web = dontCheck super.arch-web;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
# The curl executable is required for withApplication tests.
|
|
|
|
|
warp = addTestToolDepend pkgs.curl super.warp;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
warp_3_3_30 = addTestToolDepend pkgs.curl super.warp_3_3_30;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
safe-exceptions = overrideCabal (drv: {
|
|
|
|
|
# Fix strictDeps build error "could not execute: hspec-discover"
|
|
|
|
|
testToolDepends = drv.testToolDepends or [] ++ [ self.hspec-discover ];
|
|
|
|
|
}) super.safe-exceptions;
|
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
|
# Test suite requires running a database server. Testing is done upstream.
|
|
|
|
|
hasql = dontCheck super.hasql;
|
|
|
|
|
hasql-dynamic-statements = dontCheck super.hasql-dynamic-statements;
|
|
|
|
|
hasql-interpolate = dontCheck super.hasql-interpolate;
|
|
|
|
|
hasql-notifications = dontCheck super.hasql-notifications;
|
|
|
|
|
hasql-pool = dontCheck super.hasql-pool;
|
|
|
|
|
hasql-transaction = dontCheck super.hasql-transaction;
|
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
# Test suite requires a running postgresql server,
|
|
|
|
|
# avoid compiling twice by providing executable as a separate output (with small closure size),
|
|
|
|
|
# generate shell completion
|
|
|
|
|
postgrest = lib.pipe super.postgrest [
|
|
|
|
|
dontCheck
|
|
|
|
|
enableSeparateBinOutput
|
|
|
|
|
(self.generateOptparseApplicativeCompletions [ "postgrest" ])
|
|
|
|
|
];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Tries to mess with extended POSIX attributes, but can't in our chroot environment.
|
|
|
|
|
xattr = dontCheck super.xattr;
|
|
|
|
|
|
|
|
|
|
# Needs access to locale data, but looks for it in the wrong place.
|
|
|
|
|
scholdoc-citeproc = dontCheck super.scholdoc-citeproc;
|
|
|
|
|
|
|
|
|
|
# Disable tests because they require a mattermost server
|
|
|
|
|
mattermost-api = dontCheck super.mattermost-api;
|
|
|
|
|
|
|
|
|
|
# Expect to find sendmail(1) in $PATH.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
mime-mail = appendConfigureFlag "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\"" super.mime-mail;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Help the test suite find system timezone data.
|
2024-01-13 08:15:51 +00:00
|
|
|
|
tz = addBuildDepends [ pkgs.tzdata ] super.tz;
|
|
|
|
|
tzdata = addBuildDepends [ pkgs.tzdata ] super.tzdata;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
|
# https://hydra.nixos.org/build/128665302/nixlog/3
|
|
|
|
|
# Disable tests because they require a running dbus session
|
|
|
|
|
xmonad-dbus = dontCheck super.xmonad-dbus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
|
|
|
|
|
# http://hydra.cryp.to/build/1331287/log/raw
|
2023-03-24 00:07:29 +00:00
|
|
|
|
wxc = (addBuildDepend self.split super.wxc).override { wxGTK = pkgs.wxGTK32; };
|
|
|
|
|
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK32; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
|
shellify = enableSeparateBinOutput super.shellify;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
specup = enableSeparateBinOutput super.specup;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Test suite wants to connect to $DISPLAY.
|
2021-09-18 10:52:07 +00: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-12-06 16:07:01 +00:00
|
|
|
|
hsqml = dontCheck (addExtraLibraries [pkgs.libGLU pkgs.libGL] (super.hsqml.override { qt5 = pkgs.qt5Full; }));
|
2021-09-18 10:52:07 +00:00
|
|
|
|
monomer = dontCheck super.monomer;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-08-23 08:02:39 +00:00
|
|
|
|
# Wants to check against a real DB, Needs freetds
|
2021-12-06 16:07:01 +00:00
|
|
|
|
odbc = dontCheck (addExtraLibraries [ pkgs.freetds ] super.odbc);
|
2021-08-23 08:02:39 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Tests attempt to use NPM to install from the network into
|
|
|
|
|
# /homeless-shelter. Disabled.
|
|
|
|
|
purescript = dontCheck super.purescript;
|
|
|
|
|
|
|
|
|
|
# Hardcoded include path
|
2021-12-06 16:07:01 +00:00
|
|
|
|
poppler = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00: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-12-06 16:07:01 +00:00
|
|
|
|
}) super.poppler;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Uses OpenGL in testing
|
|
|
|
|
caramia = dontCheck super.caramia;
|
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
|
# llvm-ffi needs a specific version of LLVM which we hard code here. Since we
|
|
|
|
|
# can't use pkg-config (LLVM has no official .pc files), we need to pass the
|
|
|
|
|
# `dev` and `lib` output in, or Cabal will have trouble finding the library.
|
|
|
|
|
# Since it looks a bit neater having it in a list, we circumvent the singular
|
|
|
|
|
# LLVM input here.
|
|
|
|
|
llvm-ffi =
|
|
|
|
|
addBuildDepends [
|
|
|
|
|
pkgs.llvmPackages_16.llvm.lib
|
|
|
|
|
pkgs.llvmPackages_16.llvm.dev
|
|
|
|
|
] (super.llvm-ffi.override { LLVM = null; });
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Needs help finding LLVM.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
spaceprobe = addBuildTool self.buildHaskellPackages.llvmPackages.llvm super.spaceprobe;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Tries to run GUI in tests
|
2021-12-06 16:07:01 +00:00
|
|
|
|
leksah = dontCheck (overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [
|
2024-07-27 06:49:29 +00:00
|
|
|
|
adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ...
|
2024-05-15 15:35:15 +00:00
|
|
|
|
wrapGAppsHook3 # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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-12-06 16:07:01 +00:00
|
|
|
|
}) super.leksah);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
# dyre's tests appear to be trying to directly call GHC.
|
|
|
|
|
dyre = dontCheck super.dyre;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/13
|
|
|
|
|
# https://github.com/edwinb/EpiVM/issues/14
|
2021-12-06 16:07:01 +00:00
|
|
|
|
epic = addExtraLibraries [pkgs.boehmgc pkgs.gmp] (addBuildTool self.buildHaskellPackages.happy super.epic);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/ekmett/wl-pprint-terminfo/issues/7
|
2021-12-06 16:07:01 +00:00
|
|
|
|
wl-pprint-terminfo = addExtraLibrary pkgs.ncurses super.wl-pprint-terminfo;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/bos/pcap/issues/5
|
2021-12-06 16:07:01 +00:00
|
|
|
|
pcap = addExtraLibrary pkgs.libpcap super.pcap;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/53336
|
2021-12-06 16:07:01 +00:00
|
|
|
|
greenclip = addExtraLibrary pkgs.xorg.libXdmcp super.greenclip;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# The cabal files for these libraries do not list the required system dependencies.
|
2022-12-28 21:21:41 +00:00
|
|
|
|
libjwt-typed = addExtraLibrary pkgs.libjwt super.libjwt-typed;
|
|
|
|
|
miniball = addExtraLibrary pkgs.miniball super.miniball;
|
|
|
|
|
SDL-image = addExtraLibrary pkgs.SDL super.SDL-image;
|
|
|
|
|
SDL-ttf = addExtraLibrary pkgs.SDL super.SDL-ttf;
|
|
|
|
|
SDL-mixer = addExtraLibrary pkgs.SDL super.SDL-mixer;
|
|
|
|
|
SDL-gfx = addExtraLibrary pkgs.SDL super.SDL-gfx;
|
|
|
|
|
SDL-mpeg = appendConfigureFlags [
|
|
|
|
|
"--extra-lib-dirs=${pkgs.smpeg}/lib"
|
|
|
|
|
"--extra-include-dirs=${pkgs.smpeg.dev}/include/smpeg"
|
|
|
|
|
] super.SDL-mpeg;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/ivanperez-keera/hcwiid/pull/4
|
2021-12-06 16:07:01 +00:00
|
|
|
|
hcwiid = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00: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-12-06 16:07:01 +00:00
|
|
|
|
}) super.hcwiid;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# cabal2nix doesn't pick up some of the dependencies.
|
|
|
|
|
ginsu = let
|
2021-12-06 16:07:01 +00:00
|
|
|
|
g = addBuildDepend pkgs.perl super.ginsu;
|
|
|
|
|
g' = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
executableSystemDepends = (drv.executableSystemDepends or []) ++ [
|
|
|
|
|
pkgs.ncurses
|
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) g;
|
2020-04-24 23:36:52 +00: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-12-06 16:07:01 +00:00
|
|
|
|
fltkhs = overrideCabal (drv: {
|
2021-06-28 23:13:55 +00:00
|
|
|
|
libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.autoconf];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.fltk13 pkgs.libGL pkgs.libjpeg];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.fltkhs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/skogsbaer/hscurses/pull/26
|
2022-12-28 21:21:41 +00:00
|
|
|
|
hscurses = addExtraLibrary pkgs.ncurses super.hscurses;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Looks like Avahi provides the missing library
|
|
|
|
|
dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; };
|
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
|
# Tests execute goldplate
|
|
|
|
|
goldplate = overrideCabal (drv: {
|
|
|
|
|
preCheck = drv.preCheck or "" + ''
|
|
|
|
|
export PATH="$PWD/dist/build/goldplate:$PATH"
|
|
|
|
|
'';
|
|
|
|
|
}) super.goldplate;
|
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
|
# At least on 1.3.4 version on 32-bit architectures tasty requires
|
|
|
|
|
# unbounded-delays via .cabal file conditions.
|
|
|
|
|
tasty = overrideCabal (drv: {
|
|
|
|
|
libraryHaskellDepends =
|
|
|
|
|
(drv.libraryHaskellDepends or [])
|
|
|
|
|
++ lib.optionals (!(pkgs.stdenv.hostPlatform.isAarch64
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|| pkgs.stdenv.hostPlatform.isx86_64)
|
|
|
|
|
|| (self.ghc.isGhcjs or false)) [
|
2023-01-11 07:51:40 +00:00
|
|
|
|
self.unbounded-delays
|
|
|
|
|
];
|
|
|
|
|
}) super.tasty;
|
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
|
tasty-discover = overrideCabal (drv: {
|
|
|
|
|
# Depends on itself for testing
|
|
|
|
|
preBuild = ''
|
|
|
|
|
export PATH="$PWD/dist/build/tasty-discover:$PATH"
|
|
|
|
|
'' + (drv.preBuild or "");
|
|
|
|
|
}) super.tasty-discover;
|
|
|
|
|
|
2020-04-24 23:36:52 +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
|
2024-09-26 11:04:55 +00:00
|
|
|
|
${if pkgs.stdenv.hostPlatform.isDarwin then null else "GLUT"} = overrideCabal (drv: {
|
2023-10-09 19:29:22 +00:00
|
|
|
|
pkg-configDepends = drv.pkg-configDepends or [] ++ [
|
|
|
|
|
pkgs.freeglut
|
|
|
|
|
];
|
|
|
|
|
patches = drv.patches or [] ++ [
|
|
|
|
|
./patches/GLUT.patch
|
|
|
|
|
];
|
|
|
|
|
prePatch = drv.prePatch or "" + ''
|
|
|
|
|
${lib.getBin pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
|
|
|
|
|
'';
|
|
|
|
|
}) super.GLUT;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
|
libsystemd-journal = doJailbreak (addExtraLibrary pkgs.systemd super.libsystemd-journal);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# does not specify tests in cabal file, instead has custom runTest cabal hook,
|
|
|
|
|
# so cabal2nix will not detect test dependencies.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
either-unwrap = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.either-unwrap;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/haskell-fswatch/hfsnotify/issues/62
|
2021-05-20 23:08:51 +00:00
|
|
|
|
fsnotify = dontCheck super.fsnotify;
|
2020-04-24 23:36:52 +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;
|
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
|
stack = self.generateOptparseApplicativeCompletions [ "stack" ] super.stack;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
|
2021-12-06 16:07:01 +00:00
|
|
|
|
io-streams = enableCabalFlag "NoInteractiveTests" super.io-streams;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# requires autotools to build
|
2021-12-06 16:07:01 +00:00
|
|
|
|
secp256k1 = addBuildTools [ pkgs.buildPackages.autoconf pkgs.buildPackages.automake pkgs.buildPackages.libtool ] super.secp256k1;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
# requires libsecp256k1 in pkg-config-depends
|
2021-12-06 16:07:01 +00:00
|
|
|
|
secp256k1-haskell = addPkgconfigDepend pkgs.secp256k1 super.secp256k1-haskell;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# tests require git and zsh
|
2021-12-06 16:07:01 +00:00
|
|
|
|
hapistrano = addBuildTools [ pkgs.buildPackages.git pkgs.buildPackages.zsh ] super.hapistrano;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# This propagates this to everything depending on haskell-gi-base
|
2021-12-06 16:07:01 +00:00
|
|
|
|
haskell-gi-base = addBuildDepend pkgs.gobject-introspection super.haskell-gi-base;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# requires valid, writeable $HOME
|
2021-12-06 16:07:01 +00:00
|
|
|
|
hatex-guide = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preConfigure = ''
|
|
|
|
|
${drv.preConfigure or ""}
|
|
|
|
|
export HOME=$PWD
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.hatex-guide;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/plow-technologies/servant-streaming/issues/12
|
|
|
|
|
servant-streaming-server = dontCheck super.servant-streaming-server;
|
|
|
|
|
|
|
|
|
|
# https://github.com/haskell-servant/servant/pull/1238
|
|
|
|
|
servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then
|
2021-12-06 16:07:01 +00:00
|
|
|
|
appendPatch ./patches/servant-client-core-redact-auth-header.patch super.servant-client-core
|
2020-04-24 23:36:52 +00:00
|
|
|
|
else
|
|
|
|
|
super.servant-client-core;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# tests run executable, relying on PATH
|
|
|
|
|
# without this, tests fail with "Couldn't launch intero process"
|
2021-12-06 16:07:01 +00:00
|
|
|
|
intero = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH="$PWD/dist/build/intero:$PATH"
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.intero;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Break infinite recursion cycle with criterion and network-uri.
|
|
|
|
|
js-flot = dontCheck super.js-flot;
|
|
|
|
|
|
|
|
|
|
# Break infinite recursion cycle between QuickCheck and splitmix.
|
|
|
|
|
splitmix = dontCheck super.splitmix;
|
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
|
# Break infinite recursion cycle with OneTuple and quickcheck-instances.
|
|
|
|
|
foldable1-classes-compat = dontCheck super.foldable1-classes-compat;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Break infinite recursion cycle between tasty and clock.
|
|
|
|
|
clock = dontCheck super.clock;
|
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
|
# Break infinite recursion cycle between devtools and mprelude.
|
|
|
|
|
devtools = super.devtools.override { mprelude = dontCheck super.mprelude; };
|
|
|
|
|
|
2021-01-15 22:18:51 +00: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;
|
|
|
|
|
|
2020-04-24 23:36:52 +00: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; };
|
|
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
liquid-fixpoint = disableSharedExecutables super.liquid-fixpoint;
|
|
|
|
|
liquidhaskell = dontCheck (disableSharedExecutables super.liquidhaskell);
|
|
|
|
|
|
|
|
|
|
# Break cyclic reference that results in an infinite recursion.
|
|
|
|
|
partial-semigroup = dontCheck super.partial-semigroup;
|
|
|
|
|
colour = dontCheck super.colour;
|
|
|
|
|
spatial-rotations = dontCheck super.spatial-rotations;
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
LDAP = dontCheck (overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.LDAP);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
|
# Not running the "example" test because it requires a binary from lsps test
|
|
|
|
|
# suite which is not part of the output of lsp.
|
|
|
|
|
lsp-test = overrideCabal (old: { testTarget = "tests func-test"; }) super.lsp-test;
|
|
|
|
|
|
|
|
|
|
# the test suite attempts to run the binaries built in this package
|
|
|
|
|
# through $PATH but they aren't in $PATH
|
|
|
|
|
dhall-lsp-server = dontCheck super.dhall-lsp-server;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Expects z3 to be on path so we replace it with a hard
|
2020-09-25 04:45:31 +00: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.
|
2022-04-03 18:54:34 +00:00
|
|
|
|
# TODO(@sternenseemann): package cvc5 and re-enable tests
|
2021-12-06 16:07:01 +00:00
|
|
|
|
sbv = overrideCabal (drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postPatch = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
|
sed -i -e 's|"abc"|"${pkgs.abc-verifier}/bin/abc"|' Data/SBV/Provers/ABC.hs
|
2022-04-03 18:54:34 +00:00
|
|
|
|
sed -i -e 's|"bitwuzla"|"${pkgs.bitwuzla}/bin/bitwuzla"|' Data/SBV/Provers/Bitwuzla.hs
|
2020-09-25 04:45:31 +00:00
|
|
|
|
sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs
|
2022-04-03 18:54:34 +00:00
|
|
|
|
sed -i -e 's|"cvc4"|"${pkgs.cvc4}/bin/cvc4"|' Data/SBV/Provers/CVC4.hs
|
2022-12-28 21:21:41 +00:00
|
|
|
|
sed -i -e 's|"cvc5"|"${pkgs.cvc5}/bin/cvc5"|' Data/SBV/Provers/CVC5.hs
|
2020-09-25 04:45:31 +00:00
|
|
|
|
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
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
|
|
# Solvers we don't provide are removed from tests
|
|
|
|
|
sed -i -e 's|, mathSAT||' SBVTestSuite/SBVConnectionTest.hs
|
|
|
|
|
sed -i -e 's|, dReal||' SBVTestSuite/SBVConnectionTest.hs
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.sbv;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# The test-suite requires a running PostgreSQL server.
|
|
|
|
|
Frames-beam = dontCheck super.Frames-beam;
|
|
|
|
|
|
|
|
|
|
# Compile manpages (which are in RST and are compiled with Sphinx).
|
2021-06-28 23:13:55 +00:00
|
|
|
|
futhark =
|
2021-12-06 16:07:01 +00:00
|
|
|
|
overrideCabal
|
2020-04-24 23:36:52 +00: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/
|
|
|
|
|
'';
|
|
|
|
|
})
|
2021-12-06 16:07:01 +00:00
|
|
|
|
(addBuildTools (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx]) super.futhark);
|
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
|
git-annex = let
|
|
|
|
|
# Executables git-annex needs at runtime. git-annex detects these at configure
|
|
|
|
|
# time and expects to be able to execute them. This means that cross-compiling
|
|
|
|
|
# git-annex is not possible and strictDeps must be false (runtimeExecDeps go
|
|
|
|
|
# into executableSystemDepends/buildInputs).
|
|
|
|
|
runtimeExecDeps = [
|
|
|
|
|
pkgs.bup
|
|
|
|
|
pkgs.curl
|
|
|
|
|
pkgs.git
|
|
|
|
|
pkgs.gnupg
|
|
|
|
|
pkgs.lsof
|
|
|
|
|
pkgs.openssh
|
|
|
|
|
pkgs.perl
|
|
|
|
|
pkgs.rsync
|
|
|
|
|
pkgs.wget
|
|
|
|
|
pkgs.which
|
|
|
|
|
];
|
|
|
|
|
in
|
|
|
|
|
overrideCabal (drv: {
|
|
|
|
|
executableSystemDepends = runtimeExecDeps;
|
|
|
|
|
enableSharedExecutables = false;
|
|
|
|
|
|
|
|
|
|
preConfigure = drv.preConfigure or "" + ''
|
|
|
|
|
export HOME=$TEMPDIR
|
|
|
|
|
patchShebangs .
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# git-annex ships its test suite as part of the final executable instead of
|
|
|
|
|
# using a Cabal test suite.
|
|
|
|
|
checkPhase = ''
|
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
|
|
# Setup PATH for the actual tests
|
|
|
|
|
ln -sf dist/build/git-annex/git-annex git-annex
|
|
|
|
|
ln -sf git-annex git-annex-shell
|
|
|
|
|
PATH+=":$PWD"
|
|
|
|
|
|
|
|
|
|
echo checkFlags: $checkFlags ''${checkFlagsArray:+"''${checkFlagsArray[@]}"}
|
|
|
|
|
|
|
|
|
|
# Doesn't use Cabal's test mechanism
|
|
|
|
|
git-annex test $checkFlags ''${checkFlagsArray:+"''${checkFlagsArray[@]}"}
|
|
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Use default installPhase of pkgs/stdenv/generic/setup.sh. We need to set
|
|
|
|
|
# the environment variables it uses via the preInstall hook since the Haskell
|
|
|
|
|
# generic builder doesn't accept them as arguments.
|
|
|
|
|
preInstall = drv.preInstall or "" + ''
|
|
|
|
|
installTargets="install"
|
|
|
|
|
installFlagsArray+=(
|
|
|
|
|
"PREFIX="
|
|
|
|
|
"DESTDIR=$out"
|
2024-06-20 14:57:18 +00:00
|
|
|
|
# Prevent Makefile from calling cabal/Setup again
|
|
|
|
|
"BUILDER=:"
|
|
|
|
|
# Make Haskell build dependencies available
|
|
|
|
|
"GHC=${self.buildHaskellPackages.ghc.targetPrefix}ghc -global-package-db -package-db $setupPackageConfDir"
|
2024-05-15 15:35:15 +00:00
|
|
|
|
)
|
|
|
|
|
'';
|
|
|
|
|
installPhase = null;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
# Ensure git-annex uses the exact same coreutils it saw at build-time.
|
|
|
|
|
# This is especially important on Darwin but also in Linux environments
|
|
|
|
|
# where non-GNU coreutils are used by default.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
postFixup = ''
|
|
|
|
|
wrapProgram $out/bin/git-annex \
|
2022-08-12 12:06:08 +00:00
|
|
|
|
--prefix PATH : "${pkgs.lib.makeBinPath (with pkgs; [ coreutils lsof ])}"
|
2021-12-06 16:07:01 +00:00
|
|
|
|
'' + (drv.postFixup or "");
|
|
|
|
|
buildTools = [
|
|
|
|
|
pkgs.buildPackages.makeWrapper
|
|
|
|
|
] ++ (drv.buildTools or []);
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
|
|
# Git annex provides a restricted login shell. Setting
|
|
|
|
|
# passthru.shellPath here allows a user's login shell to be set to
|
|
|
|
|
# `git-annex-shell` by making `shell = haskellPackages.git-annex`.
|
|
|
|
|
# https://git-annex.branchable.com/git-annex-shell/
|
|
|
|
|
passthru.shellPath = "/bin/git-annex-shell";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) (super.git-annex.override {
|
2024-09-26 11:04:55 +00:00
|
|
|
|
dbus = if pkgs.stdenv.hostPlatform.isLinux then self.dbus else null;
|
|
|
|
|
fdo-notify = if pkgs.stdenv.hostPlatform.isLinux then self.fdo-notify else null;
|
|
|
|
|
hinotify = if pkgs.stdenv.hostPlatform.isLinux then self.hinotify else self.fsnotify;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
});
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# The test suite has undeclared dependencies on git.
|
|
|
|
|
githash = dontCheck super.githash;
|
|
|
|
|
|
|
|
|
|
# Avoid infitite recursion with yaya.
|
|
|
|
|
yaya-hedgehog = super.yaya-hedgehog.override { yaya = dontCheck self.yaya; };
|
|
|
|
|
|
|
|
|
|
# Avoid infitite recursion with tonatona.
|
|
|
|
|
tonaparser = dontCheck super.tonaparser;
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
http-download = dontCheck super.http-download;
|
2024-01-13 08:15:51 +00:00
|
|
|
|
http-download_0_2_1_0 = doDistribute (dontCheck super.http-download_0_2_1_0);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
pantry = dontCheck super.pantry;
|
2024-01-13 08:15:51 +00:00
|
|
|
|
pantry_0_9_3_1 = dontCheck super.pantry_0_9_3_1;
|
2024-09-19 14:19:46 +00:00
|
|
|
|
pantry_0_10_0 = dontCheck super.pantry_0_10_0;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
|
|
|
|
# need it during the build itself, too.
|
2021-12-06 16:07:01 +00:00
|
|
|
|
cairo = addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.cairo;
|
|
|
|
|
pango = disableHardening ["fortify"] (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.pango);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
spago =
|
|
|
|
|
let
|
2021-04-25 03:57:28 +00: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-09-25 04:45:31 +00:00
|
|
|
|
sha256 = "0m5ah29x290r0zk19hx2wix2djy7bs4plh9kvjz6bs9r45x25pa5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-04-25 03:57:28 +00: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-09-25 04:45:31 +00:00
|
|
|
|
sha256 = "0wc1zyhli4m2yykc6i0crm048gyizxh7b81n8xc4yb7ibjqwhyj3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-04-25 03:57:28 +00: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";
|
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
in
|
|
|
|
|
lib.pipe (super.spago.override {
|
|
|
|
|
versions = self.versions_5_0_5;
|
|
|
|
|
fsnotify = self.fsnotify_0_3_0_1;
|
|
|
|
|
}) [
|
|
|
|
|
(overrideCabal (drv: {
|
2020-04-24 23:36:52 +00: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-25 03:57:28 +00: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-04-24 23:36:52 +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).
|
2021-04-25 03:57:28 +00: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"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
|
}))
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
# Tests require network access.
|
2024-05-15 15:35:15 +00:00
|
|
|
|
dontCheck
|
|
|
|
|
|
|
|
|
|
# Overly strict upper bound on text
|
|
|
|
|
doJailbreak
|
|
|
|
|
|
|
|
|
|
# Generate shell completion for spago
|
|
|
|
|
(self.generateOptparseApplicativeCompletions [ "spago" ])
|
|
|
|
|
];
|
2020-04-24 23:36:52 +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;
|
|
|
|
|
|
|
|
|
|
# mplayer-spot uses mplayer at runtime.
|
|
|
|
|
mplayer-spot =
|
2021-01-15 22:18:51 +00:00
|
|
|
|
let path = pkgs.lib.makeBinPath [ pkgs.mplayer ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
in overrideCabal (oldAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/mplayer-spot --prefix PATH : "${path}"
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) (addBuildTool pkgs.buildPackages.makeWrapper super.mplayer-spot);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# break infinite recursion with base-orphans
|
|
|
|
|
primitive = dontCheck super.primitive;
|
2020-10-27 00:29:36 +00:00
|
|
|
|
primitive_0_7_1_0 = dontCheck super.primitive_0_7_1_0;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
cut-the-crap =
|
2021-05-20 23:08:51 +00:00
|
|
|
|
let path = pkgs.lib.makeBinPath [ pkgs.ffmpeg pkgs.youtube-dl ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
in overrideCabal (_drv: {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram $out/bin/cut-the-crap \
|
|
|
|
|
--prefix PATH : "${path}"
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap);
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
|
|
# Compiling the readme throws errors and has no purpose in nixpkgs
|
|
|
|
|
aeson-gadt-th =
|
2021-12-06 16:07:01 +00:00
|
|
|
|
disableCabalFlag "build-readme" (doJailbreak super.aeson-gadt-th);
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
|
# Fix compilation of Setup.hs by removing the module declaration.
|
|
|
|
|
# See: https://github.com/tippenein/guid/issues/1
|
2021-12-06 16:07:01 +00:00
|
|
|
|
guid = overrideCabal (drv: {
|
2020-06-02 18:00:15 +00:00
|
|
|
|
prePatch = "sed -i '1d' Setup.hs"; # 1st line is module declaration, remove it
|
|
|
|
|
doCheck = false;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.guid;
|
2020-06-02 18:00:15 +00:00
|
|
|
|
|
|
|
|
|
# Tests disabled as recommended at https://github.com/luke-clifton/shh/issues/39
|
|
|
|
|
shh = dontCheck super.shh;
|
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
|
# The test suites fail because there's no PostgreSQL database running in our
|
|
|
|
|
# build sandbox.
|
|
|
|
|
hasql-queue = dontCheck super.hasql-queue;
|
|
|
|
|
postgresql-libpq-notify = dontCheck super.postgresql-libpq-notify;
|
|
|
|
|
postgresql-pure = dontCheck super.postgresql-pure;
|
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
|
retrie = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie;
|
|
|
|
|
retrie_1_2_0_0 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_0_0;
|
|
|
|
|
retrie_1_2_1_1 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_1_1;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
|
# there are three very heavy test suites that need external repos, one requires network access
|
|
|
|
|
hevm = dontCheck super.hevm;
|
2021-02-22 21:28:39 +00: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-12-06 16:07:01 +00:00
|
|
|
|
hadolint = disableCabalFlag "static" super.hadolint;
|
2021-03-15 08:37:03 +00: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;
|
|
|
|
|
|
|
|
|
|
# Tests access internet
|
|
|
|
|
prune-juice = dontCheck super.prune-juice;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
|
citeproc = lib.pipe super.citeproc [
|
|
|
|
|
enableSeparateBinOutput
|
|
|
|
|
# Enable executable being built and add missing dependencies
|
|
|
|
|
(enableCabalFlag "executable")
|
|
|
|
|
(addBuildDepends [ self.aeson-pretty ])
|
|
|
|
|
# TODO(@sternenseemann): we may want to enable that for improved performance
|
|
|
|
|
# Is correctness good enough since 0.5?
|
|
|
|
|
(disableCabalFlag "icu")
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
# based on https://github.com/gibiansky/IHaskell/blob/aafeabef786154d81ab7d9d1882bbcd06fc8c6c4/release.nix
|
2021-12-06 16:07:01 +00:00
|
|
|
|
ihaskell = overrideCabal (drv: {
|
2022-02-20 05:27:41 +00:00
|
|
|
|
# ihaskell's cabal file forces building a shared executable, which we need
|
|
|
|
|
# to reflect here or RPATH will contain a reference to /build/.
|
|
|
|
|
enableSharedExecutables = true;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$TMPDIR/home
|
|
|
|
|
export PATH=$PWD/dist/build/ihaskell:$PATH
|
2024-06-20 14:57:18 +00:00
|
|
|
|
export NIX_GHC_PACKAGE_PATH_FOR_TEST=$PWD/dist/package.conf.inplace/:$packageConfDir:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.ihaskell;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
|
|
# tests need to execute the built executable
|
2021-12-06 16:07:01 +00:00
|
|
|
|
stutter = overrideCabal (drv: {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export PATH=dist/build/stutter:$PATH
|
|
|
|
|
'' + (drv.preCheck or "");
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.stutter;
|
2021-05-20 23:08:51 +00: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-12-06 16:07:01 +00:00
|
|
|
|
})
|
2022-10-21 18:38:19 +00:00
|
|
|
|
(self.generateOptparseApplicativeCompletions [ "pnbackup" ] super.pinboard-notes-backup);
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
|
|
# Pass the correct libarchive into the package.
|
|
|
|
|
streamly-archive = super.streamly-archive.override { archive = pkgs.libarchive; };
|
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
|
hlint = overrideCabal (drv: {
|
|
|
|
|
postInstall = ''
|
|
|
|
|
install -Dm644 data/hlint.1 -t "$out/share/man/man1"
|
|
|
|
|
'' + drv.postInstall or "";
|
|
|
|
|
}) super.hlint;
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
taglib = overrideCabal (drv: {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
librarySystemDepends = [
|
|
|
|
|
pkgs.zlib
|
|
|
|
|
] ++ (drv.librarySystemDepends or []);
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.taglib;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
2021-06-04 09:07:49 +00: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-28 23:13:55 +00:00
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
|
# https://github.com/Gabriella439/nix-diff/pull/74
|
|
|
|
|
nix-diff = overrideCabal (drv: {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace src/Nix/Diff/Types.hs \
|
|
|
|
|
--replace "{-# OPTIONS_GHC -Wno-orphans #-}" "{-# OPTIONS_GHC -Wno-orphans -fconstraint-solver-iterations=0 #-}"
|
|
|
|
|
'';
|
|
|
|
|
}) (doJailbreak (dontCheck super.nix-diff));
|
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
|
# mockery's tests depend on hspec-discover which dependso on mockery for its tests
|
|
|
|
|
mockery = dontCheck super.mockery;
|
|
|
|
|
# same for logging-facade
|
|
|
|
|
logging-facade = dontCheck super.logging-facade;
|
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
|
# Since this package is primarily used by nixpkgs maintainers and is probably
|
|
|
|
|
# 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 []) ++ [
|
|
|
|
|
pkgs.buildPackages.makeWrapper
|
|
|
|
|
];
|
|
|
|
|
postInstall = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
|
${drv.postInstall or ""}
|
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
|
wrapProgram $out/bin/cabal2nix \
|
|
|
|
|
--prefix PATH ":" "${
|
|
|
|
|
pkgs.lib.makeBinPath [ pkgs.nix pkgs.nix-prefetch-scripts ]
|
|
|
|
|
}"
|
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
})
|
|
|
|
|
(justStaticExecutables super.cabal2nix-unstable);
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
|
|
# test suite needs local redis daemon
|
|
|
|
|
nri-redis = dontCheck super.nri-redis;
|
|
|
|
|
|
|
|
|
|
# Make tophat find itself for _compiling_ its test suite
|
2021-12-06 16:07:01 +00:00
|
|
|
|
tophat = overrideCabal (drv: {
|
2021-06-28 23:13:55 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
sed -i 's|"tophat"|"./dist/build/tophat/tophat"|' app-test-bin/*.hs
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.tophat;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
|
|
# Runtime dependencies and CLI completion
|
2022-10-21 18:38:19 +00:00
|
|
|
|
nvfetcher = self.generateOptparseApplicativeCompletions [ "nvfetcher" ] (overrideCabal
|
2021-12-06 16:07:01 +00:00
|
|
|
|
(drv: {
|
2021-10-04 12:37:57 +00:00
|
|
|
|
# test needs network
|
|
|
|
|
doCheck = false;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
|
|
|
|
|
postInstall = drv.postInstall or "" + ''
|
|
|
|
|
wrapProgram "$out/bin/nvfetcher" --prefix 'PATH' ':' "${
|
2023-01-11 07:51:40 +00:00
|
|
|
|
pkgs.lib.makeBinPath [
|
|
|
|
|
pkgs.nvchecker
|
2023-07-15 17:15:38 +00:00
|
|
|
|
pkgs.nix # nix-prefetch-url
|
|
|
|
|
pkgs.nix-prefetch-git
|
2023-01-11 07:51:40 +00:00
|
|
|
|
pkgs.nix-prefetch-docker
|
|
|
|
|
]
|
2021-06-28 23:13:55 +00:00
|
|
|
|
}"
|
2024-06-20 14:57:18 +00:00
|
|
|
|
''
|
|
|
|
|
# Prevent erroneous references to other libraries that use Paths_ modules
|
|
|
|
|
# on aarch64-darwin. Note that references to the data outputs are not removed.
|
|
|
|
|
+ lib.optionalString (with pkgs.stdenv; hostPlatform.isDarwin && hostPlatform.isAarch64) ''
|
|
|
|
|
remove-references-to -t "${self.shake.out}" "$out/bin/.nvfetcher-wrapped"
|
|
|
|
|
remove-references-to -t "${self.js-jquery.out}" "$out/bin/.nvfetcher-wrapped"
|
|
|
|
|
remove-references-to -t "${self.js-flot.out}" "$out/bin/.nvfetcher-wrapped"
|
|
|
|
|
remove-references-to -t "${self.js-dgtable.out}" "$out/bin/.nvfetcher-wrapped"
|
2021-06-28 23:13:55 +00:00
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}) super.nvfetcher);
|
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
|
rel8 = pkgs.lib.pipe super.rel8 [
|
|
|
|
|
(addTestToolDepend pkgs.postgresql)
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/198495
|
2024-04-21 15:54:59 +00:00
|
|
|
|
(dontCheckIf (!pkgs.postgresql.doCheck))
|
2022-11-02 22:02:43 +00:00
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
|
# Wants running postgresql database accessible over ip, so postgresqlTestHook
|
|
|
|
|
# won't work (or would need to patch test suite).
|
|
|
|
|
domaindriven-core = dontCheck super.domaindriven-core;
|
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
|
cachix = self.generateOptparseApplicativeCompletions [ "cachix" ]
|
|
|
|
|
(enableSeparateBinOutput super.cachix);
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
|
hercules-ci-agent = super.hercules-ci-agent.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; };
|
|
|
|
|
hercules-ci-cnix-expr = addTestToolDepend pkgs.git (super.hercules-ci-cnix-expr.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; });
|
2023-08-22 20:05:09 +00:00
|
|
|
|
hercules-ci-cnix-store = overrideCabal
|
|
|
|
|
(old: {
|
|
|
|
|
passthru = old.passthru or { } // {
|
2024-04-21 15:54:59 +00:00
|
|
|
|
nixPackage = pkgs.nixVersions.nix_2_19;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
(super.hercules-ci-cnix-store.override {
|
|
|
|
|
nix = self.hercules-ci-cnix-store.passthru.nixPackage;
|
|
|
|
|
});
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
# the testsuite fails because of not finding tsc without some help
|
|
|
|
|
aeson-typescript = overrideCabal (drv: {
|
2023-07-15 17:15:38 +00:00
|
|
|
|
testToolDepends = drv.testToolDepends or [] ++ [ pkgs.typescript ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
# the testsuite assumes that tsc is in the PATH if it thinks it's in
|
|
|
|
|
# CI, otherwise trying to install it.
|
|
|
|
|
#
|
|
|
|
|
# https://github.com/codedownio/aeson-typescript/blob/ee1a87fcab8a548c69e46685ce91465a7462be89/test/Util.hs#L27-L33
|
|
|
|
|
preCheck = "export CI=true";
|
|
|
|
|
}) super.aeson-typescript;
|
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
|
Agda = lib.pipe super.Agda [
|
|
|
|
|
# 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
|
|
|
|
|
(enableCabalFlag "optimise-heavily")
|
|
|
|
|
# Enable debug printing, which worsens performance slightly but is
|
|
|
|
|
# very useful.
|
|
|
|
|
# Flag added in Agda 2.6.4.1, was always enabled before
|
|
|
|
|
(enableCabalFlag "debug")
|
2024-04-21 15:54:59 +00:00
|
|
|
|
# Split outputs to reduce closure size
|
|
|
|
|
enableSeparateBinOutput
|
2024-02-07 01:22:34 +00:00
|
|
|
|
];
|
2021-07-17 21:14:59 +00:00
|
|
|
|
|
2021-08-08 23:34:03 +00: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
|
2022-10-21 18:38:19 +00:00
|
|
|
|
ats-format = self.generateOptparseApplicativeCompletions [ "atsfmt" ] (
|
2021-08-08 23:34:03 +00:00
|
|
|
|
justStaticExecutables (
|
2021-12-06 16:07:01 +00:00
|
|
|
|
overrideCabal (drv: {
|
2021-08-08 23:34:03 +00: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-12-06 16:07:01 +00:00
|
|
|
|
}) super.ats-format
|
2021-08-08 23:34:03 +00:00
|
|
|
|
)
|
|
|
|
|
);
|
2021-09-18 10:52:07 +00: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-06 13:57:05 +00: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.
|
2024-04-21 15:54:59 +00:00
|
|
|
|
hashes = dontCheckIf (!pkgs.stdenv.hostPlatform.isx86) super.hashes;
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
|
# Tries to access network
|
|
|
|
|
aws-sns-verify = dontCheck super.aws-sns-verify;
|
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
|
# Test suite requires network access
|
|
|
|
|
minicurl = dontCheck super.minicurl;
|
|
|
|
|
|
2021-10-17 02:12:59 +00: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-12-06 16:07:01 +00:00
|
|
|
|
procex = overrideCabal (drv: {
|
2021-10-17 02:12:59 +00: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-12-06 16:07:01 +00:00
|
|
|
|
}) super.procex;
|
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
|
# Test suite wants to run main executable
|
2024-01-13 08:15:51 +00:00
|
|
|
|
# https://github.com/fourmolu/fourmolu/issues/231
|
|
|
|
|
inherit (
|
|
|
|
|
let
|
|
|
|
|
fourmoluTestFix = overrideCabal (drv: {
|
|
|
|
|
preCheck = drv.preCheck or "" + ''
|
|
|
|
|
export PATH="$PWD/dist/build/fourmolu:$PATH"
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
in
|
2024-07-27 06:49:29 +00:00
|
|
|
|
builtins.mapAttrs (_: fourmoluTestFix) super
|
|
|
|
|
)
|
2024-01-13 08:15:51 +00:00
|
|
|
|
fourmolu
|
2024-04-21 15:54:59 +00:00
|
|
|
|
fourmolu_0_15_0_0
|
2024-07-27 06:49:29 +00:00
|
|
|
|
fourmolu_0_16_2_0
|
2024-01-13 08:15:51 +00:00
|
|
|
|
;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
|
# Test suite needs to execute 'disco' binary
|
|
|
|
|
disco = overrideCabal (drv: {
|
|
|
|
|
preCheck = drv.preCheck or "" + ''
|
|
|
|
|
export PATH="$PWD/dist/build/disco:$PATH"
|
|
|
|
|
'';
|
|
|
|
|
testFlags = drv.testFlags or [] ++ [
|
|
|
|
|
# Needs network access
|
|
|
|
|
"-p" "!/oeis/"
|
|
|
|
|
];
|
|
|
|
|
# disco-examples needs network access
|
|
|
|
|
testTarget = "disco-tests";
|
|
|
|
|
}) super.disco;
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
# Apply a patch which hardcodes the store path of graphviz instead of using
|
|
|
|
|
# whatever graphviz is in PATH.
|
|
|
|
|
graphviz = overrideCabal (drv: {
|
|
|
|
|
patches = [
|
|
|
|
|
(pkgs.substituteAll {
|
|
|
|
|
src = ./patches/graphviz-hardcode-graphviz-store-path.patch;
|
|
|
|
|
inherit (pkgs) graphviz;
|
|
|
|
|
})
|
|
|
|
|
] ++ (drv.patches or []);
|
|
|
|
|
}) super.graphviz;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
# Test suite requires AWS access which requires both a network
|
|
|
|
|
# connection and payment.
|
|
|
|
|
aws = dontCheck super.aws;
|
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
|
# Test case tries to contact the network
|
|
|
|
|
http-api-data-qq = overrideCabal (drv: {
|
|
|
|
|
testFlags = [
|
|
|
|
|
"-p" "!/Can be used with http-client/"
|
|
|
|
|
] ++ drv.testFlags or [];
|
|
|
|
|
}) super.http-api-data-qq;
|
2022-01-25 03:21:06 +00:00
|
|
|
|
|
|
|
|
|
# Additionally install documentation
|
|
|
|
|
jacinda = overrideCabal (drv: {
|
|
|
|
|
enableSeparateDocOutput = true;
|
|
|
|
|
postInstall = ''
|
|
|
|
|
${drv.postInstall or ""}
|
|
|
|
|
|
|
|
|
|
docDir="$doc/share/doc/${drv.pname}-${drv.version}"
|
|
|
|
|
|
|
|
|
|
# man page goes to $out, it's small enough and haskellPackages has no
|
|
|
|
|
# support for a man output at the moment and $doc requires downloading
|
|
|
|
|
# a full PDF
|
|
|
|
|
install -Dm644 man/ja.1 -t "$out/share/man/man1"
|
|
|
|
|
# language guide and examples
|
|
|
|
|
install -Dm644 doc/guide.pdf -t "$docDir"
|
|
|
|
|
install -Dm644 test/examples/*.jac -t "$docDir/examples"
|
|
|
|
|
'';
|
|
|
|
|
}) super.jacinda;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
|
# Smoke test can't be executed in sandbox
|
|
|
|
|
# https://github.com/georgefst/evdev/issues/25
|
|
|
|
|
evdev = overrideCabal (drv: {
|
|
|
|
|
testFlags = drv.testFlags or [] ++ [
|
|
|
|
|
"-p" "!/Smoke/"
|
|
|
|
|
];
|
|
|
|
|
}) super.evdev;
|
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
# Tests assume dist-newstyle build directory is present
|
|
|
|
|
cabal-hoogle = dontCheck super.cabal-hoogle;
|
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
|
nfc = lib.pipe super.nfc [
|
|
|
|
|
enableSeparateBinOutput
|
|
|
|
|
(addBuildDepend self.base16-bytestring)
|
|
|
|
|
(appendConfigureFlag "-fbuild-examples")
|
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
|
# Wants to execute cabal-install to (re-)build itself
|
|
|
|
|
hint = dontCheck super.hint;
|
|
|
|
|
|
|
|
|
|
# cabal-install switched to build type simple in 3.2.0.0
|
|
|
|
|
# as a result, the cabal(1) man page is no longer installed
|
|
|
|
|
# automatically. Instead we need to use the `cabal man`
|
|
|
|
|
# command which generates the man page on the fly and
|
|
|
|
|
# install it to $out/share/man/man1 ourselves in this
|
|
|
|
|
# override.
|
|
|
|
|
# The commit that introduced this change:
|
|
|
|
|
# https://github.com/haskell/cabal/commit/91ac075930c87712eeada4305727a4fa651726e7
|
|
|
|
|
# Since cabal-install 3.8, the cabal man (without the raw) command
|
|
|
|
|
# uses nroff(1) instead of man(1) for macOS/BSD compatibility. That utility
|
|
|
|
|
# is not commonly installed on systems, so we add it to PATH. Closure size
|
|
|
|
|
# penalty is about 10MB at the time of writing this (2022-08-20).
|
|
|
|
|
cabal-install = overrideCabal (old: {
|
|
|
|
|
executableToolDepends = [
|
|
|
|
|
pkgs.buildPackages.makeWrapper
|
|
|
|
|
] ++ old.buildToolDepends or [];
|
|
|
|
|
postInstall = old.postInstall + ''
|
|
|
|
|
mkdir -p "$out/share/man/man1"
|
|
|
|
|
"$out/bin/cabal" man --raw > "$out/share/man/man1/cabal.1"
|
|
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/cabal" \
|
|
|
|
|
--prefix PATH : "${pkgs.lib.makeBinPath [ pkgs.groff ]}"
|
|
|
|
|
'';
|
|
|
|
|
hydraPlatforms = pkgs.lib.platforms.all;
|
|
|
|
|
broken = false;
|
|
|
|
|
}) super.cabal-install;
|
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
|
tailwind = addBuildDepend
|
|
|
|
|
# Overrides for tailwindcss copied from:
|
|
|
|
|
# https://github.com/EmaApps/emanote/blob/master/nix/tailwind.nix
|
|
|
|
|
(pkgs.nodePackages.tailwindcss.overrideAttrs (oa: {
|
|
|
|
|
plugins = [
|
|
|
|
|
pkgs.nodePackages."@tailwindcss/aspect-ratio"
|
|
|
|
|
pkgs.nodePackages."@tailwindcss/forms"
|
|
|
|
|
pkgs.nodePackages."@tailwindcss/line-clamp"
|
|
|
|
|
pkgs.nodePackages."@tailwindcss/typography"
|
|
|
|
|
];
|
|
|
|
|
})) super.tailwind;
|
|
|
|
|
|
|
|
|
|
emanote = addBuildDepend pkgs.stork super.emanote;
|
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
|
keid-render-basic = addBuildTool pkgs.glslang super.keid-render-basic;
|
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
|
# Disable checks to break dependency loop with SCalendar
|
|
|
|
|
scalendar = dontCheck super.scalendar;
|
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
halide-haskell = super.halide-haskell.override { Halide = pkgs.halide; };
|
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
feedback = self.generateOptparseApplicativeCompletions [ "feedback" ]
|
|
|
|
|
(enableSeparateBinOutput super.feedback);
|
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
|
# Sydtest has a brittle test suite that will only work with the exact
|
2023-07-15 17:15:38 +00:00
|
|
|
|
# versions that it ships with.
|
|
|
|
|
sydtest = dontCheck super.sydtest;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
|
|
# Prevent argv limit being exceeded when invoking $CC.
|
|
|
|
|
inherit (lib.mapAttrs (_: overrideCabal {
|
|
|
|
|
__onlyPropagateKnownPkgConfigModules = true;
|
|
|
|
|
}) super)
|
|
|
|
|
gi-javascriptcore
|
|
|
|
|
gi-webkit2webextension
|
2024-09-19 14:19:46 +00:00
|
|
|
|
gi-gtk_4_0_9
|
2024-07-27 06:49:29 +00:00
|
|
|
|
gi-gdk_4_0_8
|
2024-04-21 15:54:59 +00:00
|
|
|
|
gi-gsk
|
|
|
|
|
gi-adwaita
|
2024-09-19 14:19:46 +00:00
|
|
|
|
sdl2-ttf
|
|
|
|
|
sdl2
|
2023-08-22 20:05:09 +00:00
|
|
|
|
;
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
|
webkit2gtk3-javascriptcore = lib.pipe super.webkit2gtk3-javascriptcore [
|
|
|
|
|
(addBuildDepend pkgs.xorg.libXtst)
|
2024-07-27 06:49:29 +00:00
|
|
|
|
(addBuildDepend pkgs.lerc)
|
2024-04-21 15:54:59 +00:00
|
|
|
|
(overrideCabal { __onlyPropagateKnownPkgConfigModules = true; })
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
gi-webkit2 = lib.pipe super.gi-webkit2 [
|
|
|
|
|
(addBuildDepend pkgs.xorg.libXtst)
|
2024-07-27 06:49:29 +00:00
|
|
|
|
(addBuildDepend pkgs.lerc)
|
2024-04-21 15:54:59 +00:00
|
|
|
|
(overrideCabal { __onlyPropagateKnownPkgConfigModules = true; })
|
|
|
|
|
];
|
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
|
# Makes the mpi-hs package respect the choice of mpi implementation in Nixpkgs.
|
|
|
|
|
# Also adds required test dependencies for checks to pass
|
|
|
|
|
mpi-hs =
|
|
|
|
|
let validMpi = [ "openmpi" "mpich" "mvapich" ];
|
|
|
|
|
mpiImpl = pkgs.mpi.pname;
|
|
|
|
|
disableUnused = with builtins; map disableCabalFlag (filter (n: n != mpiImpl) validMpi);
|
|
|
|
|
in lib.pipe
|
|
|
|
|
(super.mpi-hs_0_7_3_0.override { ompi = pkgs.mpi; })
|
|
|
|
|
( [ (addTestToolDepends [ pkgs.openssh pkgs.mpiCheckPhaseHook ]) ]
|
|
|
|
|
++ disableUnused
|
|
|
|
|
++ lib.optional (builtins.elem mpiImpl validMpi) (enableCabalFlag mpiImpl)
|
|
|
|
|
);
|
|
|
|
|
inherit (lib.mapAttrs (_: addTestToolDepends
|
|
|
|
|
[ pkgs.openssh pkgs.mpiCheckPhaseHook ]
|
|
|
|
|
) super)
|
|
|
|
|
mpi-hs-store
|
|
|
|
|
mpi-hs-cereal
|
|
|
|
|
mpi-hs-binary
|
|
|
|
|
;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
|
|
postgresql-libpq = overrideCabal (drv: {
|
|
|
|
|
# Using use-pkg-config flag, because pg_config won't work when cross-compiling.
|
|
|
|
|
configureFlags = drv.configureFlags or [] ++ [ "-fuse-pkg-config" ];
|
|
|
|
|
# Move postgresql from SystemDepends to PkgconfigDepends
|
|
|
|
|
libraryPkgconfigDepends = drv.librarySystemDepends;
|
|
|
|
|
librarySystemDepends = [];
|
|
|
|
|
}) super.postgresql-libpq;
|
|
|
|
|
|
|
|
|
|
# Test failure is related to a GHC implementation detail of primitives and doesn't
|
|
|
|
|
# cause actual problems in dependent packages, see https://github.com/lehins/pvar/issues/4
|
|
|
|
|
pvar = dontCheck super.pvar;
|
|
|
|
|
|
|
|
|
|
kmonad = enableSeparateBinOutput super.kmonad;
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
|
|
xmobar = enableSeparateBinOutput super.xmobar;
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
|
|
# 2024-08-09: Disable some cabal-doctest tests pending further investigation.
|
|
|
|
|
doctest = overrideCabal (drv: {
|
|
|
|
|
testFlags = drv.testFlags or [] ++ [
|
|
|
|
|
# These tests require cabal-install
|
|
|
|
|
"--skip=/Cabal.Options"
|
|
|
|
|
"--skip=/Cabal.Paths/paths"
|
|
|
|
|
];
|
|
|
|
|
}) super.doctest;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}
|