2021-05-08 15:32:54 +00:00
|
|
|
|
# DARWIN-SPECIFIC OVERRIDES FOR THE HASKELL PACKAGE SET IN NIXPKGS
|
|
|
|
|
|
|
|
|
|
{ pkgs, haskellLib }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
inherit (pkgs) lib darwin;
|
|
|
|
|
in
|
|
|
|
|
|
|
|
|
|
with haskellLib;
|
|
|
|
|
|
2021-08-28 12:47:58 +00:00
|
|
|
|
self: super: ({
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# the tests for shell-conduit on Darwin illegitimatey assume non-GNU echo
|
|
|
|
|
# see: https://github.com/psibi/shell-conduit/issues/12
|
|
|
|
|
shell-conduit = dontCheck super.shell-conduit;
|
|
|
|
|
|
|
|
|
|
conduit-extra = super.conduit-extra.overrideAttrs (drv: {
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
2022-08-25 03:22:45 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
streaming-commons = super.streaming-commons.overrideAttrs (_: {
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
});
|
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
halive = addBuildDepend darwin.apple_sdk.frameworks.AppKit super.halive;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# Hakyll's tests are broken on Darwin (3 failures); and they require util-linux
|
2021-10-26 10:20:34 +00:00
|
|
|
|
hakyll = overrideCabal {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
testToolDepends = [];
|
|
|
|
|
doCheck = false;
|
2021-10-26 10:20:34 +00:00
|
|
|
|
} super.hakyll;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
barbly = addBuildDepend darwin.apple_sdk.frameworks.AppKit super.barbly;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
double-conversion = addExtraLibrary pkgs.libcxx super.double-conversion;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2022-02-25 22:34:54 +00:00
|
|
|
|
streamly = addBuildDepend darwin.apple_sdk.frameworks.Cocoa super.streamly;
|
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
apecs-physics = addPkgconfigDepends [
|
2021-05-08 15:32:54 +00:00
|
|
|
|
darwin.apple_sdk.frameworks.ApplicationServices
|
2021-10-26 10:20:34 +00:00
|
|
|
|
] super.apecs-physics;
|
2023-02-14 14:33:04 +00:00
|
|
|
|
|
|
|
|
|
# Framework deps are hidden behind a flag
|
|
|
|
|
hmidi = addExtraLibraries [
|
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
|
darwin.apple_sdk.frameworks.CoreAudio
|
|
|
|
|
darwin.apple_sdk.frameworks.CoreMIDI
|
|
|
|
|
] super.hmidi;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# "erf table" test fails on Darwin
|
|
|
|
|
# https://github.com/bos/math-functions/issues/63
|
|
|
|
|
math-functions = dontCheck super.math-functions;
|
|
|
|
|
|
|
|
|
|
# darwin doesn't have sub-second resolution
|
|
|
|
|
# https://github.com/hspec/mockery/issues/11
|
2021-10-26 10:20:34 +00:00
|
|
|
|
mockery = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export TRAVIS=true
|
|
|
|
|
'' + (drv.preCheck or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.mockery;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/ndmitchell/shake/issues/206
|
|
|
|
|
shake = dontCheck super.shake;
|
|
|
|
|
|
|
|
|
|
filecache = dontCheck super.filecache;
|
|
|
|
|
|
|
|
|
|
# gtk/gtk3 needs to be told on Darwin to use the Quartz
|
|
|
|
|
# rather than X11 backend (see eg https://github.com/gtk2hs/gtk2hs/issues/249).
|
2021-10-26 10:20:34 +00:00
|
|
|
|
gtk3 = appendConfigureFlag "-f have-quartz-gtk" super.gtk3;
|
|
|
|
|
gtk = appendConfigureFlag "-f have-quartz-gtk" super.gtk;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
OpenAL = addExtraLibrary darwin.apple_sdk.frameworks.OpenAL super.OpenAL;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
al = overrideCabal (drv: {
|
2021-08-06 00:50:09 +00:00
|
|
|
|
libraryFrameworkDepends = [
|
|
|
|
|
darwin.apple_sdk.frameworks.OpenAL
|
|
|
|
|
] ++ (drv.libraryFrameworkDepends or []);
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.al;
|
2021-08-06 00:50:09 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
proteaaudio = addExtraLibrary darwin.apple_sdk.frameworks.AudioToolbox super.proteaaudio;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2024-07-15 19:37:23 +00:00
|
|
|
|
# issues finding libcharset.h without libiconv in buildInputs on darwin.
|
|
|
|
|
with-utf8 = addExtraLibrary pkgs.libiconv super.with-utf8;
|
|
|
|
|
with-utf8_1_1_0_0 = addExtraLibrary pkgs.libiconv super.with-utf8_1_1_0_0;
|
|
|
|
|
|
2021-05-08 15:32:54 +00:00
|
|
|
|
# the system-fileio tests use canonicalizePath, which fails in the sandbox
|
|
|
|
|
system-fileio = dontCheck super.system-fileio;
|
|
|
|
|
|
2024-04-21 21:48:32 +00:00
|
|
|
|
git-annex = overrideCabal (drv: {
|
|
|
|
|
# We can't use testFlags since git-annex side steps the Cabal test mechanism
|
|
|
|
|
preCheck = drv.preCheck or "" + ''
|
|
|
|
|
checkFlagsArray+=(
|
|
|
|
|
# The addurl test cases require security(1) to be in PATH which we can't
|
|
|
|
|
# provide from nixpkgs to my (@sternenseemann) knowledge.
|
|
|
|
|
"-p" "!/addurl/"
|
|
|
|
|
)
|
|
|
|
|
'';
|
|
|
|
|
}) super.git-annex;
|
|
|
|
|
|
2021-05-08 15:32:54 +00:00
|
|
|
|
# Prevents needing to add `security_tool` as a run-time dependency for
|
|
|
|
|
# everything using x509-system to give access to the `security` executable.
|
|
|
|
|
#
|
|
|
|
|
# darwin.security_tool is broken in Mojave (#45042)
|
|
|
|
|
#
|
|
|
|
|
# We will use the system provided security for now.
|
|
|
|
|
# Beware this WILL break in sandboxes!
|
|
|
|
|
#
|
|
|
|
|
# TODO(matthewbauer): If someone really needs this to work in sandboxes,
|
|
|
|
|
# I think we can add a propagatedImpureHost dep here, but I’m hoping to
|
|
|
|
|
# get a proper fix available soonish.
|
2021-10-26 10:20:34 +00:00
|
|
|
|
x509-system = overrideCabal (drv:
|
2021-05-08 15:32:54 +00:00
|
|
|
|
lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.x509-system;
|
2024-05-27 16:20:06 +00:00
|
|
|
|
crypton-x509-system = overrideCabal (drv:
|
|
|
|
|
lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
|
|
|
|
|
'' + (drv.postPatch or "");
|
|
|
|
|
}) super.crypton-x509-system;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/haskell-foundation/foundation/pull/412
|
|
|
|
|
foundation = dontCheck super.foundation;
|
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
llvm-hs = overrideCabal (oldAttrs: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
# One test fails on darwin.
|
|
|
|
|
doCheck = false;
|
|
|
|
|
# llvm-hs's Setup.hs file tries to add the lib/ directory from LLVM8 to
|
|
|
|
|
# the DYLD_LIBRARY_PATH environment variable. This messes up clang
|
|
|
|
|
# when called from GHC, probably because clang is version 7, but we are
|
|
|
|
|
# using LLVM8.
|
|
|
|
|
preCompileBuildDriver = ''
|
|
|
|
|
substituteInPlace Setup.hs --replace "addToLdLibraryPath libDir" "pure ()"
|
|
|
|
|
'' + (oldAttrs.preCompileBuildDriver or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.llvm-hs;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
yesod-bin = addBuildDepend darwin.apple_sdk.frameworks.Cocoa super.yesod-bin;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2023-05-24 23:34:57 +00:00
|
|
|
|
yesod-core = super.yesod-core.overrideAttrs (drv: {
|
|
|
|
|
# Allow access to local networking when the Darwin sandbox is enabled, so yesod-core can
|
|
|
|
|
# run tests that access localhost.
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
});
|
|
|
|
|
|
2023-11-25 18:14:23 +00:00
|
|
|
|
hidapi =
|
|
|
|
|
addExtraLibraries [
|
|
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
|
]
|
|
|
|
|
(super.hidapi.override { systemd = null; });
|
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
hmatrix = addBuildDepend darwin.apple_sdk.frameworks.Accelerate super.hmatrix;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
blas-hs = overrideCabal (drv: {
|
2021-08-06 01:13:30 +00:00
|
|
|
|
libraryFrameworkDepends = [
|
|
|
|
|
darwin.apple_sdk.frameworks.Accelerate
|
|
|
|
|
] ++ (drv.libraryFrameworkDepends or []);
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.blas-hs;
|
2021-08-06 01:13:30 +00:00
|
|
|
|
|
2021-05-08 15:32:54 +00:00
|
|
|
|
# Ensure the necessary frameworks are propagatedBuildInputs on darwin
|
2021-10-26 10:20:34 +00:00
|
|
|
|
OpenGLRaw = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [];
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [
|
|
|
|
|
darwin.apple_sdk.frameworks.OpenGL
|
|
|
|
|
];
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
frameworkPaths=($(for i in $nativeBuildInputs; do if [ -d "$i"/Library/Frameworks ]; then echo "-F$i/Library/Frameworks"; fi done))
|
|
|
|
|
frameworkPaths=$(IFS=, ; echo "''${frameworkPaths[@]}")
|
|
|
|
|
configureFlags+=$(if [ -n "$frameworkPaths" ]; then echo -n "--ghc-options=-optl=$frameworkPaths"; fi)
|
|
|
|
|
'' + (drv.preConfigure or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.OpenGLRaw;
|
|
|
|
|
GLURaw = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [];
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [
|
|
|
|
|
darwin.apple_sdk.frameworks.OpenGL
|
|
|
|
|
];
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.GLURaw;
|
|
|
|
|
bindings-GLFW = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [];
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [
|
|
|
|
|
darwin.apple_sdk.frameworks.AGL
|
|
|
|
|
darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
|
darwin.apple_sdk.frameworks.OpenGL
|
|
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
|
darwin.apple_sdk.frameworks.Kernel
|
|
|
|
|
darwin.apple_sdk.frameworks.CoreVideo
|
|
|
|
|
darwin.CF
|
|
|
|
|
];
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.bindings-GLFW;
|
|
|
|
|
OpenCL = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [];
|
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [
|
|
|
|
|
darwin.apple_sdk.frameworks.OpenCL
|
|
|
|
|
];
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.OpenCL;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
|
|
|
|
# cabal2nix likes to generate dependencies on hinotify when hfsevents is
|
|
|
|
|
# really required on darwin: https://github.com/NixOS/cabal2nix/issues/146.
|
|
|
|
|
hinotify = self.hfsevents;
|
|
|
|
|
|
|
|
|
|
# FSEvents API is very buggy and tests are unreliable. See
|
|
|
|
|
# http://openradar.appspot.com/10207999 and similar issues.
|
2021-10-26 10:20:34 +00:00
|
|
|
|
fsnotify = addBuildDepend darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
|
(dontCheck super.fsnotify);
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
FractalArt = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [
|
|
|
|
|
darwin.libobjc
|
|
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
|
] ++ (drv.librarySystemDepends or []);
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.FractalArt;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
arbtt = overrideCabal (drv: {
|
2021-05-08 15:32:54 +00:00
|
|
|
|
librarySystemDepends = [
|
|
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
|
|
|
|
darwin.apple_sdk.frameworks.Carbon
|
|
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
|
] ++ (drv.librarySystemDepends or []);
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.arbtt;
|
2021-05-08 15:32:54 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
HTF = overrideCabal (drv: {
|
2021-05-08 23:41:11 +00:00
|
|
|
|
# GNU find is not prefixed in stdenv
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace scripts/local-htfpp --replace "find=gfind" "find=find"
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.HTF;
|
2021-05-08 23:41:11 +00:00
|
|
|
|
|
2021-08-06 01:32:50 +00:00
|
|
|
|
# conditional dependency via a cabal flag
|
2021-10-26 10:20:34 +00:00
|
|
|
|
cas-store = overrideCabal (drv: {
|
2021-08-06 01:32:50 +00:00
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
|
self.kqueue
|
|
|
|
|
] ++ (drv.libraryHaskellDepends or []);
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.cas-store;
|
2021-08-06 01:32:50 +00:00
|
|
|
|
|
2021-06-22 14:00:19 +00:00
|
|
|
|
# We are lacking pure pgrep at the moment for tests to work
|
|
|
|
|
tmp-postgres = dontCheck super.tmp-postgres;
|
|
|
|
|
|
2021-08-05 06:28:42 +00:00
|
|
|
|
# On darwin librt doesn't exist and will fail to link against,
|
|
|
|
|
# however linking against it is also not necessary there
|
2021-10-26 10:20:34 +00:00
|
|
|
|
GLHUI = overrideCabal (drv: {
|
2021-08-05 06:28:42 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace GLHUI.cabal --replace " rt" ""
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.GLHUI;
|
2021-08-05 06:28:42 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
SDL-image = overrideCabal (drv: {
|
2021-08-05 23:46:44 +00:00
|
|
|
|
# Prevent darwin-specific configuration code path being taken
|
|
|
|
|
# which doesn't work with nixpkgs' SDL libraries
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace configure --replace xDarwin noDarwinSpecialCasing
|
|
|
|
|
'' + (drv.postPatch or "");
|
|
|
|
|
patches = [
|
|
|
|
|
# Work around SDL_main.h redefining main to SDL_main
|
|
|
|
|
./patches/SDL-image-darwin-hsc.patch
|
|
|
|
|
];
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.SDL-image;
|
2021-08-05 23:46:44 +00:00
|
|
|
|
|
2021-08-05 23:43:59 +00:00
|
|
|
|
# Prevent darwin-specific configuration code path being taken which
|
|
|
|
|
# doesn't work with nixpkgs' SDL libraries
|
2021-10-26 10:20:34 +00:00
|
|
|
|
SDL-mixer = overrideCabal (drv: {
|
2021-08-05 23:43:59 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace configure --replace xDarwin noDarwinSpecialCasing
|
|
|
|
|
'' + (drv.postPatch or "");
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.SDL-mixer;
|
2021-08-05 23:43:59 +00:00
|
|
|
|
|
2021-08-05 23:40:03 +00:00
|
|
|
|
# Work around SDL_main.h redefining main to SDL_main
|
2021-10-26 10:20:34 +00:00
|
|
|
|
SDL-ttf = appendPatch ./patches/SDL-ttf-darwin-hsc.patch super.SDL-ttf;
|
2021-08-05 23:40:03 +00:00
|
|
|
|
|
2021-08-06 12:56:42 +00:00
|
|
|
|
# Disable a bunch of test suites that fail because of darwin's case insensitive
|
|
|
|
|
# file system: When a test suite has a test suite file that has the same name
|
|
|
|
|
# as a module in scope, but in different case (e. g. hedgehog.hs and Hedgehog
|
|
|
|
|
# in scope), GHC will complain that the file name and module name differ (in
|
|
|
|
|
# the example hedgehog.hs would be Main).
|
|
|
|
|
# These failures can easily be fixed by upstream by renaming files, so we
|
|
|
|
|
# should create issues for them.
|
|
|
|
|
# https://github.com/typeclasses/aws-cloudfront-signed-cookies/issues/2
|
|
|
|
|
aws-cloudfront-signed-cookies = dontCheck super.aws-cloudfront-signed-cookies;
|
|
|
|
|
|
2021-08-06 13:12:42 +00:00
|
|
|
|
# https://github.com/acid-state/acid-state/issues/133
|
|
|
|
|
acid-state = dontCheck super.acid-state;
|
|
|
|
|
|
2021-08-06 13:43:20 +00:00
|
|
|
|
# Otherwise impure gcc is used, which is Apple's weird wrapper
|
2021-10-26 10:20:34 +00:00
|
|
|
|
c2hsc = addTestToolDepends [ pkgs.gcc ] super.c2hsc;
|
2021-08-06 13:43:20 +00:00
|
|
|
|
|
2022-01-03 13:50:21 +00:00
|
|
|
|
http-client-tls = overrideCabal (drv: {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
# This comment has been inserted, so the derivation hash changes, forcing
|
|
|
|
|
# a rebuild of this derivation which has succeeded to build on Hydra before,
|
|
|
|
|
# but apparently been corrupted, causing reverse dependencies to fail.
|
|
|
|
|
#
|
|
|
|
|
# This workaround can be removed upon the next darwin stdenv rebuild,
|
|
|
|
|
# presumably https://github.com/NixOS/nixpkgs/pull/152850 or the next
|
|
|
|
|
# full haskellPackages rebuild.
|
|
|
|
|
'' + drv.postPatch or "";
|
|
|
|
|
}) super.http-client-tls;
|
|
|
|
|
|
2023-05-24 23:35:13 +00:00
|
|
|
|
http2 = super.http2.overrideAttrs (drv: {
|
|
|
|
|
# Allow access to local networking when the Darwin sandbox is enabled, so http2 can run tests
|
|
|
|
|
# that access localhost.
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
});
|
|
|
|
|
|
2022-01-03 15:31:32 +00:00
|
|
|
|
foldl = overrideCabal (drv: {
|
|
|
|
|
postPatch = ''
|
|
|
|
|
# This comment has been inserted, so the derivation hash changes, forcing
|
|
|
|
|
# a rebuild of this derivation which has succeeded to build on Hydra before,
|
|
|
|
|
# but apparently been corrupted, causing reverse dependencies to fail.
|
|
|
|
|
#
|
|
|
|
|
# This workaround can be removed upon the next darwin stdenv rebuild,
|
|
|
|
|
# presumably https://github.com/NixOS/nixpkgs/pull/152850 or the next
|
|
|
|
|
# full haskellPackages rebuild.
|
|
|
|
|
'' + drv.postPatch or "";
|
|
|
|
|
}) super.foldl;
|
|
|
|
|
|
2023-08-10 06:55:31 +00:00
|
|
|
|
# https://hydra.nixos.org/build/230964714/nixlog/1
|
|
|
|
|
inline-c-cpp = appendPatch (pkgs.fetchpatch {
|
|
|
|
|
url = "https://github.com/fpco/inline-c/commit/e8dc553b13bb847409fdced649a6a863323cff8a.patch";
|
|
|
|
|
name = "revert-use-system-cxx-std-lib.patch";
|
|
|
|
|
sha256 = "sha256-ql1/+8bvmWexyCdFR0VS4M4cY2lD0Px/9dHYLqlKyNA=";
|
|
|
|
|
revert = true;
|
|
|
|
|
stripLen = 1;
|
|
|
|
|
}) super.inline-c-cpp;
|
|
|
|
|
|
2024-04-07 10:05:12 +00:00
|
|
|
|
# Tests fail on macOS https://github.com/mrkkrp/zip/issues/112
|
|
|
|
|
zip = dontCheck super.zip;
|
2024-04-29 20:26:08 +00:00
|
|
|
|
|
2024-05-30 22:49:25 +00:00
|
|
|
|
warp = super.warp.overrideAttrs (drv: {
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
});
|
|
|
|
|
|
2024-05-31 00:35:17 +00:00
|
|
|
|
ghcjs-dom-hello = overrideCabal (drv: {
|
|
|
|
|
libraryHaskellDepends = with self; [ jsaddle jsaddle-warp ];
|
|
|
|
|
executableHaskellDepends = with self; [ ghcjs-dom jsaddle-wkwebview ];
|
|
|
|
|
}) super.ghcjs-dom-hello;
|
|
|
|
|
|
2024-05-31 00:00:50 +00:00
|
|
|
|
jsaddle-hello = overrideCabal (drv: {
|
|
|
|
|
libraryHaskellDepends = with self; [ jsaddle lens ];
|
|
|
|
|
executableHaskellDepends = with self; [ jsaddle-warp jsaddle-wkwebview ];
|
|
|
|
|
}) super.jsaddle-hello;
|
|
|
|
|
|
2024-04-29 20:26:08 +00:00
|
|
|
|
jsaddle-wkwebview = overrideCabal (drv: {
|
|
|
|
|
libraryFrameworkDepends = with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ Cocoa WebKit ];
|
2024-05-17 20:47:59 +00:00
|
|
|
|
libraryHaskellDepends = with self; [ aeson data-default jsaddle ]; # cabal2nix doesn't add darwin-only deps
|
2024-04-29 20:26:08 +00:00
|
|
|
|
}) super.jsaddle-wkwebview;
|
2024-07-22 16:13:34 +00:00
|
|
|
|
|
|
|
|
|
# cabal2nix doesn't add darwin-only deps
|
|
|
|
|
reflex-dom = addBuildDepend self.jsaddle-wkwebview (super.reflex-dom.override (drv: {
|
|
|
|
|
jsaddle-webkit2gtk = null;
|
|
|
|
|
}));
|
2024-04-29 20:26:08 +00:00
|
|
|
|
|
2024-05-27 08:36:13 +00:00
|
|
|
|
# Remove a problematic assert, the length is sometimes 1 instead of 2 on darwin
|
|
|
|
|
di-core = overrideCabal (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
substituteInPlace test/Main.hs --replace \
|
|
|
|
|
"2 @=? List.length (List.nub (List.sort (map Di.log_time logs)))" ""
|
|
|
|
|
'';
|
|
|
|
|
}) super.di-core;
|
|
|
|
|
|
2024-09-24 15:50:49 +00:00
|
|
|
|
} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 { # aarch64-darwin
|
2021-08-28 12:47:58 +00:00
|
|
|
|
|
2024-06-07 09:46:40 +00:00
|
|
|
|
# Workarounds for justStaticExecutables on aarch64-darwin. Since dead code
|
|
|
|
|
# elimination barely works on aarch64-darwin, any package that has a
|
|
|
|
|
# dependency that uses a Paths_ module will incur a reference on GHC, making
|
|
|
|
|
# it fail with disallowGhcReference (which is set by justStaticExecutables).
|
|
|
|
|
#
|
|
|
|
|
# To address this, you can either manually remove the references causing this
|
|
|
|
|
# after verifying they are indeed erroneous (e.g. cabal2nix) or just disable
|
|
|
|
|
# the check, sticking with the status quo. Ideally there'll be zero cases of
|
|
|
|
|
# the latter in the future!
|
|
|
|
|
inherit (
|
|
|
|
|
lib.mapAttrs (_: overrideCabal (old: {
|
|
|
|
|
postInstall = ''
|
|
|
|
|
remove-references-to -t ${self.hpack} "$out/bin/cabal2nix"
|
|
|
|
|
# Note: The `data` output is needed at runtime.
|
|
|
|
|
remove-references-to -t ${self.distribution-nixpkgs.out} "$out/bin/hackage2nix"
|
|
|
|
|
|
|
|
|
|
${old.postInstall or ""}
|
|
|
|
|
'';
|
|
|
|
|
})) super
|
|
|
|
|
) cabal2nix cabal2nix-unstable;
|
2024-05-28 23:45:27 +00:00
|
|
|
|
|
2021-08-28 12:47:58 +00:00
|
|
|
|
# https://github.com/fpco/unliftio/issues/87
|
|
|
|
|
unliftio = dontCheck super.unliftio;
|
2022-07-02 16:35:08 +00:00
|
|
|
|
# This is the same issue as above; the rio tests call functions in unliftio
|
|
|
|
|
# that have issues as tracked in the GitHub issue above. Once the unliftio
|
|
|
|
|
# tests are fixed, we can remove this as well.
|
|
|
|
|
#
|
|
|
|
|
# We skip just the problematic tests by replacing 'it' with 'xit'.
|
|
|
|
|
rio = overrideCabal (drv: {
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
sed -i 's/\bit /xit /g' test/RIO/FileSpec.hs
|
|
|
|
|
'';
|
|
|
|
|
}) super.rio;
|
2022-03-08 10:55:46 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/haskell-crypto/cryptonite/issues/360
|
|
|
|
|
cryptonite = appendPatch ./patches/cryptonite-remove-argon2.patch super.cryptonite;
|
2022-04-30 03:05:26 +00:00
|
|
|
|
|
2022-10-19 16:19:16 +00:00
|
|
|
|
# Build segfaults unless `fixity-th` is disabled.
|
|
|
|
|
# https://github.com/tweag/ormolu/issues/927
|
2022-11-20 14:50:17 +00:00
|
|
|
|
ormolu = overrideCabal (drv: {
|
2022-10-19 16:19:16 +00:00
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ];
|
2022-11-20 14:50:17 +00:00
|
|
|
|
}) (disableCabalFlag "fixity-th" super.ormolu);
|
|
|
|
|
fourmolu = overrideCabal (drv: {
|
2022-10-19 16:19:16 +00:00
|
|
|
|
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ];
|
2022-11-20 14:50:17 +00:00
|
|
|
|
}) (disableCabalFlag "fixity-th" super.fourmolu);
|
2022-10-19 16:19:16 +00:00
|
|
|
|
|
2023-01-22 00:15:09 +00:00
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/149692
|
2024-01-06 14:00:33 +00:00
|
|
|
|
Agda = disableCabalFlag "optimise-heavily" super.Agda;
|
2023-01-22 00:15:09 +00:00
|
|
|
|
|
2024-08-08 20:52:05 +00:00
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/198495
|
|
|
|
|
eventsourcing-postgresql = dontCheck super.eventsourcing-postgresql;
|
|
|
|
|
gargoyle-postgresql-connect = dontCheck super.gargoyle-postgresql-connect;
|
|
|
|
|
hs-opentelemetry-instrumentation-postgresql-simple = dontCheck super.hs-opentelemetry-instrumentation-postgresql-simple;
|
|
|
|
|
moto-postgresql = dontCheck super.moto-postgresql;
|
|
|
|
|
persistent-postgresql = dontCheck super.persistent-postgresql;
|
|
|
|
|
pipes-postgresql-simple = dontCheck super.pipes-postgresql-simple;
|
|
|
|
|
postgresql-connector = dontCheck super.postgresql-connector;
|
|
|
|
|
postgresql-migration = dontCheck super.postgresql-migration;
|
|
|
|
|
postgresql-schema = dontCheck super.postgresql-schema;
|
|
|
|
|
postgresql-simple = dontCheck super.postgresql-simple;
|
|
|
|
|
postgresql-simple-interpolate = dontCheck super.postgresql-simple-interpolate;
|
|
|
|
|
postgresql-simple-migration = dontCheck super.postgresql-simple-migration;
|
|
|
|
|
postgresql-simple-url = dontCheck super.postgresql-simple-url;
|
|
|
|
|
postgresql-transactional = dontCheck super.postgresql-transactional;
|
|
|
|
|
postgrest = dontCheck super.postgrest;
|
|
|
|
|
rivet-adaptor-postgresql = dontCheck super.rivet-adaptor-postgresql;
|
|
|
|
|
tmp-proc-postgres = dontCheck super.tmp-proc-postgres;
|
|
|
|
|
|
2024-09-24 15:50:49 +00:00
|
|
|
|
} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isx86_64 { # x86_64-darwin
|
2022-04-30 03:05:26 +00:00
|
|
|
|
|
|
|
|
|
# tests appear to be failing to link or something:
|
|
|
|
|
# https://hydra.nixos.org/build/174540882/nixlog/9
|
|
|
|
|
regex-rure = dontCheck super.regex-rure;
|
2022-05-04 02:23:39 +00:00
|
|
|
|
# same
|
|
|
|
|
# https://hydra.nixos.org/build/174540882/nixlog/9
|
|
|
|
|
jacinda = dontCheck super.jacinda;
|
2024-05-31 10:09:08 +00:00
|
|
|
|
|
|
|
|
|
# Greater floating point error on x86_64-darwin (!) for some reason
|
|
|
|
|
# https://github.com/ekmett/ad/issues/113
|
|
|
|
|
ad = overrideCabal (drv: {
|
|
|
|
|
testFlags = drv.testFlags or [ ] ++ [
|
|
|
|
|
"-p" "!/issue-108/"
|
|
|
|
|
];
|
|
|
|
|
}) super.ad;
|
2021-08-28 12:47:58 +00:00
|
|
|
|
})
|