Merge pull request #240387 from NixOS/haskell-updates

haskellPackages: default GHC 9.2 -> 9.4, Stackage 21 and hackage update
This commit is contained in:
sternenseemann 2023-08-17 10:25:43 +02:00 committed by GitHub
commit c2f3ec724c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 8595 additions and 9114 deletions

View file

@ -3777,6 +3777,12 @@
githubId = 1298344;
name = "Daniel Fullmer";
};
danielrolls = {
email = "daniel.rolls.27@googlemail.com";
github = "danielrolls";
githubId = 50051176;
name = "Daniel Rolls";
};
daniyalsuri6 = {
email = "daniyal.suri@gmail.com";
github = "daniyalsuri6";
@ -16556,6 +16562,12 @@
githubId = 863327;
name = "Tyler Benster";
};
tbidne = {
email = "tbidne@protonmail.com";
github = "tbidne";
githubId = 2856188;
name = "Thomas Bidne";
};
tboerger = {
email = "thomas@webhippie.de";
matrix = "@tboerger:matrix.org";

View file

@ -66,6 +66,7 @@ sed -r \
-e '/ hie-bios /d' \
-e '/ ShellCheck /d' \
-e '/ Agda /d' \
-e '/ stack /d' \
< "${tmpfile_new}" >> $stackage_config
# Explanations:
# cabal2nix, distribution-nixpkgs, jailbreak-cabal, language-nix: These are our packages and we know what we are doing.

View file

@ -1,6 +1,6 @@
{
"commit": "2951c03cb95b8892bd6d4eb89d135764c35a8d7f",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/2951c03cb95b8892bd6d4eb89d135764c35a8d7f.tar.gz",
"sha256": "08sh9l9df2p51q4xhrl14jga48i0ad78fp7w3cccgcw1bqq4yxml",
"msg": "Update from Hackage at 2023-06-19T20:13:38Z"
"commit": "4cdb9878496fdb36b8b9c5f2ab0ef8a44a0f859f",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/4cdb9878496fdb36b8b9c5f2ab0ef8a44a0f859f.tar.gz",
"sha256": "0yhymzcsls48hf44ncd79xn786rfh4k70h78w7b0ihn7lrjgsynv",
"msg": "Update from Hackage at 2023-07-24T19:28:29Z"
}

View file

@ -447,7 +447,6 @@ stdenv.mkDerivation rec {
# long as the evaluator runs on a platform that supports
# `pkgsMusl`.
platforms = builtins.attrNames ghcBinDists.${distSetName};
hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms;
maintainers = with lib.maintainers; [
guibou
] ++ lib.teams.haskell.members;

View file

@ -28,8 +28,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.

View file

@ -27,8 +27,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.

View file

@ -429,7 +429,6 @@ stdenv.mkDerivation rec {
# long as the evaluator runs on a platform that supports
# `pkgsMusl`.
platforms = builtins.attrNames ghcBinDists.${distSetName};
hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms;
maintainers = lib.teams.haskell.members;
};
}

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -217,7 +216,7 @@ stdenv.mkDerivation (rec {
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -217,7 +216,7 @@ stdenv.mkDerivation (rec {
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -217,7 +216,7 @@ stdenv.mkDerivation (rec {
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -217,7 +216,7 @@ stdenv.mkDerivation (rec {
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -30,8 +30,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -217,7 +216,7 @@ stdenv.mkDerivation (rec {
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -32,8 +32,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -190,6 +189,15 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ];
patches = [
# Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
# Can be removed if the Cabal library included with ghc backports the linked fix
(fetchpatch {
url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
stripLen = 1;
extraPrefix = "libraries/Cabal/";
sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
})
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
@ -197,6 +205,14 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -32,8 +32,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -190,6 +189,15 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ];
patches = [
# Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
# Can be removed if the Cabal library included with ghc backports the linked fix
(fetchpatch {
url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
stripLen = 1;
extraPrefix = "libraries/Cabal/";
sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
})
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
@ -197,6 +205,14 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -32,8 +32,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -206,6 +205,14 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -32,8 +32,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -206,6 +205,14 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -0,0 +1,15 @@
Make sure that the appropriate feature flags are set when
Rts.h is included, so that clockid_t is defined.
diff --git a/cbits/is-valid-utf8.c b/cbits/is-valid-utf8.c
index 01b3b41..c69596a 100644
--- a/libraries/bytestring/cbits/is-valid-utf8.c
+++ b/libraries/bytestring/cbits/is-valid-utf8.c
@@ -29,6 +29,7 @@ SUCH DAMAGE.
*/
#pragma GCC push_options
#pragma GCC optimize("-O2")
+#include "rts/PosixSource.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

View file

@ -0,0 +1,392 @@
# DO NOT port this expression to hadrian. It is not possible to build a GHC
# cross compiler with 9.4.* and hadrian.
{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
, xattr, autoSignDarwinBinariesHook
, bash
, libiconv ? null, ncurses
, glibcLocales ? null
, # GHC can be built with system libffi or a bundled one.
libffi ? null
, useLLVM ? !(stdenv.targetPlatform.isx86
|| stdenv.targetPlatform.isPower
|| stdenv.targetPlatform.isSparc
|| (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin))
, # LLVM is conceptually a run-time-only dependency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildTargetLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slightly slower native
# bignum backend instead of the faster but GPLed gmp backend.
enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
&& lib.meta.availableOn stdenv.targetPlatform gmp)
, gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
, # Whether to build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")
, # Whether to build sphinx documentation.
enableDocs ? (
# Docs disabled for musl and cross because it's a large task to keep
# all `sphinx` dependencies building in those environments.
# `sphinx` pulls in among others:
# Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
(stdenv.targetPlatform == stdenv.hostPlatform)
&& !stdenv.hostPlatform.isMusl
)
, enableHaddockProgram ?
# Disabled for cross; see note [HADDOCK_DOCS].
(stdenv.targetPlatform == stdenv.hostPlatform)
, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
disableLargeAddressSpace ? stdenv.targetPlatform.isiOS
}:
assert !enableNativeBignum -> gmp != null;
# Cross cannot currently build the `haddock` program for silly reasons,
# see note [HADDOCK_DOCS].
assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
let
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
targetPrefix = lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
BUILD_SPHINX_PDF = NO
'' +
# Note [HADDOCK_DOCS]:
# Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
# program is built (which we generally always want to have a complete GHC install)
# and whether it is run on the GHC sources to generate hyperlinked source code
# (which is impossible for cross-compilation); see:
# https://gitlab.haskell.org/ghc/ghc/-/issues/20077
# This implies that currently a cross-compiled GHC will never have a `haddock`
# program, so it can never generate haddocks for any packages.
# If this is solved in the future, we'd like to unconditionally
# build the haddock program (removing the `enableHaddockProgram` option).
''
HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
# Build haddocks for boot packages with hyperlinking
EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
'' + lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' +
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
# This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
# Splicer will pull out correct variations
libDeps = platform: lib.optional enableTerminfo ncurses
++ [libffi]
++ lib.optional (!enableNativeBignum) gmp
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
# TODO(@sternenseemann): is buildTarget LLVM unnecessary?
# GHC doesn't seem to have {LLC,OPT}_HOST
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
# Sometimes we have to dispatch between the bintools wrapper and the unwrapped
# derivation for certain tools depending on the platform.
bintoolsFor = {
# GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
# part of the bintools wrapper (due to codesigning requirements), but not on
# x86_64-darwin.
install_name_tool =
if stdenv.targetPlatform.isAarch64
then targetCC.bintools
else targetCC.bintools.bintools;
# Same goes for strip.
strip =
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
then targetCC.bintools
else targetCC.bintools.bintools;
};
# Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
# But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
# see #84670 and #49071 for more background.
useLdGold = targetPlatform.linker == "gold" ||
(targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
# Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
variantSuffix = lib.concatStrings [
(lib.optionalString stdenv.hostPlatform.isMusl "-musl")
(lib.optionalString enableNativeBignum "-native-bignum")
];
in
# C compiler, bintools and LLVM are used at build time, but will also leak into
# the resulting GHC's settings file and used at runtime. This means that we are
# currently only able to build GHC if hostPlatform == buildPlatform.
assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
stdenv.mkDerivation (rec {
version = "9.4.6";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1b705cf52692f9d4d6707cdf8e761590f5f56ec8ea6a65e36610db392d3d24b9";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
patches = [
# Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
# Can be removed if the Cabal library included with ghc backports the linked fix
(fetchpatch {
url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
stripLen = 1;
extraPrefix = "libraries/Cabal/";
sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
})
# Work around a type not being defined when including Rts.h in bytestring's cbits
# due to missing feature macros. See https://gitlab.haskell.org/ghc/ghc/-/issues/23810.
./9.4.6-bytestring-posix-source.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";
# GHC needs the locale configured during the Haddock phase.
LANG = "en_US.UTF-8";
# GHC is a bit confused on its cross terminology.
# TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
# GHC is a bit confused on its cross terminology, as these would normally be
# the *host* tools.
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
'' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
'' + lib.optionalString useLLVM ''
export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
'' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
# LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
'' + ''
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
'' + lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
export XATTR=${lib.getBin xattr}/bin/xattr
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + lib.optionalString targetPlatform.isMusl ''
echo "patching llvm-targets for musl targets..."
echo "Cloning these existing '*-linux-gnu*' targets:"
grep linux-gnu llvm-targets | sed 's/^/ /'
echo "(go go gadget sed)"
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
echo "llvm-targets now contains these '*-linux-musl*' targets:"
grep linux-musl llvm-targets | sed 's/^/ /'
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
for x in configure aclocal.m4; do
substituteInPlace $x \
--replace '*-android*|*-gnueabi*)' \
'*-android*|*-gnueabi*|*-musleabi*)'
done
''
# HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have
# binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian.
+ ''
substituteInPlace configure --replace \
'MinBootGhcVersion="9.0"' \
'MinBootGhcVersion="8.10"'
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ lib.optional (targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ lib.optionals (libffi != null) [
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ lib.optionals useLdGold [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
autoSignDarwinBinariesHook
] ++ lib.optionals enableDocs [
sphinx
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
checkTarget = "test";
hardeningDisable =
[ "format" ]
# In nixpkgs, musl based builds currently enable `pie` hardening by default
# (see `defaultHardeningFlags` in `make-derivation.nix`).
# But GHC cannot currently produce outputs that are ready for `-pie` linking.
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
# See:
# * https://github.com/NixOS/nixpkgs/issues/129247
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
++ lib.optional stdenv.targetPlatform.isMusl "pie";
# big-parallel allows us to build with more than 2 cores on
# Hydra which already warrants a significant speedup
requiredSystemFeatures = [ "big-parallel" ];
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
'';
passthru = {
inherit bootPkgs targetPrefix;
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with lib.maintainers; [
guibou
] ++ lib.teams.haskell.members;
timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
})

View file

@ -57,8 +57,7 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, enableProfiledLibs ? true
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
@ -155,6 +154,8 @@
ghcSrc = ghcSrc;
ghcVersion = version;
userSettings = hadrianUserSettings;
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
enableHyperlinkedSource = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
}
, # Whether to build sphinx documentation.

View file

@ -8,10 +8,10 @@
}:
mkDerivation {
pname = "cabal2nix";
version = "unstable-2023-05-05";
version = "unstable-2023-08-15";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/078350047d358bb450d634d775493aba89b21212.tar.gz";
sha256 = "0rsdn2zyw0zr6pi3dg6cm3i310alppigdsv20iqpx0dzykkicywj";
url = "https://github.com/NixOS/cabal2nix/archive/0365d9b77086d26ca5197fb48019cedbb0dce5d2.tar.gz";
sha256 = "15aia2v05cmblabhb287cf1yqy4dlzw0g905h79fcvkgygnn2ib8";
};
postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot";
isLibrary = true;

View file

@ -19,15 +19,6 @@ in
with haskellLib;
self: super: {
# Make sure that Cabal 3.8.* can be built as-is
Cabal_3_8_1_0 = doDistribute (super.Cabal_3_8_1_0.override ({
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
} // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.2.5") {
# Use process core package when possible
process = self.process_1_6_17_0;
}));
# Make sure that Cabal 3.10.* can be built as-is
Cabal_3_10_1_0 = doDistribute (super.Cabal_3_10_1_0.override ({
Cabal-syntax = self.Cabal-syntax_3_10_1_0;
@ -42,7 +33,12 @@ self: super: {
let
# !!! Use cself/csuper inside for the actual overrides
cabalInstallOverlay = cself: csuper:
lib.optionalAttrs (lib.versionOlder self.ghc.version "9.6") {
{
# Needs to be upgraded compared to Stackage LTS 21
cabal-install-solver = cself.cabal-install-solver_3_10_1_0;
# Needs to be downgraded compared to Stackage LTS 21
resolv = cself.resolv_0_1_2_0;
} // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.6") {
Cabal = cself.Cabal_3_10_1_0;
Cabal-syntax = cself.Cabal-syntax_3_10_1_0;
} // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.4") {
@ -61,15 +57,15 @@ self: super: {
# not solvable short of recompiling GHC. Instead of adding
# allowInconsistentDependencies for all reverse dependencies of hspec-core,
# just upgrade to an hspec version without the offending dependency.
hspec-core = cself.hspec-core_2_11_1;
hspec-discover = cself.hspec-discover_2_11_1;
hspec = cself.hspec_2_11_1;
hspec-core = cself.hspec-core_2_11_4;
hspec-discover = cself.hspec-discover_2_11_4;
hspec = cself.hspec_2_11_4;
# hspec-discover and hspec-core depend on hspec-meta for testing which
# we need to avoid since it depends on ghc as well. Since hspec*_2_11*
# are overridden to take the versioned attributes as inputs, we need
# to make sure to override the versioned attribute with this fix.
hspec-discover_2_11_1 = dontCheck csuper.hspec-discover_2_11_1;
hspec-discover_2_11_4 = dontCheck csuper.hspec-discover_2_11_4;
# Prevent dependency on doctest which causes an inconsistent dependency
# due to depending on ghc which depends on directory etc.
@ -80,20 +76,16 @@ self: super: {
cabal-install = super.cabal-install.overrideScope cabalInstallOverlay;
cabal-install-solver = super.cabal-install-solver.overrideScope cabalInstallOverlay;
guardian = lib.pipe
# Needs cabal-install >= 3.8 /as well as/ matching Cabal
(super.guardian.overrideScope (self: super:
cabalInstallOverlay self super // {
# Needs at least path-io 1.8.0 due to canonicalizePath changes
path-io = self.path-io_1_8_1;
}
))
[
# Tests need internet access (run stack)
dontCheck
# May as well…
(self.generateOptparseApplicativeCompletions [ "guardian" ])
];
# Needs cabal-install >= 3.8 /as well as/ matching Cabal
guardian =
lib.pipe
(super.guardian.overrideScope cabalInstallOverlay)
[
# Tests need internet access (run stack)
dontCheck
# May as well…
(self.generateOptparseApplicativeCompletions [ "guardian" ])
];
}
) cabal-install
cabal-install-solver
@ -125,8 +117,6 @@ self: super: {
hls-brittany-plugin = assert super.hls-brittany-plugin.version == "1.1.0.0"; doJailbreak super.hls-brittany-plugin;
hls-hlint-plugin = super.hls-hlint-plugin.override {
# For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515
hlint = enableCabalFlag "ghc-lib" super.hlint;
apply-refact = self.apply-refact_0_11_0_0;
};
@ -137,13 +127,31 @@ self: super: {
# https://github.com/supki/ldap-client/issues/18
ldap-client-og = dontCheck super.ldap-client-og;
# For -fghc-lib see cabal.project in haskell-language-server.
stylish-haskell = if lib.versionAtLeast super.ghc.version "9.2"
then enableCabalFlag "ghc-lib"
(if lib.versionAtLeast super.ghc.version "9.4"
then super.stylish-haskell_0_14_4_0
else super.stylish-haskell)
else super.stylish-haskell;
stylish-haskell =
# Too-strict upper bounds, no Hackage revisions
doJailbreak
# For -fghc-lib see cabal.project in haskell-language-server.
(if lib.versionAtLeast super.ghc.version "9.2"
then enableCabalFlag "ghc-lib" super.stylish-haskell
else super.stylish-haskell
);
hiedb =
lib.pipe
super.hiedb
[
# hiedb-0.4.3.0 does not yet support algebraic-graphs-0.7. This patch works
# around the issue.
# https://github.com/wz1000/HieDb/pull/44
(appendPatch
(pkgs.fetchpatch {
name = "hiedb-algebraic-graphs-0.7.patch";
url = "https://github.com/wz1000/HieDB/commit/4ac8e6735321872b9d5d15a9cac492add5555234.patch";
hash = "sha256-Iu+M8r+DrpoxUCG6yekgbW+GffoNjjRksnwUJ6jojhE=";
}))
# Patch does not actually bump the bound in the .cabal file.
doJailbreak
];
###########################################
### END HASKELL-LANGUAGE-SERVER SECTION ###
@ -175,30 +183,39 @@ self: super: {
testFlags = drv.testFlags or [] ++ [ "-p" "! /Kahan.t_sum_shifted/" ];
}) super.math-functions;
# Too strict bounds on base
# https://github.com/lspitzner/butcher/issues/7#issuecomment-1681394943
butcher = doJailbreak super.butcher;
# https://github.com/lspitzner/data-tree-print/issues/4
data-tree-print = doJailbreak super.data-tree-print;
# … and template-haskell.
# https://github.com/lspitzner/czipwith/issues/5
czipwith = doJailbreak super.czipwith;
# Deal with infinite and NaN values generated by QuickCheck-2.14.3
inherit (
let
aesonQuickCheckPatch = appendPatches [
(pkgs.fetchpatch {
name = "aeson-quickcheck-2.14.3-double-workaround.patch";
url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch";
sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3";
})
];
in
{
aeson = aesonQuickCheckPatch super.aeson;
aeson_2_1_2_1 = aesonQuickCheckPatch super.aeson_2_1_2_1;
}
) aeson
aeson_2_1_2_1
;
aeson = overrideCabal {
# aeson's test suite includes some tests with big numbers that fail on 32bit
# https://github.com/haskell/aeson/issues/1060
doCheck = !pkgs.stdenv.hostPlatform.is32bit;
} (appendPatches [
(pkgs.fetchpatch {
name = "aeson-quickcheck-2.14.3-double-workaround.patch";
url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch";
sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3";
})
] super.aeson);
# 2023-06-28: Test error: https://hydra.nixos.org/build/225565149
orbits = dontCheck super.orbits;
# 2023-06-28: Test error: https://hydra.nixos.org/build/225559546
monad-bayes = dontCheck super.monad-bayes;
# Allow aeson == 2.1.*
# https://github.com/hdgarrood/aeson-better-errors/issues/23
aeson-better-errors = doJailbreak super.aeson-better-errors;
# 2023-08-09: Jailbreak because of vector < 0.13
monad-bayes = doJailbreak (super.monad-bayes.override {
hspec = self.hspec_2_11_4;
});
# Disable tests failing on odd floating point numbers generated by QuickCheck 2.14.3
# https://github.com/haskell/statistics/issues/205
@ -220,7 +237,11 @@ self: super: {
# Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs
# itself. For instance, pkgs.path has dirty sources and puts a huge .git in the
# store. Testing is done upstream.
arion-compose = dontCheck super.arion-compose;
# 2023-07-27: Allow base-4.17
arion-compose = dontCheck (assert super.arion-compose.version == "0.2.0.0"; doJailbreak super.arion-compose);
# 2023-07-17: Outdated base bound https://github.com/srid/lvar/issues/5
lvar = doJailbreak super.lvar;
# This used to be a core package provided by GHC, but then the compiler
# dropped it. We define the name here to make sure that old packages which
@ -255,17 +276,43 @@ self: super: {
ghc-datasize = disableLibraryProfiling super.ghc-datasize;
ghc-vis = disableLibraryProfiling super.ghc-vis;
# Fixes compilation for basement on i686 for GHC >= 9.4
# https://github.com/haskell-foundation/foundation/pull/573
# Patch would not work for GHC >= 9.2 where it breaks compilation on x86_64
# https://github.com/haskell-foundation/foundation/pull/573#issuecomment-1669468867
# TODO(@sternenseemann): make unconditional
basement = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
(fetchpatch {
name = "basement-i686-ghc-9.4.patch";
url = "https://github.com/haskell-foundation/foundation/pull/573/commits/38be2c93acb6f459d24ed6c626981c35ccf44095.patch";
sha256 = "17kz8glfim29vyhj8idw8bdh3id5sl9zaq18zzih3schfvyjppj7";
stripLen = 1;
})
]) super.basement;
# Fixes compilation of memory with GHC >= 9.4 on 32bit platforms
# https://github.com/vincenthz/hs-memory/pull/99
memory = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
(fetchpatch {
name = "memory-i686-ghc-9.4.patch";
url = "https://github.com/vincenthz/hs-memory/pull/99/commits/2738929ce15b4c8704bbbac24a08539b5d4bf30e.patch";
sha256 = "196rj83iq2k249132xsyhbbl81qi1j23h9pa6mmk6zvxpcf63yfw";
})
]) super.memory;
# Waiting for the commit being fetched as a patch to get a release.
espial = appendPatch (fetchpatch {
url = "https://github.com/jonschoning/espial/commit/70375db7e245207b3572779288eade3252c4d9e3.patch";
sha256 = "sha256-fto8fdFbZkzn7dwCCsGw+j+5HSvEvyvU5VzYDn4F2G8=";
excludes = ["*.yaml" "*.lock" "*.json"];
}) super.espial;
# 2023-06-10: Too strict version bound on https://github.com/haskell/ThreadScope/issues/118
threadscope = doJailbreak super.threadscope;
# patat main branch has an unreleased commit that fixes the build by
# relaxing restrictive upper boundaries. This can be removed once there's a
# new release following version 0.8.8.0.
patat = appendPatch (fetchpatch {
url = "https://github.com/jaspervdj/patat/commit/be9e0fe5642ba6aa7b25705ba17950923e9951fa.patch";
sha256 = "sha256-Vxxi46qrkIyzYQZ+fe1vNTPldcQEI2rX2H40GvFJR2M=";
excludes = ["stack.yaml" "stack.yaml.lock"];
}) super.patat;
# Overriding the version pandoc dependency uses as the latest release has version bounds
# defined as >= 3.1 && < 3.2, can be removed once pandoc gets bumped by Stackage.
patat = super.patat.override { pandoc = self.pandoc_3_1_6; };
# The latest release on hackage has an upper bound on containers which
# breaks the build, though it works with the version of containers present
@ -280,6 +327,10 @@ self: super: {
mysql-simple = dontCheck super.mysql-simple;
mysql-haskell = dontCheck super.mysql-haskell;
# Test data missing
# https://github.com/FPtje/GLuaFixer/issues/165
glualint = dontCheck super.glualint;
# The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
# https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
git-annex = overrideCabal (drv: {
@ -287,7 +338,7 @@ self: super: {
name = "git-annex-${super.git-annex.version}-src";
url = "git://git-annex.branchable.com/";
rev = "refs/tags/" + super.git-annex.version;
sha256 = "0mz1b3vnschsndv42787mm6kybpb2yskkdss3rcm7xc6jjh815ik";
sha256 = "1i14mv8z9sr5sckckwiba4cypgs3iwk19pyrl9xzcrzz426dxrba";
# delete android and Android directories which cause issues on
# darwin (case insensitive directory). Since we don't need them
# during the build process, we can delete it to prevent a hash
@ -302,25 +353,55 @@ self: super: {
# `git-annex-shell` by making `shell = haskellPackages.git-annex`.
# https://git-annex.branchable.com/git-annex-shell/
passthru.shellPath = "/bin/git-annex-shell";
}) super.git-annex;
}) (super.git-annex.overrideScope (self: _: {
# https://github.com/haskell-pkg-janitors/unix-compat/issues/3
unix-compat = self.unix-compat_0_6;
}));
# Too strict bounds on servant
# Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
arch-web = doJailbreak super.arch-web;
# Too strict upper bound on hedgehog
# https://github.com/circuithub/rel8/issues/248
rel8 = doJailbreak super.rel8;
# Fix test trying to access /home directory
shell-conduit = overrideCabal (drv: {
postPatch = "sed -i s/home/tmp/ test/Spec.hs";
}) super.shell-conduit;
cachix = self.generateOptparseApplicativeCompletions [ "cachix" ] super.cachix;
# https://github.com/serokell/nixfmt/issues/130
nixfmt = doJailbreak super.nixfmt;
# Too strict upper bounds on turtle and text
# https://github.com/awakesecurity/nix-deploy/issues/35
nix-deploy = doJailbreak super.nix-deploy;
# Too strict upper bound on algebraic-graphs
# https://github.com/awakesecurity/nix-graph/issues/5
nix-graph = doJailbreak super.nix-graph;
cachix = self.generateOptparseApplicativeCompletions [ "cachix" ]
# Adds a workaround to the API changes in the versions library
# Should be dropped by the next release
# https://github.com/cachix/cachix/pull/556
(appendPatch (fetchpatch {
url = "https://github.com/cachix/cachix/commit/078d2d2212d7533a6a4db000958bfc4373c4deeb.patch";
hash = "sha256-xfJaO2CuZWFHivq4gqbkNnTOWPiyFVjlwOPV6yibKH4=";
stripLen = 1;
}) super.cachix);
# https://github.com/froozen/kademlia/issues/2
kademlia = dontCheck super.kademlia;
# Tests require older versions of tasty.
hzk = dontCheck super.hzk;
resolv = doJailbreak super.resolv;
resolv_0_1_2_0 = doJailbreak super.resolv_0_1_2_0;
# Too strict bounds on base{,-orphans}, template-haskell
# https://github.com/sebastiaanvisser/fclabels/issues/44
fclabels = doJailbreak super.fclabels;
# Tests require a Kafka broker running locally
haskakafka = dontCheck super.haskakafka;
@ -345,18 +426,7 @@ self: super: {
# https://github.com/techtangents/ablist/issues/1
ABList = dontCheck super.ABList;
pandoc-cli = throwIfNot (versionOlder super.pandoc.version "3.0.0") "pandoc-cli contains the pandoc executable starting with 3.0, this needs to be considered now." (markBroken (dontDistribute super.pandoc-cli));
inline-c-cpp = overrideCabal (drv: {
patches = drv.patches or [] ++ [
(fetchpatch {
# awaiting release >0.5.0.0
url = "https://github.com/fpco/inline-c/commit/e176b8e8c3c94e7d8289a8b7cc4ce8e737741730.patch";
name = "inline-c-cpp-pr-132-1.patch";
sha256 = "sha256-CdZXAT3Ar4KKDGyAUu8A7hzddKe5/AuMKoZSjt3o0UE=";
stripLen = 1;
})
];
postPatch = (drv.postPatch or "") + ''
substituteInPlace inline-c-cpp.cabal --replace "-optc-std=c++11" ""
'';
@ -409,22 +479,6 @@ self: super: {
# 2022-02-14: Strict upper bound: https://github.com/psibi/streamly-bytestring/issues/30
streamly-bytestring = dontCheck (doJailbreak super.streamly-bytestring);
# The package requires streamly == 0.9.*.
# (We can remove this once the assert starts failing.)
streamly-archive = super.streamly-archive.override {
streamly =
assert (builtins.compareVersions pkgs.haskellPackages.streamly.version "0.9.0" < 0);
pkgs.haskellPackages.streamly_0_9_0;
};
# The package requires streamly == 0.9.*.
# (We can remove this once the assert starts failing.)
streamly-lmdb = super.streamly-lmdb.override {
streamly =
assert (builtins.compareVersions pkgs.haskellPackages.streamly.version "0.9.0" < 0);
self.streamly_0_9_0;
};
# base bound
digit = doJailbreak super.digit;
@ -442,10 +496,15 @@ self: super: {
# 2020-06-05: HACK: does not pass own build suite - `dontCheck`
# 2022-11-24: jailbreak as it has too strict bounds on a bunch of things
hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] (dontCheck (doJailbreak super.hnix));
# 2023-07-26: Cherry-pick GHC 9.4 changes from hnix master branch
hnix = appendPatches [
./patches/hnix-compat-for-ghc-9.4.patch
] (dontCheck (doJailbreak super.hnix));
# Too strict bounds on algebraic-graphs and bytestring
# https://github.com/haskell-nix/hnix-store/issues/180
hnix-store-core = doJailbreak super.hnix-store-core;
hnix-store-core_0_6_1_0 = doDistribute (doJailbreak super.hnix-store-core_0_6_1_0);
# Fails for non-obvious reasons while attempting to use doctest.
focuslist = dontCheck super.focuslist;
@ -455,14 +514,17 @@ self: super: {
opencv = dontCheck (appendPatch ./patches/opencv-fix-116.patch super.opencv);
opencv-extra = dontCheck (appendPatch ./patches/opencv-fix-116.patch super.opencv-extra);
# Too strict lower bound on hspec
graphql =
assert lib.versionOlder self.hspec.version "2.10";
doJailbreak super.graphql;
# https://github.com/ekmett/structures/issues/3
structures = dontCheck super.structures;
jacinda = appendPatches [
(pkgs.fetchpatch {
name = "jacinda-alex-3.3.patch";
url = "https://github.com/vmchale/jacinda/commit/b8e18871900402e6ab0addae2e41a0f360682ae3.patch";
sha256 = "0c1b9hp9j44zafzjidp301dz0m54vplgfisqvb1zrh1plk6vsxsa";
})
] (overrideCabal { revision = null; editedCabalFile = null; } super.jacinda);
# Disable test suites to fix the build.
acme-year = dontCheck super.acme-year; # http://hydra.cryp.to/build/497858/log/raw
aeson-lens = dontCheck super.aeson-lens; # http://hydra.cryp.to/build/496769/log/raw
@ -726,11 +788,6 @@ self: super: {
# else dontCheck super.doctest-discover);
doctest-discover = dontCheck super.doctest-discover;
# Test suite is missing an import from hspec
# https://github.com/haskell-works/tasty-discover/issues/9
# https://github.com/commercialhaskell/stackage/issues/6584#issuecomment-1326522815
tasty-discover = assert super.tasty-discover.version == "4.2.2"; dontCheck super.tasty-discover;
# Too strict lower bound on tasty-hedgehog
# https://github.com/qfpl/tasty-hedgehog/issues/70
tasty-sugar = doJailbreak super.tasty-sugar;
@ -799,6 +856,9 @@ self: super: {
elm-server = markBroken super.elm-server;
elm-yesod = markBroken super.elm-yesod;
# Tests failure with GHC >= 9.0.1, fixed in 1.6.24.4
yesod-core = assert super.yesod-core.version == "1.6.24.3"; dontCheck super.yesod-core;
# https://github.com/Euterpea/Euterpea2/issues/40
Euterpea = doJailbreak super.Euterpea;
@ -1023,20 +1083,12 @@ self: super: {
restless-git = dontCheck super.restless-git;
# requires git at test-time *and* runtime, but we'll just rely on users to
# bring their own git at runtime
# bring their own git at runtime. Additionally, sensei passes `-package
# hspec-meta` to GHC in the tests, but doesn't depend on it itself.
sensei = overrideCabal (drv: {
testHaskellDepends = drv.testHaskellDepends or [] ++ [ self.hspec-meta_2_10_5 ];
testHaskellDepends = drv.testHaskellDepends or [] ++ [ self.hspec-meta ];
testToolDepends = drv.testToolDepends or [] ++ [ pkgs.git ];
}) (super.sensei.override {
hspec = self.hspec_2_11_1;
hspec-wai = self.hspec-wai.override {
hspec = self.hspec_2_11_1;
};
hspec-contrib = self.hspec-contrib.override {
hspec-core = self.hspec-core_2_11_1;
};
fsnotify = self.fsnotify_0_4_1_0;
});
}) super.sensei;
# Depends on broken fluid.
fluid-idl-http-client = markBroken super.fluid-idl-http-client;
@ -1084,15 +1136,16 @@ self: super: {
# jailbreak tasty < 1.2 until servant-docs > 0.11.3 is on hackage.
snap-templates = doJailbreak super.snap-templates; # https://github.com/snapframework/snap-templates/issues/22
# https://github.com/haskell-hvr/resolv/pull/6
resolv_0_1_1_2 = dontCheck super.resolv_0_1_1_2;
# The test suite does not know how to find the 'alex' binary.
alex = overrideCabal (drv: {
testSystemDepends = (drv.testSystemDepends or []) ++ [pkgs.which];
preCheck = ''export PATH="$PWD/dist/build/alex:$PATH"'';
}) super.alex;
# 2023-07-14: Restrictive upper bounds: https://github.com/luke-clifton/shh/issues/76
shh = doJailbreak super.shh;
shh-extras = doJailbreak super.shh-extras;
# This package refers to the wrong library (itself in fact!)
vulkan = super.vulkan.override { vulkan = pkgs.vulkan-loader; };
@ -1144,17 +1197,33 @@ self: super: {
}) super.dhall-nixpkgs);
stack =
self.generateOptparseApplicativeCompletions
[ "stack" ]
(super.stack.override {
# stack needs to use an exact hpack version. When changing or removing
# this override, double-check the upstream stack release to confirm
# that we are using the correct hpack version. See
# https://github.com/NixOS/nixpkgs/issues/223390 for more information.
#
# hpack tests fail because of https://github.com/sol/hpack/issues/528
hpack = dontCheck self.hpack_0_35_0;
});
lib.pipe
super.stack
[
(self.generateOptparseApplicativeCompletions [ "stack" ])
# Seems to be an unnecessarily strict dep on ansi-terminal
doJailbreak
# The below patch has unix line endings, but the actual file
# has CRLF line endings. The following override changes the
# file to unix line endings before applying the patch.
(overrideCabal (oldAttrs: {
prePatch = oldAttrs.prePatch or "" + ''
"${lib.getBin pkgs.buildPackages.dos2unix}/bin/dos2unix" src/main/BuildInfo.hs
'';
}))
# stack-2.11.1 has a bug when building without git.
# https://github.com/commercialhaskell/stack/pull/6127
(appendPatch
(fetchpatch {
name = "stack-fix-building-without-git.patch";
url = "https://github.com/commercialhaskell/stack/pull/6127/commits/086f93933d547736a7007fc4110f7816ef21f691.patch";
hash = "sha256-1nwzMoumWceVu8RNnH2mmSxYT24G1FAnFRJvUMeD3po=";
includes = [ "src/main/BuildInfo.hs" ];
})
)
];
# Too strict version bound on hashable-time.
# Tests require newer package version.
@ -1288,6 +1357,10 @@ self: super: {
# https://github.com/erikd/hjsmin/issues/32
hjsmin = dontCheck super.hjsmin;
# too strict bounds on text in the test suite
# https://github.com/audreyt/string-qq/pull/3
string-qq = doJailbreak super.string-qq;
# Remove for hail > 0.2.0.0
hail = overrideCabal (drv: {
patches = [
@ -1348,17 +1421,6 @@ self: super: {
Cabal-syntax = self.Cabal-syntax_3_10_1_0;
}));
# 2022-03-12: Pick patches from master for compat with Stackage Nightly
# 2022-12-07: Lift bounds to allow dependencies shipped with LTS-20
# https://github.com/jgm/gitit/pull/683
gitit = appendPatches [
(fetchpatch {
name = "gitit-fix-build-with-hoauth2-2.3.0.patch";
url = "https://github.com/jgm/gitit/commit/fd534c0155eef1790500c834e612ab22cf9b67b6.patch";
sha256 = "0hmlqkavn8hr0b4y4hxs1yyg0r79ylkzhzwy1dzbb3a2q86ydd2f";
})
] (doJailbreak super.gitit);
# Test suite requires database
persistent-mysql = dontCheck super.persistent-mysql;
persistent-postgresql =
@ -1409,7 +1471,6 @@ self: super: {
});
};
# 2023-06-24: too strict upper bound on bytestring
jsaddle-webkit2gtk =
appendPatches [
(pkgs.fetchpatch {
@ -1426,7 +1487,14 @@ self: super: {
stripLen = 1;
includes = [ "jsaddle-webkit2gtk.cabal" ];
})
] super.jsaddle-webkit2gtk;
]
(overrideCabal (old: {
postPatch = old.postPatch or "" + ''
sed -i 's/aeson.*,/aeson,/' jsaddle-webkit2gtk.cabal
sed -i 's/text.*,/text,/' jsaddle-webkit2gtk.cabal
'';
})
super.jsaddle-webkit2gtk);
# 2022-03-16: lens bound can be loosened https://github.com/ghcjs/jsaddle-dom/issues/19
jsaddle-dom = overrideCabal (old: {
@ -1440,6 +1508,8 @@ self: super: {
reflex-dom-core = overrideCabal (old: {
postPatch = old.postPatch or "" + ''
sed -i 's/template-haskell.*2.17/template-haskell/' reflex-dom-core.cabal
sed -i 's/semialign.*1.3/semialign/' reflex-dom-core.cabal
sed -i 's/these.*0.9/these/' reflex-dom-core.cabal
'';
})
((appendPatches [
@ -1592,7 +1662,6 @@ self: super: {
# Also, we need QuickCheck-2.14.x to build the test suite, which isn't easy in LTS-16.x.
# So let's not go there and just disable the tests altogether.
hspec-core = dontCheck super.hspec-core;
hspec-core_2_7_10 = doDistribute (dontCheck super.hspec-core_2_7_10);
# tests seem to require a different version of hspec-core
hspec-contrib = dontCheck super.hspec-contrib;
@ -1665,18 +1734,20 @@ self: super: {
servant-openapi3 = dontCheck super.servant-openapi3;
# Give latest hspec correct dependency versions without overrideScope
hspec_2_11_1 = doDistribute (super.hspec_2_11_1.override {
hspec-discover = self.hspec-discover_2_11_1;
hspec-core = self.hspec-core_2_11_1;
hspec_2_11_4 = doDistribute (super.hspec_2_11_4.override {
hspec-discover = self.hspec-discover_2_11_4;
hspec-core = self.hspec-core_2_11_4;
});
hspec-discover_2_11_1 = doDistribute (super.hspec-discover_2_11_1.override {
hspec-meta = self.hspec-meta_2_10_5;
hspec-meta_2_11_4 = doDistribute (super.hspec-meta_2_11_4.override {
hspec-expectations = self.hspec-expectations_0_8_4;
});
# Need to disable tests to prevent an infinite recursion if hspec-core_2_11_1
hspec-discover_2_11_4 = doDistribute (super.hspec-discover_2_11_4.override {
hspec-meta = self.hspec-meta_2_11_4;
});
# Need to disable tests to prevent an infinite recursion if hspec-core_2_11_4
# is overlayed to hspec-core.
hspec-core_2_11_1 = doDistribute (dontCheck (super.hspec-core_2_11_1.override {
hspec-meta = self.hspec-meta_2_10_5;
hspec-expectations = self.hspec-expectations_0_8_3;
hspec-core_2_11_4 = doDistribute (dontCheck (super.hspec-core_2_11_4.override {
hspec-expectations = self.hspec-expectations_0_8_4;
}));
# Point hspec 2.7.10 to correct dependencies
@ -1684,23 +1755,15 @@ self: super: {
hspec-discover = self.hspec-discover_2_7_10;
hspec-core = self.hspec-core_2_7_10;
};
hspec-discover_2_7_10 = super.hspec-discover_2_7_10.override {
hspec-meta = self.hspec-meta_2_7_8;
};
hspec-core_2_7_10 = doJailbreak (dontCheck super.hspec-core_2_7_10);
# waiting for aeson bump
servant-swagger-ui-core = doJailbreak super.servant-swagger-ui-core;
hercules-ci-agent = lib.pipe super.hercules-ci-agent [
(appendPatches [
# https://github.com/hercules-ci/hercules-ci-agent/pull/507
(fetchpatch {
url = "https://github.com/hercules-ci/hercules-ci-agent/commit/f5c39d0cbde36a056419cab8d69a67302eb8b0e4.patch";
sha256 = "sha256-J8N4+HUQ6vlJBCwCyxv8Fv5HSbtiim64Qh1n9CaRe1o=";
stripLen = 1;
})
# https://github.com/hercules-ci/hercules-ci-agent/pull/526
./patches/hercules-ci-agent-cachix-1.6.patch
])
(self.generateOptparseApplicativeCompletions [ "hercules-ci-agent" ])
];
hercules-ci-agent = self.generateOptparseApplicativeCompletions [ "hercules-ci-agent" ] super.hercules-ci-agent;
# Test suite doesn't compile with aeson 2.0
# https://github.com/hercules-ci/hercules-ci-agent/pull/387
@ -1767,6 +1830,10 @@ self: super: {
# 2020-12-06: Restrictive upper bounds w.r.t. pandoc-types (https://github.com/owickstrom/pandoc-include-code/issues/27)
pandoc-include-code = doJailbreak super.pandoc-include-code;
# 2023-07-08: Restrictive upper bounds on text: https://github.com/owickstrom/pandoc-emphasize-code/pull/14
# 2023-07-08: Missing test dependency: https://github.com/owickstrom/pandoc-emphasize-code/pull/13
pandoc-emphasize-code = dontCheck (doJailbreak super.pandoc-emphasize-code);
# DerivingVia is not allowed in safe Haskell
# https://github.com/strake/util.hs/issues/1
util = appendConfigureFlags [
@ -1839,6 +1906,64 @@ self: super: {
# https://github.com/jgm/pandoc/issues/7163
pandoc = dontCheck super.pandoc;
# Since pandoc-3, the actual `pandoc` executable is in the pandoc-cli
# package. It is no longer distributed in the pandoc package itself. So for
# people that want to use the `pandoc` cli tool, they must use pandoc-cli.
#
# The unfortunate thing is that LTS-21 includes no possible build plan for
# pandoc-cli, because pandoc-cli pandoc-lua-engine are not in LTS 21.
# To get pandoc-lua-engine building we need either to downgrade a ton
# of hslua-module-* packages from stackage or use pandoc 3.1 although
# LTS contains pandoc 3.0.
inherit (let
pandoc-cli-overlay = self: super: {
# pandoc-cli requires pandoc >= 3.1
pandoc = self.pandoc_3_1_6;
# pandoc depends on crypton-connection, which requires tls >= 1.7
tls = self.tls_1_7_0;
crypton-connection = unmarkBroken super.crypton-connection;
# pandoc depends on http-client-tls, which only starts depending
# on crypton-connection in http-client-tls-0.3.6.2.
http-client-tls = self.http-client-tls_0_3_6_2;
# pandoc and skylighting are developed in tandem
skylighting-core = self.skylighting-core_0_13_4_1;
skylighting = self.skylighting_0_13_4_1;
};
in {
pandoc-cli = super.pandoc-cli.overrideScope pandoc-cli-overlay;
pandoc_3_1_6 = doDistribute (super.pandoc_3_1_6.overrideScope pandoc-cli-overlay);
pandoc-lua-engine = super.pandoc-lua-engine.overrideScope pandoc-cli-overlay;
})
pandoc-cli
pandoc_3_1_6
pandoc-lua-engine
;
crypton-x509 =
lib.pipe
super.crypton-x509
[
# Mistype in a dependency in a test.
# https://github.com/kazu-yamamoto/crypton-certificate/pull/3
(appendPatch
(fetchpatch {
name = "crypton-x509-rename-dep.patch";
url = "https://github.com/kazu-yamamoto/crypton-certificate/commit/5281ff115a18621407b41f9560fd6cd65c602fcc.patch";
hash = "sha256-pLzuq+baSDn+MWhtYIIBOrE1Js+tp3UsaEZy5MhWAjY=";
relative = "x509";
})
)
# There is a revision in crypton-x509, so the above patch won't
# apply because of line endings in revised .cabal files.
(overrideCabal {
editedCabalFile = null;
revision = null;
})
];
# * doctests don't work without cabal
# https://github.com/noinia/hgeometry/issues/132
# * Too strict version bound on vector-builder
@ -1964,6 +2089,10 @@ self: super: {
# https://github.com/obsidiansystems/database-id/issues/1
database-id-class = doJailbreak super.database-id-class;
# https://github.com/softwarefactory-project/matrix-client-haskell/issues/36
# Restrictive bounds on aeson
matrix-client = doJailbreak super.matrix-client;
cabal2nix-unstable = overrideCabal {
passthru = {
updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh;
@ -2015,15 +2144,25 @@ self: super: {
}) (dontCheck super.yi-language);
# 2022-03-16: Upstream is not bumping bounds https://github.com/ghcjs/jsaddle/issues/123
jsaddle = overrideCabal (drv: {
# 2023-07-14: Upstream is also not releasing fixes.
jsaddle = appendPatch
(fetchpatch {
name = "jsaddle-casemapping.patch";
url = "https://github.com/ghcjs/jsaddle/commit/f90df85fec84fcc4927bfb67452e31342f5aec1f.patch";
sha256 = "sha256-xCtDxpjZbus8VSeBUEV0OnJlcQKjeL1PbYSHnhpFuyI=";
relative = "jsaddle";
})
(overrideCabal (drv: {
# lift conditional version constraint on ref-tf
postPatch = ''
sed -i 's/ref-tf.*,/ref-tf,/' jsaddle.cabal
sed -i 's/attoparsec.*,/attoparsec,/' jsaddle.cabal
sed -i 's/time.*,/time,/' jsaddle.cabal
sed -i 's/vector.*,/vector,/' jsaddle.cabal
sed -i 's/(!name)/(! name)/' src/Language/Javascript/JSaddle/Object.hs
'' + (drv.postPatch or "");
}) (doJailbreak super.jsaddle);
})
(doJailbreak super.jsaddle));
# 2022-03-22: Jailbreak for base bound: https://github.com/reflex-frp/reflex-dom/pull/433
reflex-dom = assert super.reflex-dom.version == "0.6.1.1"; doJailbreak super.reflex-dom;
@ -2076,9 +2215,10 @@ self: super: {
gi-gtk-declarative-app-simple = doJailbreak super.gi-gtk-declarative-app-simple;
# 2023-04-09: haskell-ci needs Cabal-syntax 3.10
haskell-ci = super.haskell-ci.overrideScope (self: super: {
# 2023-07-03: allow lattices-2.2, waiting on https://github.com/haskell-CI/haskell-ci/pull/664
haskell-ci = doJailbreak (super.haskell-ci.overrideScope (self: super: {
Cabal-syntax = self.Cabal-syntax_3_10_1_0;
});
}));
large-hashable = lib.pipe (super.large-hashable.override {
# https://github.com/factisresearch/large-hashable/commit/5ec9d2c7233fc4445303564047c992b693e1155c
@ -2110,6 +2250,12 @@ self: super: {
"-n" "^Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized$"
];
}))
# https://github.com/factisresearch/large-hashable/issues/25
# Currently broken with text >= 2.0
(overrideCabal (lib.optionalAttrs (lib.versionAtLeast self.ghc.version "9.4") {
broken = true;
hydraPlatforms = [];
}))
];
# BSON defaults to requiring network instead of network-bsd which is
@ -2153,11 +2299,6 @@ self: super: {
sha256 = "0l15ccfdys100jf50s9rr4p0d0ikn53bkh7a9qlk9i0y0z5jc6x1";
}) super.basic-cpuid;
# Needs Cabal >= 3.4
chs-cabal = super.chs-cabal.override {
Cabal = self.Cabal_3_6_3_0;
};
# 2021-08-18: streamly-posix was released with hspec 2.8.2, but it works with older versions too.
streamly-posix = doJailbreak super.streamly-posix;
@ -2318,19 +2459,26 @@ self: super: {
# The shipped Setup.hs file is broken.
csv = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.hs"; }) super.csv;
# Build-type is simple, but ships a broken Setup.hs
digits = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.lhs"; }) super.digits;
cabal-fmt = doJailbreak (super.cabal-fmt.override {
# Needs newer Cabal-syntax version.
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
Cabal-syntax = self.Cabal-syntax_3_10_1_0;
});
# Tests require ghc-9.2.
ema = dontCheck super.ema;
# 2023-07-18: https://github.com/srid/ema/issues/156
ema = doJailbreak super.ema;
glirc = doJailbreak (super.glirc.override {
vty = self.vty_5_35_1;
});
# Too strict bounds on text and tls
# https://github.com/barrucadu/irc-conduit/issues/54
irc-conduit = doJailbreak super.irc-conduit;
irc-client = doJailbreak super.irc-client;
# 2022-02-25: Unmaintained and to strict upper bounds
paths = doJailbreak super.paths;
@ -2349,7 +2497,8 @@ self: super: {
sed -i 's/import "jsaddle-dom" GHCJS.DOM.Document/import "ghcjs-dom-jsaddle" GHCJS.DOM.Document/' src/GHCJS/DOM/Document.hs
'' + (old.postPatch or "");
})
super.ghcjs-dom;
# 2023-07-15: Restrictive upper bounds on text
(doJailbreak super.ghcjs-dom);
# Too strict bounds on chell: https://github.com/fpco/haskell-filesystem/issues/24
system-fileio = doJailbreak super.system-fileio;
@ -2413,8 +2562,11 @@ self: super: {
# has been resolved.
lucid-htmx = doJailbreak super.lucid-htmx;
# 2022-09-20: Restrictive upper bound on lsp
futhark = doJailbreak super.futhark;
# Needs lsp >= 2.1
futhark = super.futhark.overrideScope (fself: _: {
lsp = fself.lsp_2_1_0_0;
lsp-types = fself.lsp-types_2_0_1_0;
});
# Too strict bounds on hspec
# https://github.com/klapaucius/vector-hashtables/issues/11
@ -2425,10 +2577,6 @@ self: super: {
doctest-parallel = dontCheck super.doctest-parallel;
clash-prelude = dontCheck super.clash-prelude;
# Too strict upper bound on th-desugar, fixed in 3.1.1
singletons-th = assert super.singletons-th.version == "3.1"; doJailbreak super.singletons-th;
singletons-base = doJailbreak super.singletons-base;
# Ships a broken Setup.hs
# https://github.com/lehins/conduit-aeson/issues/1
conduit-aeson = overrideCabal (drv: {
@ -2440,6 +2588,10 @@ self: super: {
testTarget = "tests";
}) super.conduit-aeson;
# Upper bounds are too strict:
# https://github.com/velveteer/hermes/pull/22
hermes-json = doJailbreak super.hermes-json;
# Disabling doctests.
regex-tdfa = overrideCabal {
testTarget = "regex-tdfa-unittest";
@ -2459,7 +2611,7 @@ self: super: {
(let
# We need to build purescript with these dependencies and thus also its reverse
# dependencies to avoid version mismatches in their dependency closure.
# TODO(@cdepillabout): maybe unify with the spago overlay in configuration-nix.nix?
# TODO: maybe unify with the spago overlay in configuration-nix.nix?
purescriptOverlay = self: super: {
# As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0,
# but it has a problem with parsing the `async` keyword. It doesn't allow
@ -2493,11 +2645,8 @@ self: super: {
# 2022-11-05: https://github.com/ysangkok/haskell-tzdata/issues/3
tzdata = dontCheck super.tzdata;
# 2022-11-15: Needs newer witch package and brick 1.3 which in turn works with text-zipper 0.12
# Other dependencies are resolved with doJailbreak for both swarm and brick_1_3
swarm = doJailbreak (super.swarm.override {
brick = doJailbreak (dontCheck super.brick_1_9);
});
# We provide newer dependencies than upstream expects.
swarm = doJailbreak super.swarm;
# Too strict upper bound on bytestring
# https://github.com/TravisWhitaker/rdf/issues/8
@ -2565,11 +2714,6 @@ self: super: {
# https://github.com/tweag/webauthn/issues/166
webauthn = dontCheck super.webauthn;
# Too strict lower bound on hspec
wai-token-bucket-ratelimiter =
assert lib.versionOlder self.hspec.version "2.10";
doJailbreak super.wai-token-bucket-ratelimiter;
# doctest <0.19
polysemy = doJailbreak super.polysemy;
@ -2624,11 +2768,6 @@ self: super: {
# Get rid of this in the next release: https://github.com/kowainik/tomland/commit/37f16460a6dfe4606d48b8b86c13635d409442cd
tomland = doJailbreak super.tomland;
# 2023-04-05: The last version to support libsoup-2.4, required for
# compatibility with other gi- packages.
# Take another look when gi-webkit2 updates as it may have become compatible with libsoup-3
gi-soup = assert versions.major self.gi-webkit2.version == "4"; self.gi-soup_2_4_28;
llvm-ffi = super.llvm-ffi.override {
LLVM = pkgs.llvmPackages_13.libllvm;
};
@ -2638,7 +2777,7 @@ self: super: {
# Tests fail due to the newly-build fourmolu not being in PATH
# https://github.com/fourmolu/fourmolu/issues/231
fourmolu_0_13_0_0 = dontCheck (super.fourmolu_0_13_0_0.overrideScope (lself: lsuper: {
fourmolu_0_13_1_0 = dontCheck (super.fourmolu_0_13_1_0.overrideScope (lself: lsuper: {
Cabal-syntax = lself.Cabal-syntax_3_10_1_0;
ghc-lib-parser = lself.ghc-lib-parser_9_6_2_20230523;
parsec = lself.parsec_3_1_16_1;
@ -2656,4 +2795,7 @@ self: super: {
# Flaky QuickCheck tests
# https://github.com/Haskell-Things/ImplicitCAD/issues/441
implicit = dontCheck super.implicit;
# The hackage source is somehow missing a file present in the repo (tests/ListStat.hs).
sym = dontCheck super.sym;
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View file

@ -301,6 +301,15 @@ self: super: ({
'' + drv.postPatch or "";
}) super.foldl;
# 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;
} // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin
# https://github.com/fpco/unliftio/issues/87

View file

@ -46,18 +46,27 @@ self: super: {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work
Cabal-syntax = self.Cabal-syntax_3_6_0_0;
# These core package only exist for GHC >= 9.4. The best we can do is feign
# their existence to callPackages, but their is no shim for lower GHC versions.
system-cxx-std-lib = null;
# Additionally depends on OneTuple for GHC < 9.0
base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries;
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
hashable = addBuildDepends [
self.data-array-byte
self.base-orphans
] super.hashable;
# Pick right versions for GHC-specific packages
ghc-api-compat = doDistribute (unmarkBroken self.ghc-api-compat_8_10_7);
# ghc versions which dont match the ghc-lib-parser-ex version need the
# additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;
# Needs to use ghc-lib due to incompatible GHC
ghc-tags = doDistribute (addBuildDepend self.ghc-lib self.ghc-tags_1_5);
@ -102,10 +111,23 @@ self: super: {
in addBuildDepends additionalDeps (super.haskell-language-server.overrideScope (lself: lsuper: {
Cabal = lself.Cabal_3_6_3_0;
aeson = lself.aeson_1_5_6_0;
lens-aeson = lself.lens-aeson_1_1_3;
lens-aeson = doJailbreak lself.lens-aeson_1_1_3;
lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0
hls-overloaded-record-dot-plugin = null;
}));
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_2_7_20230228;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_2_1_1;
ghc-lib = doDistribute self.ghc-lib_9_2_7_20230228;
mod = super.mod_0_1_2_2;
path-io = doJailbreak super.path-io;
ormolu = self.ormolu_0_5_0_1;
fourmolu = dontCheck self.fourmolu_0_9_0_0;
hlint = self.hlint_3_4_1;
stylish-haskell = doJailbreak self.stylish-haskell_0_14_3_0;
hls-tactics-plugin = unmarkBroken (addBuildDepends (with self.hls-tactics-plugin.scope; [
aeson extra fingertree generic-lens ghc-exactprint ghc-source-gen ghcide
hls-graph hls-plugin-api hls-refactor-plugin hyphenation lens lsp megaparsec
@ -129,15 +151,21 @@ self: super: {
mime-string = disableOptimization super.mime-string;
# weeder 2.3.0 no longer supports GHC 8.10
# weeder 2.3.* no longer supports GHC 8.10
weeder = doDistribute (doJailbreak self.weeder_2_2_0);
# Unnecessarily strict upper bound on lens
weeder_2_2_0 = doJailbreak (super.weeder_2_2_0.override {
# weeder < 2.6 only supports algebraic-graphs < 0.7
# We no longer have matching test deps for algebraic-graphs 0.6.1 in the set
algebraic-graphs = dontCheck self.algebraic-graphs_0_6_1;
});
# OneTuple needs hashable instead of ghc-prim for GHC < 9
OneTuple = super.OneTuple.override {
# OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9
OneTuple = addBuildDepends [
self.foldable1-classes-compat
] (super.OneTuple.override {
ghc-prim = self.hashable;
};
hashable = addBuildDepend self.base-orphans super.hashable;
});
# Doesn't build with 9.0, see https://github.com/yi-editor/yi/issues/1125
yi-core = doDistribute (markUnbroken super.yi-core);
@ -180,4 +208,7 @@ self: super: {
# Needs OneTuple for ghc < 9.2
binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans;
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
}

View file

@ -45,10 +45,13 @@ self: super: {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work
Cabal-syntax = self.Cabal-syntax_3_6_0_0;
# Needs Cabal 3.0.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_3_2_1_0; };
jailbreak-cabal = super.jailbreak-cabal.overrideScope (cself: _: { Cabal = cself.Cabal_3_2_1_0; });
# https://github.com/tibbe/unordered-containers/issues/214
unordered-containers = dontCheck super.unordered-containers;
@ -66,7 +69,6 @@ self: super: {
unicode-transforms = dontCheck super.unicode-transforms;
wl-pprint-extras = doJailbreak super.wl-pprint-extras; # containers >=0.4 && <0.6 is too tight; https://github.com/ekmett/wl-pprint-extras/issues/17
RSA = dontCheck super.RSA; # https://github.com/GaloisInc/RSA/issues/14
monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
github = dontCheck super.github; # hspec upper bound exceeded; https://github.com/phadej/github/pull/341
binary-orphans = dontCheck super.binary-orphans; # tasty upper bound exceeded; https://github.com/phadej/binary-orphans/commit/8ce857226595dd520236ff4c51fa1a45d8387b33
rebase = doJailbreak super.rebase; # time ==1.9.* is too low
@ -74,12 +76,6 @@ self: super: {
# https://github.com/jgm/skylighting/issues/55
skylighting-core = dontCheck super.skylighting-core;
# Break out of "yaml >=0.10.4.0 && <0.11": https://github.com/commercialhaskell/stack/issues/4485
stack = doJailbreak super.stack;
# Newer versions don't compile.
resolv = self.resolv_0_1_1_2;
# cabal2nix needs the latest version of Cabal, and the one
# hackage-db uses must match, so take the latest
cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; });

View file

@ -45,7 +45,13 @@ self: super: {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# These core package only exist for GHC >= 9.4. The best we can do is feign
# their existence to callPackages, but their is no shim for lower GHC versions.
system-cxx-std-lib = null;
# Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work
Cabal-syntax = self.Cabal-syntax_3_6_0_0;
# GHC 8.8.x can build haddock version 2.23.*
haddock = self.haddock_2_23_1;
@ -57,6 +63,13 @@ self: super: {
# Additionally depends on OneTuple for GHC < 9.0
base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries;
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
hashable = addBuildDepends [
self.data-array-byte
self.base-orphans
] super.hashable;
# Ignore overly restrictive upper version bounds.
aeson-diff = doJailbreak super.aeson-diff;
async = doJailbreak super.async;
@ -64,7 +77,6 @@ self: super: {
chell = doJailbreak super.chell;
Diff = dontCheck super.Diff;
doctest = doJailbreak super.doctest;
hashable = addBuildDepend self.base-orphans super.hashable;
hashable-time = doJailbreak super.hashable-time;
hledger-lib = doJailbreak super.hledger-lib; # base >=4.8 && <4.13, easytest >=0.2.1 && <0.3
integer-logarithms = doJailbreak super.integer-logarithms;
@ -136,10 +148,12 @@ self: super: {
# has a restrictive lower bound on Cabal
fourmolu = doJailbreak super.fourmolu;
# OneTuple needs hashable instead of ghc-prim for GHC < 9
OneTuple = super.OneTuple.override {
# OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9
OneTuple = addBuildDepends [
self.foldable1-classes-compat
] (super.OneTuple.override {
ghc-prim = self.hashable;
};
});
# Temporarily disabled blaze-textual for GHC >= 9.0 causing hackage2nix ignoring it
# https://github.com/paul-rouse/mysql-simple/blob/872604f87044ff6d1a240d9819a16c2bdf4ed8f5/Database/MySQL/Internal/Blaze.hs#L4-L10
@ -166,4 +180,7 @@ self: super: {
# Later versions only support GHC >= 9.2
ghc-exactprint = self.ghc-exactprint_0_6_4;
apply-refact = self.apply-refact_0_9_3_0;
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
}

View file

@ -47,45 +47,34 @@ self: super: {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work
Cabal-syntax = self.Cabal-syntax_3_6_0_0;
# These core package only exist for GHC >= 9.4. The best we can do is feign
# their existence to callPackages, but their is no shim for lower GHC versions.
system-cxx-std-lib = null;
# Jailbreaks & Version Updates
# This `doJailbreak` can be removed once the following PR is released to Hackage:
# https://github.com/thsutton/aeson-diff/pull/58
aeson-diff = doJailbreak super.aeson-diff;
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
hashable = addBuildDepends [
self.data-array-byte
self.base-orphans
] super.hashable;
async = doJailbreak super.async;
data-fix = doJailbreak super.data-fix;
dec = doJailbreak super.dec;
ed25519 = doJailbreak super.ed25519;
hackage-security = doJailbreak super.hackage-security;
hashable =
pkgs.lib.pipe
super.hashable
[ (overrideCabal (drv: { postPatch = "sed -i -e 's,integer-gmp .*<1.1,integer-gmp < 2,' hashable.cabal"; }))
doJailbreak
dontCheck
(addBuildDepend self.base-orphans)
];
hashable-time = doJailbreak super.hashable-time;
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's,integer-gmp <1.1,integer-gmp < 2,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
lukko = doJailbreak super.lukko;
parallel = doJailbreak super.parallel;
primitive = doJailbreak (dontCheck super.primitive);
regex-posix = doJailbreak super.regex-posix;
resolv = doJailbreak super.resolv;
singleton-bool = doJailbreak super.singleton-bool;
split = doJailbreak super.split;
tar = doJailbreak super.tar;
time-compat = doJailbreak super.time-compat;
tuple = addBuildDepend self.base-orphans super.tuple;
vector-binary-instances = doJailbreak super.vector-binary-instances;
vector-th-unbox = doJailbreak super.vector-th-unbox;
zlib = doJailbreak super.zlib;
# 2021-11-08: Fixed in autoapply-0.4.2
autoapply = doJailbreak super.autoapply;
ormolu = self.ormolu_0_5_2_0.override {
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
};
fourmolu = self.fourmolu_0_10_1_0.override {
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
};
doctest = dontCheck super.doctest;
# Apply patches from head.hackage.
@ -106,6 +95,7 @@ self: super: {
# Needed for modern ormolu and fourmolu.
# Apply this here and not in common, because other ghc versions offer different Cabal versions.
Cabal = lself.Cabal_3_6_3_0;
hls-overloaded-record-dot-plugin = null;
}));
# Needs to use ghc-lib due to incompatible GHC
@ -123,16 +113,6 @@ self: super: {
parser-combinators prettyprinter refinery retrie syb unagi-chan unordered-containers
]) super.hls-tactics-plugin);
# The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x.
unordered-containers = dontCheck super.unordered-containers;
# The test suite seems pretty broken.
base64-bytestring = dontCheck super.base64-bytestring;
# GHC 9.0.x doesn't like `import Spec (main)` in Main.hs
# https://github.com/snoyberg/mono-traversable/issues/192
mono-traversable = dontCheck super.mono-traversable;
# Test suite sometimes segfaults with GHC 9.0.1 and 9.0.2
# https://github.com/ekmett/reflection/issues/51
# https://gitlab.haskell.org/ghc/ghc/-/issues/21141
@ -162,8 +142,14 @@ self: super: {
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;
# 2022-05-31: weeder 2.3.0 requires GHC 9.2
# 2022-05-31: weeder 2.4.* requires GHC 9.2
weeder = doDistribute self.weeder_2_3_1;
# Unnecessarily strict upper bound on lens
weeder_2_3_1 = doJailbreak (super.weeder_2_3_1.override {
# weeder < 2.6 only supports algebraic-graphs < 0.7
# We no longer have matching test deps for algebraic-graphs 0.6.1 in the set
algebraic-graphs = dontCheck self.algebraic-graphs_0_6_1;
});
# Restrictive upper bound on base and containers
sv2v = doJailbreak super.sv2v;
@ -181,4 +167,7 @@ self: super: {
# Needs OneTuple for ghc < 9.2
binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans;
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
}

View file

@ -47,10 +47,33 @@ self: super: {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# weeder == 2.5.* requires GHC 9.4
# Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work
Cabal-syntax = self.Cabal-syntax_3_6_0_0;
# These core package only exist for GHC >= 9.4. The best we can do is feign
# their existence to callPackages, but their is no shim for lower GHC versions.
system-cxx-std-lib = null;
# weeder >= 2.5 requires GHC 9.4
weeder = doDistribute self.weeder_2_4_1;
weeder_2_4_1 = super.weeder_2_4_1.override {
# weeder < 2.6 only supports algebraic-graphs < 0.7
# We no longer have matching test deps for algebraic-graphs 0.6.1 in the set
algebraic-graphs = dontCheck self.algebraic-graphs_0_6_1;
};
ormolu = self.ormolu_0_5_2_0.override {
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
};
fourmolu = self.fourmolu_0_10_1_0.override {
Cabal-syntax = self.Cabal-syntax_3_8_1_0;
};
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
# Jailbreaks & Version Updates
hashable-time = doJailbreak super.hashable-time;
@ -75,6 +98,9 @@ self: super: {
# For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515
hlint = enableCabalFlag "ghc-lib" super.hlint;
# 0.2.2.3 requires Cabal >= 3.8
shake-cabal = doDistribute self.shake-cabal_0_2_2_2;
# https://github.com/sjakobi/bsb-http-chunked/issues/38
bsb-http-chunked = dontCheck super.bsb-http-chunked;
@ -93,4 +119,10 @@ self: super: {
inline-c-cpp =
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;
# A given major version of ghc-exactprint only supports one version of GHC.
ghc-exactprint = super.ghc-exactprint_1_5_0;
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
}

View file

@ -53,81 +53,20 @@ in {
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
# Tests fail because of typechecking changes
conduit = dontCheck super.conduit;
# consequences of doctest breakage follow:
ghc-source-gen = checkAgainAfter super.ghc-source-gen "0.4.3.0" "fails to build" (markBroken super.ghc-source-gen);
haskell-src-meta = doJailbreak super.haskell-src-meta;
# Tests fail in GHC 9.2
extra = dontCheck super.extra;
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_3_0_0;
# Jailbreaks & Version Updates
aeson = doDistribute self.aeson_2_1_2_1;
assoc = doJailbreak super.assoc;
async = doJailbreak super.async;
base64-bytestring = doJailbreak super.base64-bytestring;
binary-instances = doJailbreak super.binary-instances;
ChasingBottoms = doJailbreak super.ChasingBottoms;
constraints = doJailbreak super.constraints;
cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
data-fix = doJailbreak super.data-fix;
dec = doJailbreak super.dec;
ed25519 = doJailbreak super.ed25519;
ghc-byteorder = doJailbreak super.ghc-byteorder;
ghc-lib = doDistribute self.ghc-lib_9_4_5_20230430;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_4_5_20230430;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_4_0_0;
hackage-security = doJailbreak super.hackage-security;
hashable-time = doJailbreak super.hashable-time;
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
lifted-async = doJailbreak super.lifted-async;
lukko = doJailbreak super.lukko;
lzma-conduit = doJailbreak super.lzma-conduit;
parallel = doJailbreak super.parallel;
path = doJailbreak super.path;
polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
primitive = dontCheck (doJailbreak self.primitive_0_7_4_0);
regex-posix = doJailbreak super.regex-posix;
resolv = doJailbreak super.resolv;
singleton-bool = doJailbreak super.singleton-bool;
rope-utf16-splay = doDistribute self.rope-utf16-splay_0_4_0_0;
shake-cabal = doDistribute self.shake-cabal_0_2_2_3;
libmpd = doJailbreak super.libmpd;
generics-sop = doJailbreak super.generics-sop;
microlens-th = doJailbreak super.microlens-th;
lens-family-th = doJailbreak super.lens-family-th; # template-haskell <2.19
# generically needs base-orphans for 9.4 only
base-orphans = dontCheck (doDistribute super.base-orphans);
generically = addBuildDepend self.base-orphans super.generically;
# the dontHaddock is due to a GHC panic. might be this bug, not sure.
# https://gitlab.haskell.org/ghc/ghc/-/issues/21619
#
# We need >= 1.1.2 for ghc-9.4 support, but we don't have 1.1.x in
# hackage-packages.nix
hedgehog = doDistribute (dontHaddock super.hedgehog_1_2);
# tasty-hedgehog > 1.3 necessary to work with hedgehog 1.2:
# https://github.com/qfpl/tasty-hedgehog/pull/63
tasty-hedgehog = self.tasty-hedgehog_1_4_0_1;
# https://github.com/dreixel/syb/issues/38
syb = dontCheck super.syb;
splitmix = doJailbreak super.splitmix;
th-desugar = doDistribute self.th-desugar_1_15;
th-abstraction = doDistribute self.th-abstraction_0_5_0_0;
time-compat = doJailbreak super.time-compat;
tomland = doJailbreak super.tomland;
type-equality = doJailbreak super.type-equality;
unordered-containers = doJailbreak super.unordered-containers;
vector-binary-instances = doJailbreak super.vector-binary-instances;
hedgehog = dontHaddock super.hedgehog;
hpack = overrideCabal (drv: {
# Cabal 3.6 seems to preserve comments when reading, which makes this test fail
@ -137,8 +76,6 @@ in {
] ++ drv.testFlags or [];
}) (doJailbreak super.hpack);
lens = doDistribute self.lens_5_2_2;
# Apply patches from head.hackage.
language-haskell-extract = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
@ -148,38 +85,22 @@ in {
# Tests depend on `parseTime` which is no longer available
hourglass = dontCheck super.hourglass;
memory = super.memory_0_18_0;
# https://github.com/sjakobi/bsb-http-chunked/issues/38
bsb-http-chunked = dontCheck super.bsb-http-chunked;
# need bytestring >= 0.11 which is only bundled with GHC >= 9.2
regex-rure = doDistribute (markUnbroken super.regex-rure);
jacinda = doDistribute super.jacinda;
some = doJailbreak super.some;
# 2022-08-01: Tests are broken on ghc 9.2.4: https://github.com/wz1000/HieDb/issues/46
hiedb = dontCheck super.hiedb;
hlint = self.hlint_3_5;
hls-hlint-plugin = super.hls-hlint-plugin.override {
inherit (self) hlint;
};
# 2022-10-06: https://gitlab.haskell.org/ghc/ghc/-/issues/22260
ghc-check = dontHaddock super.ghc-check;
ghc-exactprint = overrideCabal (drv: {
libraryHaskellDepends = with self; [ HUnit data-default fail filemanip free ghc-paths ordered-containers silently syb Diff ];
})
self.ghc-exactprint_1_6_1_3;
ghc-tags = self.ghc-tags_1_6;
# needed to build servant
http-api-data = super.http-api-data_0_5_1;
attoparsec-iso8601 = super.attoparsec-iso8601_1_1_0_0;
# Too strict upper bound on template-haskell
# https://github.com/mokus0/th-extras/issues/18
th-extras = doJailbreak super.th-extras;
# requires newer versions to work with GHC 9.4
swagger2 = dontCheck super.swagger2;
servant = doJailbreak super.servant;
servant-server = doJailbreak super.servant-server;
servant-auth = doJailbreak super.servant-auth;
@ -188,23 +109,9 @@ in {
servant-client-core = doJailbreak super.servant-client-core;
servant-client = doJailbreak super.servant-client;
# https://github.com/kowainik/relude/issues/436
relude = dontCheck (doJailbreak super.relude);
relude = dontCheck super.relude;
ormolu = doDistribute self.ormolu_0_5_3_0;
# https://github.com/tweag/ormolu/issues/941
fourmolu = overrideCabal (drv: {
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ];
}) (disableCabalFlag "fixity-th" super.fourmolu_0_10_1_0);
# Apply workaround for Cabal 3.8 bug https://github.com/haskell/cabal/issues/8455
# by making `pkg-config --static` happy. Note: Cabal 3.9 is also affected, so
# the GHC 9.6 configuration may need similar overrides eventually.
X11-xft = __CabalEagerPkgConfigWorkaround super.X11-xft;
# Jailbreaks for https://github.com/gtk2hs/gtk2hs/issues/323#issuecomment-1416723309
glib = __CabalEagerPkgConfigWorkaround (doJailbreak super.glib);
cairo = __CabalEagerPkgConfigWorkaround (doJailbreak super.cairo);
pango = __CabalEagerPkgConfigWorkaround (doJailbreak super.pango);
# Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
gtk = doJailbreak super.gtk;
}) (disableCabalFlag "fixity-th" super.fourmolu);
}

View file

@ -14,6 +14,9 @@ let
else
builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
# Workaround for a ghc-9.6 issue: https://gitlab.haskell.org/ghc/ghc/-/issues/23392
disableParallelBuilding = overrideCabal (drv: { enableParallelBuilding = false; });
in
self: super: {
@ -62,38 +65,24 @@ self: super: {
# Version deviations from Stackage LTS
#
doctest = doDistribute super.doctest_0_21_1;
inspection-testing = doDistribute self.inspection-testing_0_5_0_1; # allows base >= 4.18
OneTuple = doDistribute (dontCheck super.OneTuple_0_4_1_1); # allows base >= 4.18
primitive = doDistribute (dontCheck self.primitive_0_7_4_0); # allows base >= 4.18
http-api-data = doDistribute self.http-api-data_0_5_1; # allows base >= 4.18
attoparsec-iso8601 = doDistribute self.attoparsec-iso8601_1_1_0_0; # for http-api-data-0.5.1
tagged = doDistribute self.tagged_0_8_7; # allows template-haskell-2.20
doctest = doDistribute super.doctest_0_22_0;
http-api-data = doDistribute self.http-api-data_0_6; # allows base >= 4.18
some = doDistribute self.some_1_0_5;
tasty-inspection-testing = doDistribute self.tasty-inspection-testing_0_2;
th-abstraction = doDistribute self.th-abstraction_0_5_0_0;
th-desugar = doDistribute self.th-desugar_1_15;
turtle = doDistribute self.turtle_1_6_1;
aeson = doDistribute self.aeson_2_1_2_1;
memory = doDistribute self.memory_0_18_0;
semigroupoids = doDistribute self.semigroupoids_6_0_0_1;
bifunctors = doDistribute self.bifunctors_5_6_1;
cabal-plan = doDistribute self.cabal-plan_0_7_3_0;
base-compat = doDistribute self.base-compat_0_13_0;
base-compat-batteries = doDistribute self.base-compat-batteries_0_13_0;
semialign = doDistribute self.semialign_1_3;
assoc = doDistribute self.assoc_1_1;
strict = doDistribute self.strict_0_5;
# Too strict upper bound on template-haskell
# https://github.com/mokus0/th-extras/pull/21
th-extras = doJailbreak super.th-extras;
ghc-lib = doDistribute self.ghc-lib_9_6_2_20230523;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_2_20230523;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_6_0_0;
# allows mtl, template-haskell, text and transformers
hedgehog = doDistribute self.hedgehog_1_2;
# allows base >= 4.18
tasty-hedgehog = doDistribute self.tasty-hedgehog_1_4_0_1;
# v0.1.6 forbids base >= 4.18
singleton-bool = doDistribute super.singleton-bool_0_1_7;
@ -123,18 +112,6 @@ self: super: {
# Compilation failure workarounds
#
# Add missing Functor instance for Tuple2
# https://github.com/haskell-foundation/foundation/pull/572
foundation = appendPatches [
(pkgs.fetchpatch {
name = "foundation-pr-572.patch";
url =
"https://github.com/haskell-foundation/foundation/commit/d3136f4bb8b69e273535352620e53f2196941b35.patch";
sha256 = "sha256-oPadhQdCPJHICdCPxn+GsSQUARIYODG8Ed6g2sK+eC4=";
stripLen = 1;
})
] (super.foundation);
# Add support for time 1.10
# https://github.com/vincenthz/hs-hourglass/pull/56
hourglass = appendPatches [
@ -151,6 +128,40 @@ self: super: {
# https://github.com/dreixel/syb/issues/40
syb = dontCheck super.syb;
# Support for template-haskell >= 2.16
language-haskell-extract = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
}) (doJailbreak super.language-haskell-extract);
# Patch for support of mtl-2.3
monad-par = appendPatch
(pkgs.fetchpatch {
name = "monad-par-mtl-2.3.patch";
url = "https://github.com/simonmar/monad-par/pull/75/commits/ce53f6c1f8246224bfe0223f4aa3d077b7b6cc6c.patch";
sha256 = "1jxkl3b3lkjhk83f5q220nmjxbkmni0jswivdw4wfbzp571djrlx";
stripLen = 1;
})
(doJailbreak super.monad-par);
# Patch 0.17.1 for support of mtl-2.3
xmonad-contrib = appendPatch
(pkgs.fetchpatch {
name = "xmonad-contrib-mtl-2.3.patch";
url = "https://github.com/xmonad/xmonad-contrib/commit/8cb789af39e93edb07f1eee39c87908e0d7c5ee5.patch";
sha256 = "sha256-ehCvVy0N2Udii/0K79dsRSBP7/i84yMoeyupvO8WQz4=";
})
(doJailbreak super.xmonad-contrib);
# Patch 0.12.0.1 for support of unix-2.8.0.0
arbtt = appendPatch
(pkgs.fetchpatch {
name = "arbtt-unix-2.8.0.0.patch";
url = "https://github.com/nomeata/arbtt/pull/168/commits/ddaac94395ac50e3d3cd34c133dda4a8e5a3fd6c.patch";
sha256 = "sha256-5Gmz23f4M+NfgduA5O+9RaPmnneAB/lAlge8MrFpJYs=";
})
super.arbtt;
# 2023-04-03: plugins disabled for hls 1.10.0.0 based on
#
haskell-language-server =
@ -170,8 +181,25 @@ self: super: {
hls-stylish-haskell-plugin = null;
};
MonadRandom = super.MonadRandom_0_6;
unix-compat = super.unix-compat_0_7;
# Newer version of servant required for GHC 9.6
servant = self.servant_0_20;
servant-server = self.servant-server_0_20;
servant-client = self.servant-client_0_20;
servant-client-core = self.servant-client-core_0_20;
# Select versions compatible with servant_0_20
servant-docs = self.servant-docs_0_13;
servant-swagger = self.servant-swagger_1_2;
# Jailbreaks for servant <0.20
servant-lucid = doJailbreak super.servant-lucid;
# Jailbreak strict upper bounds: http-api-data <0.6
servant_0_20 = doJailbreak super.servant_0_20;
servant-server_0_20 = doJailbreak super.servant-server_0_20;
servant-client_0_20 = doJailbreak super.servant-client_0_20;
servant-client-core_0_20 = doJailbreak super.servant-client-core_0_20;
# Jailbreak strict upper bounds: doctest <0.22
servant-swagger_1_2 = doJailbreak super.servant-swagger_1_2;
lifted-base = dontCheck super.lifted-base;
hw-fingertree = dontCheck super.hw-fingertree;
hw-prim = dontCheck (doJailbreak super.hw-prim);
@ -180,10 +208,9 @@ self: super: {
rebase = doJailbreak super.rebase_1_20;
rerebase = doJailbreak super.rerebase_1_20;
hiedb = dontCheck super.hiedb;
retrie = dontCheck (super.retrie);
# break infinite recursion with foldable1-classes-compat's test suite, which depends on 'these'.
these = doDistribute (super.these_1_2.override { foldable1-classes-compat = dontCheck super.foldable1-classes-compat; });
retrie = dontCheck super.retrie;
# https://github.com/kowainik/relude/issues/436
relude = dontCheck (doJailbreak super.relude);
ghc-exactprint = unmarkBroken (addBuildDepends (with self.ghc-exactprint.scope; [
HUnit Diff data-default extra fail free ghc-paths ordered-containers silently syb
@ -203,18 +230,21 @@ self: super: {
implicit-hie-cradle
focus
hie-compat
xmonad-contrib # mtl >=1 && <2.3
dbus # template-haskell >=2.18 && <2.20, transformers <0.6, unix <2.8
gi-cairo-connector # mtl <2.3
haskintex # text <2
lens-family-th # template-haskell <2.19
ghc-prof # base <4.18
profiteur # vector <0.13
mfsolve # mtl <2.3
cubicbezier # mtl <2.3
dhall # template-haskell <2.20
env-guard # doctest <0.21
package-version # doctest <0.21, tasty-hedgehog <1.4
;
# Apply workaround for Cabal 3.8 bug https://github.com/haskell/cabal/issues/8455
# by making `pkg-config --static` happy. Note: Cabal 3.9 is also affected, so
# the GHC 9.6 configuration may need similar overrides eventually.
X11-xft = __CabalEagerPkgConfigWorkaround super.X11-xft;
# Jailbreaks for https://github.com/gtk2hs/gtk2hs/issues/323#issuecomment-1416723309
glib = __CabalEagerPkgConfigWorkaround (doJailbreak super.glib);
cairo = __CabalEagerPkgConfigWorkaround (doJailbreak super.cairo);
pango = __CabalEagerPkgConfigWorkaround (doJailbreak super.pango);
# Avoid triggering an issue in ghc-9.6.2
gi-gtk = disableParallelBuilding super.gi-gtk;
# Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
gtk = doJailbreak super.gtk;
@ -229,4 +259,17 @@ self: super: {
})
super.libmpd;
# Apply patch from PR with mtl-2.3 fix.
ConfigFile = overrideCabal (drv: {
editedCabalFile = null;
buildDepends = drv.buildDepends or [] ++ [ self.HUnit ];
patches = [(pkgs.fetchpatch {
name = "ConfigFile-pr-12.patch";
url = "https://github.com/jgoerzen/configfile/pull/12.patch";
sha256 = "sha256-b7u9GiIAd2xpOrM0MfILHNb6Nt7070lNRIadn2l3DfQ=";
})];
}) super.ConfigFile;
# The curl executable is required for withApplication tests.
warp_3_3_28 = addTestToolDepend pkgs.curl super.warp_3_3_28;
}

View file

@ -70,7 +70,6 @@ self: super: {
unicode-transforms = dontCheck super.unicode-transforms;
wl-pprint-extras = doJailbreak super.wl-pprint-extras; # containers >=0.4 && <0.6 is too tight; https://github.com/ekmett/wl-pprint-extras/issues/17
RSA = dontCheck super.RSA; # https://github.com/GaloisInc/RSA/issues/14
monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
github = dontCheck super.github; # hspec upper bound exceeded; https://github.com/phadej/github/pull/341
binary-orphans = dontCheck super.binary-orphans; # tasty upper bound exceeded; https://github.com/phadej/binary-orphans/commit/8ce857226595dd520236ff4c51fa1a45d8387b33

View file

@ -36,18 +36,6 @@ default-package-overrides:
# hnix < 0.17 (unreleased) needs hnix-store-* 0.5.*
- hnix-store-core == 0.5.0.0 # 2022-06-17: Until hnix 0.17
- hnix-store-remote == 0.5.0.0 # 2022-06-17: Until hnix 0.17
# reflex-dom-core 0.7.0.2 has no reflex 0.9 compatible release and most likely most people will want to use them together
- reflex < 0.9.0.0
# required by haskell-language-server 1.9.0.0
- implicit-hie < 0.1.3
# latest version requires Cabal >= 3.8
- shake-cabal < 0.2.2.3
# needed as long as we have pandoc < 3.0, i.e. stackage lts 20
- pandoc-crossref < 0.3.15.0
# Needs to match hspec which is tracked in stackage
- hspec-api < 2.10
# 2023-04-13: latest version requires ghc-events >= 0.19 but it's not on LTS yet
- eventlog2html < 0.10
# 2023-04-22: For dhall < 1.42 compatibility
- dhall-nixpkgs == 1.0.9
@ -58,14 +46,25 @@ default-package-overrides:
- lsp-types == 1.6.*
- lsp-test == 0.14.*
# 2023-07-06: ghcide-2.0.0.1 explicitly needs implicit-hie < 0.1.3, because some sort of
# breaking change was introduced in implicit-hie-0.1.3.0.
# https://github.com/haskell/haskell-language-server/blob/feb596592de95f09cf4ee885f3e74178161919f1/ghcide/ghcide.cabal#L107-L111
- implicit-hie < 0.1.3
# 2023-07-06: newer versions of stylish-haskell require
# ghc-lib-parser-ex >= 9.6, but LTS-21 contains ghc-lib-parser-ex-9.4
- stylish-haskell < 0.14.5.0
# Only an older version of dependent-sum-template is compatible with ghc 9.4
# https://github.com/obsidiansystems/dependent-sum-template/issues/5
- dependent-sum-template < 0.1.2
extra-packages:
- Cabal == 2.2.* # required for jailbreak-cabal etc.
- Cabal == 2.4.* # required for cabal-install etc.
- Cabal == 3.2.* # required for cabal2spec
- Cabal == 3.4.* # required for cabal-install etc.
- Cabal == 3.6.*
- Cabal-syntax == 3.8.* # required for cabal-install{,-parsers}
- Cabal == 3.8.* # required for cabal-install{,-parsers}
- Cabal-syntax == 3.6.* # Dummy package that ensures packages depending on Cabal-syntax can work for Cabal < 3.8
- Cabal == 3.2.* # Used for packages needing newer Cabal on ghc 8.6 and 8.8
- Cabal == 3.6.* # used for packages needing newer Cabal on ghc 8.10 and 9.0
- Cabal-syntax == 3.8.* # version required for ormolu and fourmolu on ghc 9.2 and 9.0
- Cabal-syntax == 3.10.* # newest version required for cabal-install and other packages
- cachix < 1.4 # 2023-04-02: cachix 1.4{,.1} have known on multi-user Nix systems
- directory == 1.3.7.* # required to build cabal-install 3.10.* with GHC 9.2
- Diff < 0.4 # required by liquidhaskell-0.8.10.2: https://github.com/ucsd-progsys/liquidhaskell/issues/1729
@ -86,10 +85,10 @@ extra-packages:
- dhall == 1.38.1 # required for spago
- doctest == 0.18.* # 2021-11-19: closest to stackage version for GHC 9.*
- foundation < 0.0.29 # 2022-08-30: last version to support GHC < 8.10
- fourmolu == 0.3.0.0 # 2022-09-21: needed for hls on ghc 8.8
- ghc-api-compat == 8.10.7 # 2022-02-17: preserve for GHC 8.10.7
- ghc-api-compat == 8.6 # 2021-09-07: preserve for GHC 8.8.4
- ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2
- ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2
- ghc-exactprint == 1.6.* # 2023-03-30: needed for GHC == 9.4
- ghc-lib == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 9.2
@ -105,11 +104,9 @@ extra-packages:
- haddock-api == 2.23.* # required on GHC < 8.10.x
- haddock-library ==1.7.* # required by stylish-cabal-0.5.0.0
- happy == 1.19.12 # for ghcjs
- hermes-json == 0.2.* # 2023-03-22: for nix-output-monitor-2.0.0.5
- hinotify == 0.3.9 # for xmonad-0.26: https://github.com/kolmodin/hinotify/issues/29
- hlint == 3.2.8 # 2022-09-21: needed for hls on ghc 8.8
- hlint == 3.4.1 # 2022-09-21: needed for hls with ghc-lib-parser 9.2
- hpack == 0.35.0 # 2022-09-29: Needed for stack-2.9.1
- hspec < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6
- hspec-core < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6
- hspec-discover < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6
@ -124,26 +121,28 @@ extra-packages:
- mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls
- network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15
- optparse-applicative < 0.16 # needed for niv-0.2.19
- ormolu == 0.1.4.1 # 2022-09-21: needed for hls on ghc 8.8
- ormolu == 0.2.* # 2022-02-21: For ghc 8.8 and 8.10
- ormolu == 0.5.* # 2022-04-12: For ghc 9.4
- ormolu == 0.5.0.1 # 2022-02-21: for hls on ghc 8.10
- ormolu == 0.5.2.0 # 2023-08-08: for hls on ghc 9.0 and 9.2
- fourmolu == 0.9.0.0 # 2022-09-21: for hls on ghc 8.10
- fourmolu == 0.10.1.0 # 2023-04-18: for hls on ghc 9.0 and 9.2
- mod == 0.1.2.2 # needed for hls on ghc 8.10
- pantry == 0.5.2.1 # needed for stack-2.7.3
- path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2
- relude == 0.7.0.0 # 2022-02-25: Needed for ema 0.6
- resolv == 0.1.1.2 # required to build cabal-install-3.0.0.0 with pre ghc-8.8.x
- resolv < 0.2 # required to build cabal-install-3.10.1.0 with Stackage LTS 21
- sbv == 7.13 # required for pkgs.petrinizer
- stylish-haskell == 0.13.0.0 # 2022-09-19: needed for hls on ghc 8.8
- stylish-haskell == 0.14.3.0 # 2022-09-19: needed for hls on ghc 8.8
- tasty-hspec == 1.1.6 # 2022-04-07: Needed for elm-format
- vty == 5.35.1 # 2022-07-08: needed for glirc-2.39.0.1
- weeder == 2.2.* # 2022-02-21: preserve for GHC 8.10.7
- weeder == 2.3.* # 2022-05-31: preserve for GHC 9.0.2
- weeder == 2.4.* # 2023-02-02: preserve for GHC 9.2.*
- commonmark-extensions < 0.2.3.3 # 2022-12-17: required by emanote 1.0.0.0 (to avoid a bug in 0.2.3.3)
- ShellCheck == 0.8.0 # 2022-12-28: required by haskell-ci 0.14.3
- retrie < 1.2.0.0 # 2022-12-30: required for hls on ghc < 9.2
- ghc-tags == 1.5.* # 2023-02-18: preserve for ghc-lib == 9.2.*
- primitive == 0.7.4.0 # 2023-03-04: primitive 0.8 is not compatible with too many packages on ghc 9.4 as of now
- fourmolu == 0.10.1.0 # 2023-04-18: for hls-fourmolu-plugin 1.1.1.0
- ghc-tags == 1.6.* # 2023-02-18: preserve for ghc-lib == 9.4.*
- shake-cabal < 0.2.2.3 # 2023-07-01: last version to support Cabal 3.6.*
- unix-compat < 0.7 # 2023-07-04: Need System.PosixCompat.User for git-annex
- algebraic-graphs < 0.7 # 2023-08-14: Needed for building weeder < 2.6.0
package-maintainers:
abbradar:
@ -164,8 +163,6 @@ package-maintainers:
- password
- password-instances
- pretty-simple
- purenix
- spago
- stack
- termonad
centromere:
@ -175,6 +172,8 @@ package-maintainers:
- ghc-vis
- patat
- svgcairo
danielrolls:
- shellify
domenkozar:
- cachix
- cachix-api
@ -352,8 +351,13 @@ package-maintainers:
- shakespeare
raehik:
- strongweak
- generic-data-functions
- binrep
- bytepatch
- heystone
- refined
- refined1
- flatparse
roberth:
- arion-compose
- cabal-pkg-config-version-hook
@ -425,6 +429,8 @@ package-maintainers:
- irc-client
- chatter
- envy
tbidne:
- rest-rewrite
terlar:
- nix-diff
turion:
@ -741,6 +747,7 @@ supported-platforms:
seqalign: [ platforms.x86 ] # x86 intrinsics
streamed: [ platforms.linux] # alsa-core only supported on linux
swisstable: [ platforms.x86_64 ] # Needs AVX2
systemd-api: [ platforms.linux ]
tasty-papi: [ platforms.linux ] # limited by pkgs.papi
udev: [ platforms.linux ]
Win32-console: [ platforms.windows ]

View file

@ -93,6 +93,13 @@ self: super: builtins.intersectAttrs super {
doCheck = false;
}) super.ghcide;
# Test suite needs executable
agda2lagda = overrideCabal (drv: {
preCheck = ''
export PATH="$PWD/dist/build/agda2lagda:$PATH"
'' + drv.preCheck or "";
}) super.agda2lagda;
hiedb = overrideCabal (drv: {
preCheck = ''
export PATH=$PWD/dist/build/hiedb:$PATH
@ -117,6 +124,7 @@ self: super: builtins.intersectAttrs super {
hls-floskell-plugin
hls-fourmolu-plugin
hls-cabal-plugin
hls-overloaded-record-dot-plugin
;
# PLUGINS WITH DISABLED TESTS
@ -293,6 +301,7 @@ self: super: builtins.intersectAttrs super {
niv = enableSeparateBinOutput (self.generateOptparseApplicativeCompletions [ "niv" ] super.niv);
ghcid = enableSeparateBinOutput super.ghcid;
ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu);
hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] super.hnix;
# Generate shell completion.
cabal2nix = self.generateOptparseApplicativeCompletions [ "cabal2nix" ] super.cabal2nix;
@ -322,24 +331,26 @@ self: super: builtins.intersectAttrs super {
gio = lib.pipe super.gio
[ (disableHardening ["fortify"])
(addBuildTool self.buildHaskellPackages.gtk2hs-buildtools)
(addPkgconfigDepends (with pkgs; [ glib pcre2 pcre ]
++ lib.optionals pkgs.stdenv.isLinux [ util-linux libselinux libsepol ]))
];
glib = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.glib));
gtk3 = disableHardening ["fortify"] (super.gtk3.override { inherit (pkgs) gtk3; });
gtk = lib.pipe super.gtk (
[ (disableHardening ["fortify"])
(addBuildTool self.buildHaskellPackages.gtk2hs-buildtools)
(addPkgconfigDepends (with pkgs; [ gtk2 pcre2 pcre fribidi
libthai libdatrie xorg.libXdmcp libdeflate
]
++ lib.optionals pkgs.stdenv.isLinux [ util-linux libselinux libsepol ]))
] ++
( if pkgs.stdenv.isDarwin then [(appendConfigureFlag "-fhave-quartz-gtk")] else [] )
);
gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2;
gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager;
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;
# Add necessary reference to gtk3 package
gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3;
@ -657,6 +668,9 @@ self: super: builtins.intersectAttrs super {
# Break infinite recursion cycle between QuickCheck and splitmix.
splitmix = dontCheck super.splitmix;
# Break infinite recursion cycle with OneTuple and quickcheck-instances.
foldable1-classes-compat = dontCheck super.foldable1-classes-compat;
# Break infinite recursion cycle between tasty and clock.
clock = dontCheck super.clock;
@ -1070,8 +1084,7 @@ self: super: builtins.intersectAttrs super {
'';
}) (lib.pipe
(super.cachix.override {
fsnotify = dontCheck super.fsnotify_0_4_1_0;
hnix-store-core = super.hnix-store-core_0_6_1_0;
hnix-store-core = self.hnix-store-core_0_6_1_0;
nix = self.hercules-ci-cnix-store.nixPackage;
})
[
@ -1083,9 +1096,15 @@ self: super: builtins.intersectAttrs super {
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; });
hercules-ci-cnix-store = (super.hercules-ci-cnix-store.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; }).overrideAttrs (_: {
passthru.nixPackage = pkgs.nixVersions.nix_2_14;
});
hercules-ci-cnix-store = overrideCabal
(old: {
passthru = old.passthru or { } // {
nixPackage = pkgs.nixVersions.nix_2_16;
};
})
(super.hercules-ci-cnix-store.override {
nix = self.hercules-ci-cnix-store.passthru.nixPackage;
});
# the testsuite fails because of not finding tsc without some help
aeson-typescript = overrideCabal (drv: {
@ -1296,8 +1315,18 @@ self: super: builtins.intersectAttrs super {
scalendar = dontCheck super.scalendar;
halide-haskell = super.halide-haskell.override { Halide = pkgs.halide; };
# Sydtest has a brittle test suite that will only work with the exact
# Sydtest has a brittle test suite that will only work with the exact
# versions that it ships with.
sydtest = dontCheck super.sydtest;
# Prevent argv limit being exceeded when invoking $CC.
inherit (lib.mapAttrs (_: overrideCabal {
__onlyPropagateKnownPkgConfigModules = true;
}) super)
gi-javascriptcore
webkit2gtk3-javascriptcore
gi-webkit2
gi-webkit2webextension
;
}

View file

@ -33,8 +33,7 @@ in
, doHaddockQuickjump ? doHoogle && lib.versionAtLeast ghc.version "8.6"
, doInstallIntermediates ? false
, editedCabalFile ? null
# aarch64 outputs otherwise exceed 2GB limit
, enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.hostPlatform.isAarch64 or false)
, enableLibraryProfiling ? !(ghc.isGhcjs or false)
, enableExecutableProfiling ? false
, profilingDetail ? "exported-functions"
# TODO enable shared libs for cross-compiling
@ -99,6 +98,22 @@ in
# build products from that prior build as a starting point for accelerating
# this build
, previousIntermediates ? null
, # Cabal 3.8 which is shipped by default for GHC >= 9.3 always calls
# `pkg-config --libs --static` as part of the configure step. This requires
# Requires.private dependencies of pkg-config dependencies to be present in
# PKG_CONFIG_PATH which is normally not the case in nixpkgs (except in pkgsStatic).
# Since there is no patch or upstream patch yet, we replicate the automatic
# propagation of dependencies in pkgsStatic for allPkgConfigDepends for
# GHC >= 9.3 by default. This option allows overriding this behavior manually
# if mismatching Cabal and GHC versions are used.
# See also <https://github.com/haskell/cabal/issues/8455>.
__propagatePkgConfigDepends ? lib.versionAtLeast ghc.version "9.3"
, # Propagation can easily lead to the argv limit being exceeded in linker or C
# compiler invocations. To work around this we can only propagate derivations
# that are known to provide pkg-config modules, as indicated by the presence
# of `meta.pkgConfigModules`. This option defaults to false for now, since
# this metadata is far from complete in nixpkgs.
__onlyPropagateKnownPkgConfigModules ? false
} @ args:
assert editedCabalFile != null -> revision != null;
@ -257,8 +272,47 @@ let
isHaskellPkg = x: x ? isHaskellLibrary;
allPkgconfigDepends = pkg-configDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
# Work around a Cabal bug requiring pkg-config --static --libs to work even
# when linking dynamically, affecting Cabal 3.8 and 3.9.
# https://github.com/haskell/cabal/issues/8455
#
# For this, we treat the runtime system/pkg-config dependencies of a Haskell
# derivation as if they were propagated from their dependencies which allows
# pkg-config --static to work in most cases.
allPkgconfigDepends =
let
# If __onlyPropagateKnownPkgConfigModules is set, packages without
# meta.pkgConfigModules will be filtered out, otherwise all packages in
# buildInputs and propagatePlainBuildInputs are propagated.
propagateValue = drv:
lib.isDerivation drv
&& (__onlyPropagateKnownPkgConfigModules -> drv ? meta.pkgConfigModules);
# Take list of derivations and return list of the transitive dependency
# closure, only taking into account buildInputs. Loosely based on
# closePropagationFast.
propagatePlainBuildInputs = drvs:
builtins.map (i: i.val) (
builtins.genericClosure {
startSet = builtins.map (drv:
{ key = drv.outPath; val = drv; }
) (builtins.filter propagateValue drvs);
operator = { val, ... }:
builtins.concatMap (drv:
if propagateValue drv
then [ { key = drv.outPath; val = drv; } ]
else [ ]
) (val.buildInputs or [ ] ++ val.propagatedBuildInputs or [ ]);
}
);
in
if __propagatePkgConfigDepends
then propagatePlainBuildInputs allPkgconfigDepends'
else allPkgconfigDepends';
allPkgconfigDepends' =
pkg-configDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
depsBuildBuild = [ nativeGhc ]
# CC_FOR_BUILD may be necessary if we have no C preprocessor for the host
@ -269,7 +323,7 @@ let
optionals doCheck testToolDepends ++
optionals doBenchmark benchmarkToolDepends;
nativeBuildInputs =
[ ghc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) pkg-config ++
[ ghc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) (assert pkg-config != null; pkg-config) ++
setupHaskellDepends ++ collectedToolDepends;
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends ++ libraryFrameworkDepends;
otherBuildInputsHaskell =
@ -318,8 +372,6 @@ let
intermediatesDir = "share/haskell/${ghc.version}/${pname}-${version}/dist";
in lib.fix (drv:
assert allPkgconfigDepends != [] -> pkg-config != null;
stdenv.mkDerivation ({
inherit pname version;

File diff suppressed because it is too large Load diff

View file

@ -1,32 +0,0 @@
diff --git a/hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Cachix.hs b/hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Cachix.hs
index 849d9bc..972bc90 100644
--- hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Cachix.hs
+++ hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Cachix.hs
@@ -17,6 +17,7 @@ import Hercules.Agent.Log
import Hercules.CNix.Store (StorePath)
import Hercules.Error
import qualified Hercules.Formats.CachixCache as CachixCache
+import qualified Data.Conduit as Conduit
import Protolude
push :: Text -> [StorePath] -> Int -> App ()
@@ -36,6 +37,9 @@ push cache paths workers = withNamedContext "cache" cache $ do
Cachix.Push.PushParams
{ pushParamsName = Agent.Cachix.pushCacheName pushCache,
pushParamsSecret = Agent.Cachix.pushCacheSecret pushCache,
+#if MIN_VERSION_cachix(1,6,0)
+ pushOnClosureAttempt = \_ missing -> return missing,
+#endif
pushParamsStore = nixStore,
pushParamsClientEnv = clientEnv,
pushParamsStrategy = \storePath ->
@@ -59,6 +63,9 @@ push cache paths workers = withNamedContext "cache" cache $ do
compressionLevel = 2,
#else
withXzipCompressor = Cachix.Push.defaultWithXzipCompressor,
+#endif
+#if MIN_VERSION_cachix(1,6,0)
+ onUncompressedNARStream = \_ _ -> Conduit.awaitForever Conduit.yield,
#endif
omitDeriver = False
}

View file

@ -0,0 +1,79 @@
From daae423d339e820e3fe8c720bd568cc49eae3fde Mon Sep 17 00:00:00 2001
From: Rodney Lorrimar <dev@rodney.id.au>
Date: Tue, 25 Jul 2023 16:46:36 +0800
Subject: [PATCH] GHC 9.4 compatibility
This is commit b89eed9 from haskell-nix/hnix master branch,
backported to 0.16.
The patch should be removed once hnix-0.17 is released.
---
src/Nix/Fresh.hs | 2 +-
src/Nix/Lint.hs | 2 +-
src/Nix/Utils.hs | 2 +-
src/Nix/Value.hs | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Nix/Fresh.hs b/src/Nix/Fresh.hs
index fdd20c4a..4b55de4e 100644
--- a/src/Nix/Fresh.hs
+++ b/src/Nix/Fresh.hs
@@ -14,7 +14,7 @@ import Control.Monad.Catch ( MonadCatch
, MonadMask
, MonadThrow
)
-import Control.Monad.Except ( MonadFix )
+import Control.Monad.Fix ( MonadFix )
import Control.Monad.Ref ( MonadAtomicRef(..)
, MonadRef(Ref)
)
diff --git a/src/Nix/Lint.hs b/src/Nix/Lint.hs
index 2c207c91..3da8c298 100644
--- a/src/Nix/Lint.hs
+++ b/src/Nix/Lint.hs
@@ -498,7 +498,7 @@ instance MonadThrow (Lint s) where
throwM e = Lint $ ReaderT $ const (throw e)
instance MonadCatch (Lint s) where
- catch _m _h = Lint $ ReaderT $ const (fail "Cannot catch in 'Lint s'")
+ catch _m _h = Lint $ ReaderT $ const (error "Cannot catch in 'Lint s'")
runLintM :: Options -> Lint s a -> ST s a
runLintM opts action =
diff --git a/src/Nix/Utils.hs b/src/Nix/Utils.hs
index 8f53b3a7..af370c21 100644
--- a/src/Nix/Utils.hs
+++ b/src/Nix/Utils.hs
@@ -67,6 +67,7 @@ import Relude hiding ( pass
import Data.Binary ( Binary )
import Data.Data ( Data )
import Codec.Serialise ( Serialise )
+import Control.Monad ( foldM )
import Control.Monad.Fix ( MonadFix(..) )
import Control.Monad.Free ( Free(..) )
import Control.Monad.Trans.Control ( MonadTransControl(..) )
@@ -84,7 +85,6 @@ import Lens.Family2.Stock ( _1
, _2
)
import qualified System.FilePath as FilePath
-import Control.Monad.List (foldM)
#if ENABLE_TRACING
import qualified Relude.Debug as X
diff --git a/src/Nix/Value.hs b/src/Nix/Value.hs
index aafdc25a..28b9508c 100644
--- a/src/Nix/Value.hs
+++ b/src/Nix/Value.hs
@@ -554,7 +554,7 @@ liftNValue
=> (forall x . u m x -> m x)
-> NValue t f m
-> NValue t f (u m)
-liftNValue = (`hoistNValue` lift)
+liftNValue f = hoistNValue f lift
-- *** MonadTransUnlift
--
2.40.1

View file

@ -34,5 +34,11 @@ stdenv.mkDerivation rec {
license = licenses.bsd3;
maintainers = with maintainers; [ ttuegel ];
platforms = platforms.all;
pkgConfigModules = [
"libpcre2-posix"
"libpcre2-8"
"libpcre2-16"
"libpcre2-32"
];
};
}

View file

@ -4,6 +4,10 @@
, extra, filepath, lib, mtl, parsec, shake, text, transformers
, unordered-containers, cryptohash-sha256, base16-bytestring
, userSettings ? null
# Whether to pass --hyperlinked-source to haddock or not. This is a custom
# workaround as we wait for this to be configurable via userSettings or similar.
# https://gitlab.haskell.org/ghc/ghc/-/issues/23625
, enableHyperlinkedSource ? true
, writeText
}:
@ -18,6 +22,9 @@ mkDerivation {
postUnpack = ''
sourceRoot="$sourceRoot/hadrian"
'';
patches = lib.optionals (!enableHyperlinkedSource) [
./disable-hyperlinked-source.patch
];
# Overwrite UserSettings.hs with a provided custom one
postPatch = lib.optionalString (userSettings != null) ''
install -m644 "${writeText "UserSettings.hs" userSettings}" src/UserSettings.hs

View file

@ -0,0 +1,12 @@
diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs
index 902b2f85e2..429a441c3b 100644
--- a/src/Settings/Builders/Haddock.hs
+++ b/src/Settings/Builders/Haddock.hs
@@ -57,7 +57,6 @@ haddockBuilderArgs = mconcat
, arg $ "--odir=" ++ takeDirectory output
, arg $ "--dump-interface=" ++ output
, arg "--html"
- , arg "--hyperlinked-source"
, arg "--hoogle"
, arg "--quickjump"
, arg $ "--title=" ++ pkgName pkg ++ "-" ++ version

View file

@ -1,6 +1,6 @@
{ lib
, stdenv
, supportedGhcVersions ? [ "92" ]
, supportedGhcVersions ? [ "94" ]
, dynamic ? true
, haskellPackages
, haskell

View file

@ -1,7 +1,8 @@
{ stdenv, lib, haskellPackages, fetchpatch, haskell, removeReferencesTo }:
{ stdenv, lib, haskellPackages, haskell, removeReferencesTo }:
let
static = haskell.lib.compose.justStaticExecutables haskellPackages.pandoc;
# Since pandoc 3.0 the pandoc binary resides in the pandoc-cli package.
static = haskell.lib.compose.justStaticExecutables haskellPackages.pandoc-cli;
in
(haskell.lib.compose.overrideCabal (drv: {

View file

@ -15,7 +15,6 @@ let
haskell.packages.ghc90.spago
[ haskell.lib.compose.justStaticExecutables
(haskell.lib.compose.overrideCabal (oldAttrs: {
maintainers = (oldAttrs.maintainers or []) ++ [ lib.maintainers.cdepillabout ];
changelog = "https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";
}))
haskell.lib.compose.unmarkBroken

View file

@ -6,4 +6,5 @@ lib.recurseIntoAttrs {
documentationTarball = callPackage ./documentationTarball { };
setBuildTarget = callPackage ./setBuildTarget { };
incremental = callPackage ./incremental { };
upstreamStackHpackVersion = callPackage ./upstreamStackHpackVersion { };
}

View file

@ -2,7 +2,11 @@
(haskellPackages.shellFor {
packages = p: [ p.constraints p.linear ];
extraDependencies = p: { libraryHaskellDepends = [ p.releaser ]; };
# WARNING: When updating this, make sure that the libraries passed to
# `extraDependencies` are not actually transitive dependencies of libraries in
# `packages` above. We explicitly want to test that it is possible to specify
# `extraDependencies` that are not in the closure of `packages`.
extraDependencies = p: { libraryHaskellDepends = [ p.conduit ]; };
nativeBuildInputs = [ cabal-install ];
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
unpackPhase = ''
@ -18,13 +22,19 @@
mkdir -p $HOME/.cabal
touch $HOME/.cabal/config
# Check extraDependencies.libraryHaskellDepends arg
# Check that the extraDependencies.libraryHaskellDepends arg is correctly
# picked up. This uses ghci to interpret a small Haskell program that uses
# a package from extraDependencies.
ghci <<EOF
:m + Releaser.Primitives
:m + System.IO
writeFile "done" "done"
:set -XOverloadedStrings
:m + Conduit
runResourceT $ connect (yield "done") (sinkFile "outfile")
EOF
[[ done == $(cat done) ]]
if [[ "done" != "$(cat outfile)" ]]; then
echo "ERROR: extraDependencies appear not to be available in the environment"
exit 1
fi
# Check packages arg
cabal v2-build --offline --verbose constraints linear --ghc-options="-O0 -j$NIX_BUILD_CORES"

View file

@ -0,0 +1,151 @@
# This derivation confirms that the version of hpack used by stack in Nixpkgs
# is the exact same version as the upstream stack release.
#
# It is important to make sure the version of hpack used by stack in Nixpkgs
# matches with the version of hpack used by the upstream stack release. This
# is because hpack works slightly differently based on the version, and it can
# be frustrating to use hpack in a team setting when members are using different
# versions. See for more info: https://github.com/NixOS/nixpkgs/issues/223390
#
# This test is written as a fixed-output derivation, because we need to access
# accesses the internet to download the upstream stack release.
{ cacert, curl, lib, stack, stdenv }:
let
# Find the hpack derivation that is a dependency of stack. Throw exception
# if hpack cannot be found.
hpack =
lib.findFirst
(v: v.pname or "" == "hpack")
(throw "could not find stack's hpack dependency")
stack.passthru.getCabalDeps.executableHaskellDepends;
# This is a statically linked version of stack, so it should be usable within
# the Nixpkgs builder (at least on x86_64-linux).
stackDownloadUrl =
"https://github.com/commercialhaskell/stack/releases/download/v${stack.version}/stack-${stack.version}-linux-x86_64-static.tar.gz";
# This test code has been explicitly pulled out of the derivation below so
# that it can be hashed and added to the `name` of the derivation. This is
# so that this test derivation won't be cached if the body of the test is
# modified.
#
# WARNING: When modifying this script, make sure you don't introduce any
# paths to the Nix store within it. We only want this derivation to be re-run
# when the stack version (or the version of its hpack dependency) changes in
# Nixpkgs.
testScript = ''
curl=(
curl
--location
--max-redirs 20
--retry 3
--disable-epsv
--cookie-jar cookies
--user-agent "curl "
--insecure
)
# Fetch the statically-linked upstream Stack binary.
"''${curl[@]}" "${stackDownloadUrl}" > ./stack.tar.gz
tar xf ./stack.tar.gz
upstream_stack_version_output="$(./stack-${stack.version}-linux-x86_64-static/stack --version)"
echo "upstream \`stack --version\` output: $upstream_stack_version_output"
nixpkgs_stack_version_output="$(stack --version)"
echo "nixpkgs \`stack --version\` output: $nixpkgs_stack_version_output"
# Confirm that the upstream stack version is the same as the stack version
# in Nixpkgs. This check isn't strictly necessary, but it is a good sanity
# check.
if [[ "$upstream_stack_version_output" =~ "Version "([0-9]+((\.[0-9]+)+)) ]]; then
upstream_stack_version="''${BASH_REMATCH[1]}"
echo "parsed upstream stack version: $upstream_stack_version"
echo "stack version from nixpkgs: ${stack.version}"
if [[ "${stack.version}" != "$upstream_stack_version" ]]; then
echo "ERROR: stack version in Nixpkgs (${stack.version}) does not match the upstream version for some reason: $upstream_stack_version"
exit 1
fi
else
echo "ERROR: Upstream stack version cannot be found in --version output: $upstream_stack_version"
exit 1
fi
# Confirm that the hpack version used in the upstream stack release is the
# same as the hpack version used by the Nixpkgs stack binary.
if [[ "$upstream_stack_version_output" =~ hpack-([0-9]+((\.[0-9]+)+)) ]]; then
upstream_hpack_version="''${BASH_REMATCH[1]}"
echo "parsed upstream stack's hpack version: $upstream_hpack_version"
echo "Nixpkgs stack's hpack version: ${hpack.version}"
if [[ "${hpack.version}" != "$upstream_hpack_version" ]]; then
echo "ERROR: stack's hpack version in Nixpkgs (${hpack.version}) does not match the upstream stack's hpack version: $upstream_hpack_version"
echo "The stack derivation in Nixpkgs needs to be fixed up so that it depends on hpack-$upstream_hpack_version, instead of ${hpack.name}"
exit 1
fi
else
echo "ERROR: Upstream stack's hpack version cannot be found in --version output: $upstream_hpack_version"
exit 1
fi
# Output a string with a known hash.
echo "success" > $out
'';
testScriptHash = builtins.hashString "sha256" testScript;
in
stdenv.mkDerivation {
# This name is very important.
#
# The idea here is that want this derivation to be re-run everytime the
# version of stack (or the version of its hpack dependency) changes in
# Nixpkgs. We also want to re-run this derivation whenever the test script
# is changed.
#
# Nix/Hydra will re-run derivations if their name changes (even if they are a
# FOD and they have the same hash).
#
# The name of this derivation contains the stack version string, the hpack
# version string, and a hash of the test script. So Nix will know to
# re-run this version when (and only when) one of those values change.
name = "upstream-stack-hpack-version-test-${stack.name}-${hpack.name}-${testScriptHash}";
# This is the sha256 hash for the string "success", which is output upon this
# test succeeding.
outputHash = "sha256-gbK9TqmMjbZlVPvI12N6GmmhMPMx/rcyt1yqtMSGj9U=";
outputHashMode = "flat";
outputHashAlgo = "sha256";
nativeBuildInputs = [ curl stack ];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
buildCommand = ''
# Make sure curl can access HTTPS sites, like GitHub.
#
# Note that we absolutely don't want the Nix store path of the cacert
# derivation in the testScript, because we don't want to rebuild this
# derivation when only the cacert derivation changes.
export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
'' + testScript;
meta = with lib; {
description = "Test that the stack in Nixpkgs uses the same version of Hpack as the upstream stack release";
maintainers = with maintainers; [ cdepillabout ];
# This derivation internally runs a statically-linked version of stack from
# upstream. This statically-linked version of stack is only available for
# x86_64-linux, so this test can only be run on x86_64-linux.
platforms = [ "x86_64-linux" ];
};
}

View file

@ -16048,8 +16048,8 @@ with pkgs;
then haskell.packages.native-bignum.ghc96
# Prefer native-bignum to avoid linking issues with gmp
else if stdenv.hostPlatform.isStatic
then haskell.packages.native-bignum.ghc92
else haskell.packages.ghc92);
then haskell.packages.native-bignum.ghc94
else haskell.packages.ghc94);
# haskellPackages.ghc is build->host (it exposes the compiler used to build the
# set, similarly to stdenv.cc), but pkgs.ghc should be host->target to be more
@ -16062,8 +16062,8 @@ with pkgs;
ghc = targetPackages.haskellPackages.ghc or
# Prefer native-bignum to avoid linking issues with gmp
(if stdenv.targetPlatform.isStatic
then haskell.compiler.native-bignum.ghc92
else haskell.compiler.ghc92);
then haskell.compiler.native-bignum.ghc94
else haskell.compiler.ghc94);
alex = haskell.lib.compose.justStaticExecutables haskellPackages.alex;
@ -17649,7 +17649,7 @@ with pkgs;
stdenv = clangStdenv;
};
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc92.jacinda;
jacinda = haskell.lib.compose.justStaticExecutables haskellPackages.jacinda;
janet = callPackage ../development/interpreters/janet { };

View file

@ -5,11 +5,8 @@ let
integerSimpleExcludes = [
"ghc865Binary"
"ghc8102Binary"
"ghc8102BinaryMinimal"
"ghc8107Binary"
"ghc8107BinaryMinimal"
"ghc924Binary"
"ghc924BinaryMinimal"
"ghcjs"
"ghcjs810"
"integer-simple"
@ -26,6 +23,7 @@ let
"ghc943"
"ghc944"
"ghc945"
"ghc946"
"ghc94"
"ghc96"
"ghc962"
@ -46,6 +44,7 @@ let
"ghc943"
"ghc944"
"ghc945"
"ghc946"
"ghc96"
"ghc962"
"ghcHEAD"
@ -89,36 +88,20 @@ in {
llvmPackages = pkgs.llvmPackages_9;
};
ghc8102BinaryMinimal = callPackage ../development/compilers/ghc/8.10.2-binary.nix {
llvmPackages = pkgs.llvmPackages_9;
minimal = true;
};
ghc8107Binary = callPackage ../development/compilers/ghc/8.10.7-binary.nix {
llvmPackages = pkgs.llvmPackages_12;
};
ghc8107BinaryMinimal = callPackage ../development/compilers/ghc/8.10.7-binary.nix {
llvmPackages = pkgs.llvmPackages_12;
minimal = true;
};
ghc924Binary = callPackage ../development/compilers/ghc/9.2.4-binary.nix {
llvmPackages = pkgs.llvmPackages_12;
};
ghc924BinaryMinimal = callPackage ../development/compilers/ghc/9.2.4-binary.nix {
llvmPackages = pkgs.llvmPackages_12;
minimal = true;
};
ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix {
bootPkgs =
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# 8.10.2 is needed as using 8.10.7 is broken due to RTS-incompatibilities
if stdenv.isAarch64 then
packages.ghc8102BinaryMinimal
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
else if stdenv.hostPlatform.isMusl then
if stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isMusl then
packages.ghc8102Binary
else
packages.ghc865Binary;
@ -129,12 +112,8 @@ in {
ghc88 = compiler.ghc884;
ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
bootPkgs =
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# the oldest ghc with aarch64-darwin support is 8.10.5
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
# to my (@a-m-joseph) knowledge there are no newer official binaries for this platform
packages.ghc865Binary
else
@ -150,11 +129,8 @@ in {
ghc810 = compiler.ghc8107;
ghc902 = callPackage ../development/compilers/ghc/9.0.2.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
# the oldest ghc with aarch64-darwin support is 8.10.5
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -166,10 +142,7 @@ in {
ghc90 = compiler.ghc902;
ghc924 = callPackage ../development/compilers/ghc/9.2.4.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -183,10 +156,7 @@ in {
};
ghc925 = callPackage ../development/compilers/ghc/9.2.5.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -200,10 +170,7 @@ in {
};
ghc926 = callPackage ../development/compilers/ghc/9.2.6.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -217,10 +184,7 @@ in {
};
ghc927 = callPackage ../development/compilers/ghc/9.2.7.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -234,10 +198,7 @@ in {
};
ghc928 = callPackage ../development/compilers/ghc/9.2.8.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
else
packages.ghc8107Binary;
@ -346,7 +307,31 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc94 = compiler.ghc945;
ghc946 = callPackage ../development/compilers/ghc/9.4.6.nix {
bootPkgs =
# Building with 9.2 is broken due to
# https://gitlab.haskell.org/ghc/ghc/-/issues/21914
# Use 8.10 as a workaround where possible to keep bootstrap path short.
# On ARM text won't build with GHC 8.10.*
if stdenv.hostPlatform.isAarch then
# TODO(@sternenseemann): package bindist
packages.ghc902
# No suitable bindists for powerpc64le
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc902
else
packages.ghc8107Binary;
inherit (buildPackages.python3Packages) sphinx;
# Need to use apple's patched xattr until
# https://github.com/xattr/xattr/issues/44 and
# https://github.com/xattr/xattr/issues/55 are solved.
inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
# Support range >= 10 && < 14
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc94 = compiler.ghc946;
ghc962 = callPackage ../development/compilers/ghc/9.6.2.nix {
bootPkgs =
# For GHC 9.2 no armv7l bindists are available.
@ -354,8 +339,6 @@ in {
packages.ghc924
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc924
else if stdenv.isAarch64 then
packages.ghc924BinaryMinimal
else
packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -375,8 +358,6 @@ in {
packages.ghc924
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc924
else if stdenv.isAarch64 then
packages.ghc924BinaryMinimal
else
packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -435,36 +416,18 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8102BinaryMinimal = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8102BinaryMinimal;
ghc = bh.compiler.ghc8102BinaryMinimal;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8107Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8107Binary;
ghc = bh.compiler.ghc8107Binary;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8107BinaryMinimal = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8107BinaryMinimal;
ghc = bh.compiler.ghc8107BinaryMinimal;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc924Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924Binary;
ghc = bh.compiler.ghc924Binary;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc924BinaryMinimal = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924BinaryMinimal;
ghc = bh.compiler.ghc924BinaryMinimal;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc884 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc884;
ghc = bh.compiler.ghc884;
@ -529,7 +492,12 @@ in {
ghc = bh.compiler.ghc945;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc94 = packages.ghc945;
ghc946 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc946;
ghc = bh.compiler.ghc946;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc94 = packages.ghc946;
ghc962 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc962;
ghc = bh.compiler.ghc962;

View file

@ -69,6 +69,7 @@ let
ghc927
ghc928
ghc945
ghc946
ghc962
];
@ -480,20 +481,11 @@ let
# package sets (like Cabal, jailbreak-cabal) are
# working as expected.
cabal-install = released;
Cabal_3_6_3_0 = released;
Cabal_3_8_1_0 = released;
Cabal-syntax_3_8_1_0 = released;
Cabal_3_10_1_0 = released;
Cabal-syntax_3_10_1_0 = released;
cabal2nix = lib.subtractLists [
compilerNames.ghc962
] released;
cabal2nix-unstable = lib.subtractLists [
compilerNames.ghc962
] released;
funcmp = lib.subtractLists [
compilerNames.ghc962
] released;
cabal2nix = released;
cabal2nix-unstable = released;
funcmp = released;
haskell-language-server = lib.subtractLists [
# Support ceased as of 1.9.0.0
compilerNames.ghc884
@ -504,14 +496,13 @@ let
hlint = lib.subtractLists [
compilerNames.ghc962
] released;
hpack = lib.subtractLists [
compilerNames.ghc962
] released;
hpack = released;
hsdns = released;
jailbreak-cabal = released;
language-nix = lib.subtractLists [
compilerNames.ghc962
] released;
language-nix = released;
large-hashable = [
compilerNames.ghc928
];
nix-paths = released;
titlecase = released;
ghc-api-compat = [
@ -526,6 +517,14 @@ let
ghc-lib = released;
ghc-lib-parser = released;
ghc-lib-parser-ex = released;
ghc-source-gen = [
# Feel free to remove these as they break,
# ghc-source-gen currently doesn't support GHC 9.4
compilerNames.ghc884
compilerNames.ghc8107
compilerNames.ghc902
compilerNames.ghc928
];
ghc-tags = [
compilerNames.ghc8107
compilerNames.ghc902
@ -535,7 +534,11 @@ let
compilerNames.ghc927
compilerNames.ghc928
compilerNames.ghc945
compilerNames.ghc946
compilerNames.ghc962
];
hashable = released;
primitive = released;
weeder = [
compilerNames.ghc8107
compilerNames.ghc902
@ -545,6 +548,8 @@ let
compilerNames.ghc927
compilerNames.ghc928
compilerNames.ghc945
compilerNames.ghc946
compilerNames.ghc962
];
})
{