Merge pull request #272097 from NixOS/haskell-updates

haskellPackages: update stackage and hackage
This commit is contained in:
maralorn 2024-01-02 02:28:37 +01:00 committed by GitHub
commit fa360eec20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1584 additions and 2922 deletions

View file

@ -54,8 +54,8 @@ if ! gh auth status 2>/dev/null ; then
fi
# Make sure this is configured before we start doing anything
push_remote="$(git config branch.haskell-updates.pushRemote \
|| die 'Can'\''t determine pushRemote for haskell-updates. Please set using `git config branch.haskell-updates.pushremote <remote name>`.')"
push_remote="$(git config branch.haskell-updates.pushRemote)" \
|| die 'Can'\''t determine pushRemote for haskell-updates. Please set using `git config branch.haskell-updates.pushremote <remote name>`.'
# Fetch nixpkgs to get an up-to-date origin/haskell-updates branch.
echo "Fetching origin..."

View file

@ -1,6 +1,6 @@
{
"commit": "def4ad933fb86415a9802d7833369d12520e7744",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/def4ad933fb86415a9802d7833369d12520e7744.tar.gz",
"sha256": "0nfqz1mwzgvkkk22igq5jxfwfcc0l8i1ihlgxaixf2ip1qqlqzs6",
"msg": "Update from Hackage at 2023-11-20T05:37:18Z"
"commit": "6a46f981138e6d012bfcced5f1d2b309b5452766",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/6a46f981138e6d012bfcced5f1d2b309b5452766.tar.gz",
"sha256": "1v297xyfv9nv1bji08gq8s6wrgmxjnhklvf6p0mvslyrj36w7mlj",
"msg": "Update from Hackage at 2023-12-04T17:35:08Z"
}

View file

@ -44,12 +44,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?

View file

@ -46,12 +46,9 @@
, # 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` pullls in among others:
# Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
(stdenv.targetPlatform == stdenv.hostPlatform)
&& !stdenv.hostPlatform.isMusl
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?

View file

@ -1,392 +0,0 @@
{ 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)
, # 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.2.4";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "15213888064a0ec4e7723d075f31b87a678ce0851773d58b44ef7aa3de996458";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
patches = [
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
name = "ghc-docs-sphinx-6.0.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
# 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=";
})
] ++ 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
'' + 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
'';
# 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

@ -46,12 +46,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -218,7 +215,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -46,12 +46,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -218,7 +215,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -46,12 +46,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -218,7 +215,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -46,12 +46,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -218,7 +215,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -1,398 +0,0 @@
# 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)
, # 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.2";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "7227ef3b5e15a0d70b8f1a43aec32867e2a9b2d857cc0ed556aeed172d4db3a5";
};
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=";
})
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
name = "ghc-docs-sphinx-6.0.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.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

@ -1,398 +0,0 @@
# 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)
, # 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.3";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "eaf63949536ede50ee39179f2299d5094eb9152d87cc6fb2175006bc98e8905a";
};
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=";
})
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
name = "ghc-docs-sphinx-6.0.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.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

@ -1,398 +0,0 @@
# 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)
, # 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.4";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "e8cef25a6ded1531cda7a90488d0cfb6d780657d16636daa59430be030cd67e2";
};
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=";
})
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
name = "ghc-docs-sphinx-6.0.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.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

@ -48,12 +48,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -215,7 +212,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -48,12 +48,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -211,7 +208,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -48,12 +48,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -207,7 +204,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -48,12 +48,9 @@
, # 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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, enableHaddockProgram ?
@ -207,7 +204,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-3.8-paths-fix-cycle-aarch64-darwin.patch
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = "patchShebangs .";

View file

@ -1,4 +0,0 @@
import ./common-hadrian.nix rec {
version = "9.6.2";
sha256 = "1b510c5f8753c3ba24851702c6c9da7d81dc5e47fe3ecb7af39c7c2613abf170";
}

View file

@ -162,13 +162,11 @@
}
, # Whether to build sphinx documentation.
# TODO(@sternenseemann): Hadrian ignores the --docs flag if finalStage = Stage1
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
# Docs disabled if we are building on musl because it's a large task to keep
# all `sphinx` dependencies building in this environment.
!stdenv.buildPlatform.isMusl
)
, # Whether to disable the large address space allocator
@ -271,7 +269,16 @@ stdenv.mkDerivation ({
(if lib.versionAtLeast version "9.8"
then ./docs-sphinx-7-ghc98.patch
else ./docs-sphinx-7.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-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];
postPatch = ''
patchShebangs --build .
'';

View file

@ -46,6 +46,9 @@ self: super: {
} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 {
# AARCH64-SPECIFIC OVERRIDES
# Corrupted store path https://github.com/NixOS/nixpkgs/pull/272097#issuecomment-1848414265
cachix = triggerRebuild 1 super.cachix;
# Doctests fail on aarch64 due to a GHCi linking bug
# https://gitlab.haskell.org/ghc/ghc/-/issues/15275#note_295437
# TODO: figure out if needed on aarch32 as well

View file

@ -328,7 +328,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 = "14x7avdvf0fjqncwxydlrv32lbyfiqrm346nvypzg27gq46fvkcg";
sha256 = "sha256-DFdfRh4ST4hZl9AOsp0/Y4N+bT2Y1NoLdwi5sxVnCaw=";
# 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
@ -477,15 +477,17 @@ self: super: {
matterhorn = doJailbreak super.matterhorn;
# 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
# 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));
hnix = dontCheck (super.hnix.override {
# 2023-12-11: Needs older core due to remote
hnix-store-core = self.hnix-store-core_0_6_1_0;
});
# Too strict bounds on algebraic-graphs and bytestring
# Too strict bounds on algebraic-graphs
# https://github.com/haskell-nix/hnix-store/issues/180
hnix-store-core = doJailbreak super.hnix-store-core;
hnix-store-core_0_6_1_0 = doJailbreak super.hnix-store-core_0_6_1_0;
# 2023-12-11: Needs older core
hnix-store-remote = super.hnix-store-remote.override { hnix-store-core = self.hnix-store-core_0_6_1_0; };
# Fails for non-obvious reasons while attempting to use doctest.
focuslist = dontCheck super.focuslist;
@ -883,6 +885,26 @@ self: super: {
# 2022-03-19: Testsuite is failing: https://github.com/puffnfresh/haskell-jwt/issues/2
jwt = dontCheck super.jwt;
# Build Selda with the latest git version.
# See https://github.com/valderman/selda/issues/187
inherit (let
mkSeldaPackage = name: overrideCabal (drv: {
version = "2023-02-05-unstable";
src = pkgs.fetchFromGitHub {
owner = "valderman";
repo = "selda";
rev = "ab9619db13b93867d1a244441bb4de03d3e1dadb";
hash = "sha256-P0nqAYzbeTyEEgzMij/3mKcs++/p/Wgc7Y6bDudXt2U=";
} + "/${name}";
}) super.${name};
in
lib.genAttrs [ "selda" "selda-sqlite" "selda-json" ] mkSeldaPackage
)
selda
selda-sqlite
selda-json
;
# Build the latest git version instead of the official release. This isn't
# ideal, but Chris doesn't seem to make official releases any more.
structured-haskell-mode = overrideCabal (drv: {
@ -1197,34 +1219,12 @@ self: super: {
# Generate cli completions for dhall.
dhall = self.generateOptparseApplicativeCompletions [ "dhall" ] super.dhall;
# For reasons that are not quire clear 'dhall-json' won't compile without 'tasty 1.4' due to its tests
# https://github.com/commercialhaskell/stackage/issues/5795
# This issue can be mitigated with 'dontCheck' which skips the tests and their compilation.
dhall-json = self.generateOptparseApplicativeCompletions ["dhall-to-json" "dhall-to-yaml"] (dontCheck super.dhall-json);
dhall-nix = self.generateOptparseApplicativeCompletions [ "dhall-to-nix" ]
(overrideCabal (drv: {
patches = [
# Compatibility with hnix 0.16, waiting for release
# https://github.com/dhall-lang/dhall-haskell/pull/2474
(pkgs.fetchpatch {
name = "dhall-nix-hnix-0.16.patch";
url = "https://github.com/dhall-lang/dhall-haskell/commit/49b9b3e3ce1718a89773c2b1bfa3c2af1a6e8752.patch";
sha256 = "12sh5md81nlhyzzkmf7jrll3w1rvg2j48m57hfyvjn8has9c4gw6";
stripLen = 1;
includes = [ "dhall-nix.cabal" "src/Dhall/Nix.hs" ];
})
] ++ drv.patches or [];
prePatch = drv.prePatch or "" + ''
${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
'';
}) super.dhall-nix);
dhall-json = self.generateOptparseApplicativeCompletions ["dhall-to-json" "dhall-to-yaml"] super.dhall-json;
# 2023-12-19: jailbreaks due to hnix-0.17 https://github.com/dhall-lang/dhall-haskell/pull/2559
# until dhall-nix 1.1.26+, dhall-nixpkgs 1.0.10+
dhall-nix = self.generateOptparseApplicativeCompletions [ "dhall-to-nix" ] (doJailbreak super.dhall-nix);
dhall-nixpkgs = self.generateOptparseApplicativeCompletions [ "dhall-to-nixpkgs" ] (doJailbreak super.dhall-nixpkgs);
dhall-yaml = self.generateOptparseApplicativeCompletions ["dhall-to-yaml-ng" "yaml-to-dhall"] super.dhall-yaml;
dhall-nixpkgs = self.generateOptparseApplicativeCompletions [ "dhall-to-nixpkgs" ]
(overrideCabal (drv: {
# Allow hnix 0.16, needs unreleased bounds change
# https://github.com/dhall-lang/dhall-haskell/pull/2474
jailbreak = assert drv.version == "1.0.9" && drv.revision == "1"; true;
}) super.dhall-nixpkgs);
crypton-connection = super.crypton-connection.override {
# requires tls >= 1.7
@ -1246,13 +1246,17 @@ self: super: {
http-client-tls = hprev.http-client-tls_0_3_6_3; # needs http-client-tls >= 0.3.6.2
http-download = dontCheck hprev.http-download_0_2_1_0; # needs http-download >= 0.2.1.0, tests access network
optparse-applicative = hprev.optparse-applicative_0_18_1_0; # needs optparse-applicative >= 0.18.1.0
pantry = dontCheck hprev.pantry_0_9_2; # needs pantry >= 0.9.2, tests access network
pantry = dontCheck hprev.pantry_0_9_3; # needs pantry >= 0.9.2, tests access network
syb = dontCheck hprev.syb; # cyclic dependencies
tar-conduit = hprev.tar-conduit_0_4_0; # pantry needs tar-conduit >= 0.4.0
temporary = dontCheck hprev.temporary; # cyclic dependencies
}))
];
hopenpgp-tools = super.hopenpgp-tools.override {
optparse-applicative = self.optparse-applicative_0_18_1_0;
};
# musl fixes
# dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time;
@ -1330,10 +1334,18 @@ self: super: {
# Fix for base >= 4.11
scat = overrideCabal (drv: {
patches = [(fetchpatch {
url = "https://github.com/redelmann/scat/pull/6.diff";
sha256 = "07nj2p0kg05livhgp1hkkdph0j0a6lb216f8x348qjasy0lzbfhl";
})];
patches = [
# Fix build with base >= 4.11
(fetchpatch {
url = "https://github.com/redelmann/scat/commit/429f22944b7634b8789cb3805292bcc2b23e3e9f.diff";
hash = "sha256-FLr1KfBaSYzI6MiZIBY1CkgAb5sThvvgjrSAN8EV0h4=";
})
# Fix build with vector >= 0.13
(fetchpatch {
url = "https://github.com/redelmann/scat/commit/e21cc9c17b5b605b5bc0aacad66d44bbe0beb8c4.diff";
hash = "sha256-MifHb2EKZx8skOcs+2t54CzxAS4PaEC0OTEfq4yVXzk=";
})
];
}) super.scat;
# Fix build with attr-2.4.48 (see #53716)
@ -1690,16 +1702,27 @@ self: super: {
# - Patch can be removed on next package set bump (for v0.2.11)
# 2023-06-26: Test failure: https://hydra.nixos.org/build/225081865
update-nix-fetchgit = dontCheck (let deps = [ pkgs.git pkgs.nix pkgs.nix-prefetch-git ];
in self.generateOptparseApplicativeCompletions [ "update-nix-fetchgit" ] (overrideCabal
(drv: {
buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
postInstall = drv.postInstall or "" + ''
wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${
lib.makeBinPath deps
}"
'';
}) (addTestToolDepends deps super.update-nix-fetchgit)));
update-nix-fetchgit = let
deps = [ pkgs.git pkgs.nix pkgs.nix-prefetch-git ];
in lib.pipe super.update-nix-fetchgit [
dontCheck
(self.generateOptparseApplicativeCompletions [ "update-nix-fetchgit" ])
(overrideCabal (drv: {
buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
postInstall = drv.postInstall or "" + ''
wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${
lib.makeBinPath deps
}"
'';
}))
(addTestToolDepends deps)
# Patch for hnix compat.
(appendPatch (fetchpatch {
url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/dfa34f9823e282aa8c5a1b8bc95ad8def0e8d455.patch";
sha256 = "sha256-yBjn1gVihVTlLewKgJc2I9gEj8ViNBAmw0bcsb5rh1A=";
excludes = [ "cabal.project" ];
}))
];
# Raise version bounds: https://github.com/idontgetoutmuch/binary-low-level/pull/16
binary-strict = appendPatches [
@ -1922,8 +1945,8 @@ self: super: {
http-client-tls = self.http-client-tls_0_3_6_3;
# pandoc depends on skylighting >= 0.14
skylighting = self.skylighting_0_14;
skylighting-core = self.skylighting-core_0_14;
skylighting = self.skylighting_0_14_1;
skylighting-core = self.skylighting-core_0_14_1;
};
in {
pandoc-cli = super.pandoc-cli.overrideScope pandoc-cli-overlay;
@ -2186,6 +2209,22 @@ self: super: {
gi-gtk-declarative = doJailbreak super.gi-gtk-declarative;
gi-gtk-declarative-app-simple = doJailbreak super.gi-gtk-declarative-app-simple;
# Missing dependency on gi-cairo
# https://github.com/haskell-gi/haskell-gi/pull/420
gi-vte =
overrideCabal
(oldAttrs: {
# This is implemented as a sed expression instead of pulling a patch
# from upstream because the gi-vte repo doesn't actually contain a
# gi-vte.cabal file. The gi-vte.cabal file is generated from metadata
# in the repo.
postPatch = (oldAttrs.postPatch or "") + ''
sed -i 's/\(gi-gtk == .*\),/\1, gi-cairo == 1.0.*,/' ./gi-vte.cabal
'';
buildDepends = (oldAttrs.buildDepends or []) ++ [self.gi-cairo];
})
super.gi-vte;
# 2023-04-09: haskell-ci needs Cabal-syntax 3.10
# 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: {
@ -2675,19 +2714,24 @@ self: super: {
co-log-polysemy = doJailbreak super.co-log-polysemy;
co-log-polysemy-formatting = doJailbreak super.co-log-polysemy-formatting;
# 2022-12-02: Needs newer postgrest package
# 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275
# 2022-12-02: Too strict bounds: https://github.com/PostgREST/postgrest/issues/2580
# 2022-12-02: Tests require running postresql server
postgrest = dontCheck (doJailbreak (overrideSrc rec {
version = "10.1.1";
src = pkgs.fetchFromGitHub {
owner = "PostgREST";
repo = "postgrest";
rev = "v${version}";
sha256 = "sha256-ceSPBH+lzGU1OwjolcaE1BCpkKCJrvMU5G8TPeaJesM=";
};
} super.postgrest));
# 2023-12-20: Needs newer hasql-pool package and extra dependencies
postgrest = lib.pipe (super.postgrest.overrideScope (lself: lsuper: {
hasql-pool = lself.hasql-pool_0_10;
})) [
(addBuildDepends [ self.extra self.fuzzyset_0_2_4 self.cache self.timeit ])
# 2022-12-02: Too strict bounds: https://github.com/PostgREST/postgrest/issues/2580
doJailbreak
# 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275
(overrideSrc rec {
version = "12.0.2";
src = pkgs.fetchFromGitHub {
owner = "PostgREST";
repo = "postgrest";
rev = "v${version}";
hash = "sha256-fpGeL8R6hziEtIgHUMfWLF7JAjo3FDYQw3xPSeQH+to=";
};
})
];
html-charset = dontCheck super.html-charset;
@ -2767,10 +2811,10 @@ self: super: {
# Both of these need specific versions of ghc-lib-parser, the minor releases
# seem to be tied.
ghc-syntax-highlighter_0_0_10_0 = super.ghc-syntax-highlighter_0_0_10_0.overrideScope(self: super: {
ghc-lib-parser = self.ghc-lib-parser_9_6_3_20231014;
ghc-lib-parser = self.ghc-lib-parser_9_6_3_20231121;
});
ghc-syntax-highlighter_0_0_11_0 = super.ghc-syntax-highlighter_0_0_11_0.overrideScope(self: super: {
ghc-lib-parser = self.ghc-lib-parser_9_8_1_20231009;
ghc-lib-parser = self.ghc-lib-parser_9_8_1_20231121;
});
# Needs a matching version of ipython-kernel and a
@ -2781,4 +2825,8 @@ self: super: {
ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_10_0;
});
# 2024-01-01: Too strict bounds on megaparsec
# Fixed in 0.2.8: https://github.com/PostgREST/configurator-pg/pull/20
configurator-pg = doJailbreak super.configurator-pg;
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View file

@ -39,14 +39,14 @@ self: super: {
stm = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
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_3_0_0;
xhtml = if self.ghc.hasHaddock or true then null else doDistribute 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;
@ -170,4 +170,7 @@ self: super: {
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
# No instance for (Show B.Builder) arising from a use of print
http-types = dontCheck super.http-types;
}

View file

@ -39,14 +39,14 @@ self: super: {
stm = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
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_3_0_0;
xhtml = if self.ghc.hasHaddock or true then null else doDistribute 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;

View file

@ -40,14 +40,14 @@ self: super: {
stm = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
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_3_0_0;
xhtml = if self.ghc.hasHaddock or true then null else doDistribute 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;
@ -173,4 +173,7 @@ self: super: {
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
hspec-megaparsec = super.hspec-megaparsec_2_2_0;
# No instance for (Show B.Builder) arising from a use of print
http-types = dontCheck super.http-types;
}

View file

@ -43,7 +43,7 @@ self: super: {
system-cxx-std-lib = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else haskellLib.doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;

View file

@ -40,14 +40,14 @@ self: super: {
stm = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
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_3_0_0;
xhtml = if self.ghc.hasHaddock or true then null else doDistribute 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;

View file

@ -46,14 +46,14 @@ in {
system-cxx-std-lib = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
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_3_0_0;
xhtml = if self.ghc.hasHaddock or true then null else doDistribute self.xhtml_3000_3_0_0;
# Jailbreaks & Version Updates
@ -115,7 +115,7 @@ in {
(
let
hls_overlay = lself: lsuper: {
ghc-lib-parser = lself.ghc-lib-parser_9_6_3_20231014;
ghc-lib-parser = lself.ghc-lib-parser_9_6_3_20231121;
ghc-lib-parser-ex = doDistribute lself.ghc-lib-parser-ex_9_6_0_2;
Cabal-syntax = lself.Cabal-syntax_3_10_2_0;
};

View file

@ -54,7 +54,7 @@ self: super: {
system-cxx-std-lib = null;
template-haskell = null;
# terminfo is not built if GHC is a cross compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;
@ -91,8 +91,8 @@ self: super: {
# https://github.com/mokus0/th-extras/pull/21
th-extras = doJailbreak super.th-extras;
ghc-lib = doDistribute self.ghc-lib_9_6_3_20231014;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_3_20231014;
ghc-lib = doDistribute self.ghc-lib_9_6_3_20231121;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_3_20231121;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_6_0_2;
# Tests fail due to the newly-build fourmolu not being in PATH
@ -265,9 +265,6 @@ self: super: {
})];
}) super.ConfigFile;
# The curl executable is required for withApplication tests.
warp_3_3_30 = addTestToolDepend pkgs.curl super.warp_3_3_30;
# The NCG backend for aarch64 generates invalid jumps in some situations,
# the workaround on 9.6 is to revert to the LLVM backend (which is used
# for these sorts of situations even on 9.2 and 9.4).

View file

@ -39,9 +39,10 @@ self: super: {
process = null;
rts = null;
stm = null;
system-cxx-std-lib = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_6;
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
text = null;
time = null;
transformers = null;

View file

@ -613,6 +613,7 @@ broken-packages:
- cacophony # failure in job https://hydra.nixos.org/build/233239380 at 2023-09-02
- cafeteria-prelude # failure in job https://hydra.nixos.org/build/233254881 at 2023-09-02
- cairo-core # failure in job https://hydra.nixos.org/build/233248151 at 2023-09-02
- cairo-image # failure in job https://hydra.nixos.org/build/243813080 at 2024-01-01
- cake3 # failure in job https://hydra.nixos.org/build/233231662 at 2023-09-02
- cal3d # failure in job https://hydra.nixos.org/build/233200357 at 2023-09-02
- calamity # failure in updateAutotoolsGnuConfigScriptsPhase in job https://hydra.nixos.org/build/238601583 at 2023-10-21
@ -829,10 +830,11 @@ broken-packages:
- commodities # failure in job https://hydra.nixos.org/build/233239851 at 2023-09-02
- Compactable # failure in job https://hydra.nixos.org/build/233227285 at 2023-09-02
- compactable # failure in job https://hydra.nixos.org/build/233228106 at 2023-09-02
- compact # failure in job https://hydra.nixos.org/build/233203421 at 2023-09-02
- compact-list # failure in job https://hydra.nixos.org/build/233241961 at 2023-09-02
- compact-map # failure in job https://hydra.nixos.org/build/233201665 at 2023-09-02
- compact-mutable-vector # failure in job https://hydra.nixos.org/build/245539335 at 2024-01-02
- compact-sequences # failure in job https://hydra.nixos.org/build/233208553 at 2023-09-02
- compact-socket # failure in job https://hydra.nixos.org/build/245539349 at 2024-01-02
- compact-string # failure in job https://hydra.nixos.org/build/233204162 at 2023-09-02
- compact-string-fix # failure in job https://hydra.nixos.org/build/233238513 at 2023-09-02
- comparse # failure in job https://hydra.nixos.org/build/233220012 at 2023-09-02
@ -847,6 +849,7 @@ broken-packages:
- composite-aeson-path # failure in job https://hydra.nixos.org/build/233203114 at 2023-09-02
- composite-aeson-refined # failure in job https://hydra.nixos.org/build/233241450 at 2023-09-02
- composite-cassava # failure in job https://hydra.nixos.org/build/233241110 at 2023-09-02
- composite-dhall # failure in job https://hydra.nixos.org/build/244399630 at 2024-01-01
- composite-ekg # failure in job https://hydra.nixos.org/build/233235858 at 2023-09-02
- composite-opaleye # failure in job https://hydra.nixos.org/build/233256318 at 2023-09-02
- composite-swagger # failure in job https://hydra.nixos.org/build/233258006 at 2023-09-02
@ -888,7 +891,6 @@ broken-packages:
- config-parser # failure in job https://hydra.nixos.org/build/233206136 at 2023-09-02
- Configurable # failure in job https://hydra.nixos.org/build/233200781 at 2023-09-02
- configuration # failure in job https://hydra.nixos.org/build/233195399 at 2023-09-02
- configurator-pg # failure in job https://hydra.nixos.org/build/233219556 at 2023-09-02
- config-value-getopt # failure in job https://hydra.nixos.org/build/233204566 at 2023-09-02
- confsolve # failure in job https://hydra.nixos.org/build/233194913 at 2023-09-02
- congruence-relation # failure in job https://hydra.nixos.org/build/233222125 at 2023-09-02
@ -945,6 +947,7 @@ broken-packages:
- CoreErlang # failure in job https://hydra.nixos.org/build/233199110 at 2023-09-02
- core # failure in job https://hydra.nixos.org/build/233253971 at 2023-09-02
- core-haskell # failure in job https://hydra.nixos.org/build/233222588 at 2023-09-02
- corenlp-types # failure in job https://hydra.nixos.org/build/243808366 at 2024-01-01
- core-warn # failure in job https://hydra.nixos.org/build/233204404 at 2023-09-02
- Coroutine # failure in job https://hydra.nixos.org/build/233211213 at 2023-09-02
- coroutine-object # failure in job https://hydra.nixos.org/build/233220413 at 2023-09-02
@ -1187,6 +1190,7 @@ broken-packages:
- dhall-fly # failure in job https://hydra.nixos.org/build/233220306 at 2023-09-02
- dhall-recursive-adt # failure in job https://hydra.nixos.org/build/233210665 at 2023-09-02
- dhall-text # failure in job https://hydra.nixos.org/build/233253809 at 2023-09-02
- dhall-text-shell # failure in job https://hydra.nixos.org/build/244399613 at 2024-01-01
- dhall-to-cabal # failure in job https://hydra.nixos.org/build/233193270 at 2023-09-02
- dhcp-lease-parser # failure in job https://hydra.nixos.org/build/233229124 at 2023-09-02
- dhrun # failure in job https://hydra.nixos.org/build/233227529 at 2023-09-02
@ -1746,7 +1750,6 @@ broken-packages:
- future # failure in job https://hydra.nixos.org/build/233224844 at 2023-09-02
- futures # failure in job https://hydra.nixos.org/build/233230206 at 2023-09-02
- fuzzyfind # failure in job https://hydra.nixos.org/build/233206269 at 2023-09-02
- fuzzyset # failure in job https://hydra.nixos.org/build/233231726 at 2023-09-02
- fuzzy-timings # failure in job https://hydra.nixos.org/build/233235765 at 2023-09-02
- fvars # failure in job https://hydra.nixos.org/build/234461649 at 2023-09-13
- fwgl # failure in job https://hydra.nixos.org/build/233246210 at 2023-09-02
@ -2496,7 +2499,6 @@ broken-packages:
- hopencc # failure in job https://hydra.nixos.org/build/233192954 at 2023-09-02
- hopencl # failure in job https://hydra.nixos.org/build/233249443 at 2023-09-02
- HOpenCV # failure in job https://hydra.nixos.org/build/233255422 at 2023-09-02
- hopenpgp-tools # failure in job https://hydra.nixos.org/build/233259304 at 2023-09-02
- hopfield # failure in job https://hydra.nixos.org/build/233598214 at 2023-09-02
- hoppy-generator # failure in job https://hydra.nixos.org/build/233240608 at 2023-09-02
- hops # failure in job https://hydra.nixos.org/build/233207172 at 2023-09-02
@ -2504,6 +2506,7 @@ broken-packages:
- ho-rewriting # failure in job https://hydra.nixos.org/build/233253726 at 2023-09-02
- horizon # failure in job https://hydra.nixos.org/build/233215473 at 2023-09-02
- horizon-gen-nix # failure in job https://hydra.nixos.org/build/233663130 at 2023-09-02
- horizon-spec # failure in job https://hydra.nixos.org/build/244399500 at 2024-01-01
- horizon-spec-lens # failure in job https://hydra.nixos.org/build/233221337 at 2023-09-02
- horizon-spec-pretty # failure in job https://hydra.nixos.org/build/233227612 at 2023-09-02
- horname # failure in job https://hydra.nixos.org/build/233198123 at 2023-09-02
@ -3207,6 +3210,7 @@ broken-packages:
- libpq # failure in job https://hydra.nixos.org/build/233192542 at 2023-09-02
- librandomorg # failure in job https://hydra.nixos.org/build/233232749 at 2023-09-02
- libsecp256k1 # failure in job https://hydra.nixos.org/build/234441559 at 2023-09-13
- libsodium # failure in job https://hydra.nixos.org/build/243816565 at 2024-01-01
- libsystemd-daemon # failure in job https://hydra.nixos.org/build/233207090 at 2023-09-02
- libtagc # failure in job https://hydra.nixos.org/build/233223631 at 2023-09-02
- libtelnet # failure in job https://hydra.nixos.org/build/233209594 at 2023-09-02
@ -3708,6 +3712,7 @@ broken-packages:
- nats-client # failure in job https://hydra.nixos.org/build/233241313 at 2023-09-02
- nat-sized-numbers # failure in job https://hydra.nixos.org/build/233244238 at 2023-09-02
- natural # failure in job https://hydra.nixos.org/build/233232490 at 2023-09-02
- NaturalLanguageAlphabets # failure in job https://hydra.nixos.org/build/245539294 at 2024-01-02
- NaturalSort # failure in job https://hydra.nixos.org/build/233213239 at 2023-09-02
- naver-translate # failure in job https://hydra.nixos.org/build/233225934 at 2023-09-02
- nbt # failure in job https://hydra.nixos.org/build/233253509 at 2023-09-02
@ -3815,6 +3820,7 @@ broken-packages:
- notzero # failure in job https://hydra.nixos.org/build/233216133 at 2023-09-02
- np-linear # failure in job https://hydra.nixos.org/build/233257696 at 2023-09-02
- nptools # failure in job https://hydra.nixos.org/build/233234905 at 2023-09-02
- nqe # failure in job https://hydra.nixos.org/build/243814217 at 2024-01-01
- ntp-control # failure in job https://hydra.nixos.org/build/233231061 at 2023-09-02
- ntrip-client # failure in job https://hydra.nixos.org/build/233230605 at 2023-09-02
- n-tuple # failure in job https://hydra.nixos.org/build/233225021 at 2023-09-02
@ -3867,6 +3873,7 @@ broken-packages:
- om-http-logging # failure in job https://hydra.nixos.org/build/233218069 at 2023-09-02
- om-logging # failure in job https://hydra.nixos.org/build/233222909 at 2023-09-02
- omnifmt # failure in job https://hydra.nixos.org/build/233219763 at 2023-09-02
- om-plugin-imports # failure in job https://hydra.nixos.org/build/243826382 at 2024-01-01
- om-socket # failure in job https://hydra.nixos.org/build/233235423 at 2023-09-02
- on-a-horse # failure in job https://hydra.nixos.org/build/233199193 at 2023-09-02
- onama # failure in job https://hydra.nixos.org/build/233241430 at 2023-09-02
@ -3886,6 +3893,7 @@ broken-packages:
- openapi3 # failure in job https://hydra.nixos.org/build/233208815 at 2023-09-02
- openapi-petstore # failure in job https://hydra.nixos.org/build/233221722 at 2023-09-02
- openapi-typed # failure in job https://hydra.nixos.org/build/233226830 at 2023-09-02
- opencascade-hs # failure in job https://hydra.nixos.org/build/243821447 at 2024-01-01
- opencc # failure in job https://hydra.nixos.org/build/233211902 at 2023-09-02
- opench-meteo # failure in job https://hydra.nixos.org/build/233212476 at 2023-09-02
- OpenCL # failure in job https://hydra.nixos.org/build/233216571 at 2023-09-02
@ -4529,7 +4537,7 @@ broken-packages:
- rangemin # failure in job https://hydra.nixos.org/build/233244031 at 2023-09-02
- rank1dynamic # failure in job https://hydra.nixos.org/build/233229881 at 2023-09-02
- rank-product # failure in job https://hydra.nixos.org/build/233239589 at 2023-09-02
- rapid # failure in job https://hydra.nixos.org/build/233223077 at 2023-09-02
- rapid # failure in job https://hydra.nixos.org/build/244061259 at 2024-01-01
- rapid-term # failure in job https://hydra.nixos.org/build/233251731 at 2023-09-02
- Rasenschach # failure in job https://hydra.nixos.org/build/234445901 at 2023-09-13
- rating-chgk-info # failure in job https://hydra.nixos.org/build/233598034 at 2023-09-02
@ -4792,7 +4800,6 @@ broken-packages:
- scale # failure in job https://hydra.nixos.org/build/233222189 at 2023-09-02
- scaleimage # failure in job https://hydra.nixos.org/build/233240688 at 2023-09-02
- scalendar # failure in job https://hydra.nixos.org/build/233206581 at 2023-09-02
- scat # failure in job https://hydra.nixos.org/build/233199202 at 2023-09-02
- scc # failure in job https://hydra.nixos.org/build/233247446 at 2023-09-02
- scgi # failure in job https://hydra.nixos.org/build/233247314 at 2023-09-02
- schedevr # failure in job https://hydra.nixos.org/build/233240124 at 2023-09-02
@ -4828,6 +4835,7 @@ broken-packages:
- sdl2-image # failure in job https://hydra.nixos.org/build/233216837 at 2023-09-02
- sdl2-mixer # failure in job https://hydra.nixos.org/build/233228951 at 2023-09-02
- sdp # failure in job https://hydra.nixos.org/build/233246702 at 2023-09-02
- sdr # failure in job https://hydra.nixos.org/build/243807383 at 2024-01-01
- seacat # failure in job https://hydra.nixos.org/build/233229959 at 2023-09-02
- seakale # failure in job https://hydra.nixos.org/build/233236200 at 2023-09-02
- secdh # failure in job https://hydra.nixos.org/build/233244391 at 2023-09-02
@ -4842,7 +4850,7 @@ broken-packages:
- secure-sockets # failure in job https://hydra.nixos.org/build/233254170 at 2023-09-02
- secureUDP # failure in job https://hydra.nixos.org/build/233215410 at 2023-09-02
- SegmentTree # failure in job https://hydra.nixos.org/build/233216161 at 2023-09-02
- selda # failure in job https://hydra.nixos.org/build/233234757 at 2023-09-02
- selda-postgresql # failure in job https://hydra.nixos.org/build/245539286 at 2024-01-02
- selectors # failure in job https://hydra.nixos.org/build/233227433 at 2023-09-02
- selenium # failure in job https://hydra.nixos.org/build/233214276 at 2023-09-02
- selinux # failure in job https://hydra.nixos.org/build/233192853 at 2023-09-02
@ -4914,6 +4922,7 @@ broken-packages:
- servant-streamly # failure in job https://hydra.nixos.org/build/233231404 at 2023-09-02
- servant-tracing # failure in job https://hydra.nixos.org/build/233229308 at 2023-09-02
- servant-wasm # failure in job https://hydra.nixos.org/build/233191644 at 2023-09-02
- servant-xml-conduit # failure in job https://hydra.nixos.org/build/243828707 at 2024-01-01
- servant-yaml # failure in job https://hydra.nixos.org/build/233260010 at 2023-09-02
- servant-zeppelin # failure in job https://hydra.nixos.org/build/233230172 at 2023-09-02
- server-generic # failure in job https://hydra.nixos.org/build/233194042 at 2023-09-02
@ -5434,6 +5443,7 @@ broken-packages:
- template-yj # failure in job https://hydra.nixos.org/build/233236245 at 2023-09-02
- templatise # failure in updateAutotoolsGnuConfigScriptsPhase in job https://hydra.nixos.org/build/237235933 at 2023-10-21
- tempodb # failure in job https://hydra.nixos.org/build/233205994 at 2023-09-02
- temporal-csound # failure in job https://hydra.nixos.org/build/243818090 at 2024-01-01
- tempus # failure in job https://hydra.nixos.org/build/233245670 at 2023-09-02
- ten # failure in job https://hydra.nixos.org/build/233216705 at 2023-09-02
- tensor # failure in job https://hydra.nixos.org/build/233233707 at 2023-09-02
@ -5788,6 +5798,7 @@ broken-packages:
- unused # failure in job https://hydra.nixos.org/build/233243602 at 2023-09-02
- uom-plugin # failure in job https://hydra.nixos.org/build/233228019 at 2023-09-02
- Updater # failure in job https://hydra.nixos.org/build/233215373 at 2023-09-02
- updo # failure in job https://hydra.nixos.org/build/244399557 at 2024-01-01
- uploadcare # failure in job https://hydra.nixos.org/build/233197403 at 2023-09-02
- upskirt # failure in job https://hydra.nixos.org/build/233226983 at 2023-09-02
- urbit-hob # failure in job https://hydra.nixos.org/build/233209231 at 2023-09-02
@ -5988,6 +5999,7 @@ broken-packages:
- web-routes-quasi # failure in job https://hydra.nixos.org/build/233222454 at 2023-09-02
- web-routes-transformers # failure in job https://hydra.nixos.org/build/233256428 at 2023-09-02
- webshow # failure in job https://hydra.nixos.org/build/233243842 at 2023-09-02
- web-view # failure in job https://hydra.nixos.org/build/244678837 at 2024-01-01
- webwire # failure in job https://hydra.nixos.org/build/233233892 at 2023-09-02
- WEditor # failure in job https://hydra.nixos.org/build/233215233 at 2023-09-02
- weighted-regexp # failure in job https://hydra.nixos.org/build/233243077 at 2023-09-02

View file

@ -33,13 +33,6 @@ default-package-overrides:
# Downgrade hasql-dynamic-statements until hasql 1.6 is in Stackage
- hasql-dynamic-statements < 0.3.1.2
- rope-utf16-splay < 0.4.0.0
# 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
# 2023-04-22: For dhall < 1.42 compatibility
- dhall-nixpkgs == 1.0.9
- dhall-nix == 1.1.25
# 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.
@ -69,7 +62,6 @@ extra-packages:
- 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
- aeson < 2 # required by pantry-0.5.2
@ -115,6 +107,7 @@ extra-packages:
- 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
- hnix-store-core < 0.7 # 2023-12-11: required by hnix-store-remote 0.6
- 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
@ -154,6 +147,7 @@ extra-packages:
- 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
- fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10
package-maintainers:
abbradar:

View file

@ -1,4 +1,4 @@
# Stackage LTS 21.21
# Stackage LTS 21.23
# This file is auto-generated by
# maintainers/scripts/haskell/update-stackage.sh
default-package-overrides:
@ -6,7 +6,7 @@ default-package-overrides:
- abstract-deque-tests ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
- acc ==0.2.0.2
- acc ==0.2.0.3
- ace ==0.6
- acid-state ==0.16.1.3
- action-permutations ==0.0.0.1
@ -24,7 +24,7 @@ default-package-overrides:
- aeson-combinators ==0.1.1.0
- aeson-diff ==1.1.0.13
- aeson-extra ==0.5.1.2
- aeson-generic-compat ==0.0.1.3
- aeson-generic-compat ==0.0.2.0
- aeson-iproute ==0.3.0
- aeson-optics ==1.2.1
- aeson-picker ==0.1.0.6
@ -95,7 +95,7 @@ default-package-overrides:
- assert-failure ==0.1.3.0
- assoc ==1.1
- astro ==0.4.3.0
- async ==2.2.4
- async ==2.2.5
- async-extra ==0.2.0.0
- async-refresh ==0.3.0.0
- async-refresh-tokens ==0.4.0.0
@ -117,7 +117,7 @@ default-package-overrides:
- audacity ==0.0.2.1
- authenticate ==1.3.5.2
- authenticate-oauth ==1.7
- autodocodec ==0.2.1.0
- autodocodec ==0.2.2.0
- autodocodec-openapi3 ==0.2.1.1
- autodocodec-schema ==0.1.0.3
- autodocodec-yaml ==0.2.0.3
@ -247,7 +247,7 @@ default-package-overrides:
- bugsnag-haskell ==0.0.4.4
- bugsnag-hs ==0.2.0.12
- bugsnag-wai ==1.0.0.1
- bugsnag-yesod ==1.0.0.1
- bugsnag-yesod ==1.0.1.0
- bugzilla-redhat ==1.0.1.1
- burrito ==2.0.1.7
- bv ==0.5
@ -279,7 +279,7 @@ default-package-overrides:
- cabal-doctest ==1.0.9
- cabal-file ==0.1.1
- cabal-install-solver ==3.8.1.0
- cabal-rpm ==2.1.4
- cabal-rpm ==2.1.5
- cache ==0.1.3.0
- cached-json-file ==0.1.1
- cacophony ==0.10.1
@ -350,7 +350,7 @@ default-package-overrides:
- cmark-gfm ==0.2.6
- cmdargs ==0.10.22
- codec-beam ==0.2.0
- code-conjure ==0.5.2
- code-conjure ==0.5.6
- code-page ==0.2.1
- coinor-clp ==0.0.0.1
- cointracking-imports ==0.1.0.2
@ -561,10 +561,6 @@ default-package-overrides:
- deriving-trans ==0.5.2.0
- detour-via-sci ==1.0.0
- df1 ==0.4.2
- dhall ==1.41.2
- dhall-bash ==1.0.40
- dhall-json ==1.7.11
- dhall-yaml ==1.2.12
- di ==1.3
- diagrams ==1.4.1
- diagrams-cairo ==1.4.2.1
@ -610,7 +606,7 @@ default-package-overrides:
- doctemplates ==0.11
- doctest ==0.20.1
- doctest-discover ==0.2.0.0
- doctest-driver-gen ==0.3.0.7
- doctest-driver-gen ==0.3.0.8
- doctest-exitcode-stdio ==0.0
- doctest-extract ==0.1.1.1
- doctest-lib ==0.1
@ -708,7 +704,7 @@ default-package-overrides:
- evm-opcodes ==0.1.2
- exact-combinatorics ==0.2.0.11
- exact-pi ==0.5.0.2
- exception-hierarchy ==0.1.0.8
- exception-hierarchy ==0.1.0.10
- exception-mtl ==0.4.0.2
- exception-transformers ==0.4.0.12
- executable-hash ==0.2.0.4
@ -718,7 +714,7 @@ default-package-overrides:
- exomizer ==1.0.0
- experimenter ==0.1.0.14
- expiring-cache-map ==0.0.6.1
- explainable-predicates ==0.1.2.3
- explainable-predicates ==0.1.2.4
- explicit-exception ==0.2
- exp-pairs ==0.2.1.0
- express ==1.0.12
@ -816,7 +812,7 @@ default-package-overrides:
- friday ==0.2.3.2
- friday-juicypixels ==0.1.2.4
- friendly-time ==0.4.1
- frisby ==0.2.4
- frisby ==0.2.5
- from-sum ==0.2.3.0
- frontmatter ==0.1.0.2
- fsnotify ==0.4.1.0
@ -1035,13 +1031,13 @@ default-package-overrides:
- hasql-transaction ==1.0.1.2
- has-transformers ==0.1.0.4
- hasty-hamiltonian ==1.3.4
- HaTeX ==3.22.4.0
- HaTeX ==3.22.4.1
- HaXml ==1.25.13
- haxr ==3000.11.5
- HCodecs ==0.5.2
- hdaemonize ==0.5.7
- HDBC ==2.4.0.4
- HDBC-session ==0.1.2.0
- HDBC-session ==0.1.2.1
- headed-megaparsec ==0.2.1.2
- heap ==1.0.4
- heaps ==0.4
@ -1214,7 +1210,7 @@ default-package-overrides:
- http-query ==0.1.3
- http-reverse-proxy ==0.6.0.1
- http-streams ==0.8.9.9
- http-types ==0.12.3
- http-types ==0.12.4
- human-readable-duration ==0.2.1.4
- HUnit ==1.6.2.0
- HUnit-approx ==1.1.1.1
@ -1293,7 +1289,7 @@ default-package-overrides:
- inline-c ==0.9.1.10
- inline-c-cpp ==0.5.0.2
- inline-r ==1.0.1
- input-parsers ==0.3.0.1
- input-parsers ==0.3.0.2
- insert-ordered-containers ==0.2.5.3
- inspection-testing ==0.5.0.2
- instance-control ==0.1.2.0
@ -1363,7 +1359,7 @@ default-package-overrides:
- jwt ==0.11.0
- kan-extensions ==5.2.5
- kansas-comet ==0.4.2
- katip ==0.8.7.4
- katip ==0.8.8.0
- katip-logstash ==0.1.0.2
- katip-wai ==0.1.2.2
- kazura-queue ==0.1.0.4
@ -1435,7 +1431,7 @@ default-package-overrides:
- LetsBeRational ==1.0.0.0
- leveldb-haskell ==0.6.5
- lexer-applicative ==2.1.0.2
- libBF ==0.6.6
- libBF ==0.6.7
- libffi ==0.2.1
- libgit ==0.3.1
- liboath-hs ==0.0.1.2
@ -1707,7 +1703,7 @@ default-package-overrides:
- nfc ==0.1.1
- nicify-lib ==1.0.1
- NineP ==0.0.2.1
- nix-derivation ==1.1.2
- nix-derivation ==1.1.3
- nix-paths ==1.0.1
- NoHoed ==0.1.1
- nonce ==1.0.7
@ -1756,7 +1752,7 @@ default-package-overrides:
- oops ==0.2.0.1
- opaleye ==0.9.7.0
- OpenAL ==1.7.0.5
- openapi3 ==3.2.3
- openapi3 ==3.2.4
- open-browser ==0.2.1.0
- openexr-write ==0.1.0.2
- OpenGL ==3.0.3.0
@ -2137,7 +2133,7 @@ default-package-overrides:
- rpmbuild-order ==0.4.10
- rpm-nvr ==0.1.2
- rp-tree ==0.7.1
- rrb-vector ==0.2.0.1
- rrb-vector ==0.2.1.0
- RSA ==2.4.1
- rss ==3000.2.0.7
- rss-conduit ==0.6.0.1
@ -2349,11 +2345,11 @@ default-package-overrides:
- Spock-lucid ==0.4.0.1
- Spock-worker ==0.3.1.0
- spoon ==0.3.1
- spreadsheet ==0.1.3.9
- spreadsheet ==0.1.3.10
- sqlcli ==0.2.2.0
- sqlcli-odbc ==0.2.0.1
- sqlite-simple ==0.4.18.2
- sql-words ==0.1.6.4
- sql-words ==0.1.6.5
- squeather ==0.8.0.0
- srcloc ==0.6.0.1
- srt ==0.1.2.0
@ -2573,7 +2569,7 @@ default-package-overrides:
- th-bang-compat ==0.0.1.0
- th-compat ==0.1.4
- th-constraint-compat ==0.0.1.0
- th-data-compat ==0.1.2.0
- th-data-compat ==0.1.3.0
- th-desugar ==1.14
- th-env ==0.1.1
- these ==1.2
@ -2633,7 +2629,7 @@ default-package-overrides:
- token-bucket ==0.1.0.1
- toml-reader ==0.2.1.0
- toml-reader-parse ==0.1.1.1
- tophat ==1.0.6.1
- tophat ==1.0.7.0
- topograph ==1.0.0.2
- torrent ==10000.1.3
- torsor ==0.1
@ -2928,7 +2924,7 @@ default-package-overrides:
- yesod-auth-oauth2 ==0.7.1.3
- yesod-auth-oidc ==0.1.4
- yesod-bin ==1.6.2.2
- yesod-core ==1.6.25.0
- yesod-core ==1.6.25.1
- yesod-eventsource ==1.6.0.1
- yesod-fb ==0.6.1
- yesod-form ==1.7.6

View file

@ -235,7 +235,6 @@ dont-distribute-packages:
- IORefCAS
- IndexedList
- InfixApplicative
- InternedData
- JSON-Combinator
- JSON-Combinator-Examples
- Javasf
@ -292,8 +291,8 @@ dont-distribute-packages:
- NGLess
- NTRU
- NXT
- NaCl
- NaperianNetCDF
- NaturalLanguageAlphabets
- NearContextAlgebra
- Ninjas
- NoSlow
@ -522,6 +521,7 @@ dont-distribute-packages:
- apiary-redis
- apiary-session
- apiary-websockets
- apigen
- apis
- apotiki
- approx-rand-test
@ -661,7 +661,6 @@ dont-distribute-packages:
- bip32
- birch-beer
- bird
- bisc
- biscuit-servant
- bishbosh
- bit-array
@ -912,8 +911,6 @@ dont-distribute-packages:
- comonad-random
- compaREST
- compact-mutable
- compact-mutable-vector
- compact-socket
- complexity
- comprehensions-ghc
- computational-algebra
@ -972,7 +969,7 @@ dont-distribute-packages:
- couch-simple
- couchdb-enumerator
- country
- country_0_2_4_0
- country_0_2_4_1
- cpkg
- cprng-aes-effect
- cql-io-tinylog
@ -998,6 +995,7 @@ dont-distribute-packages:
- crypto-classical
- crypto-conduit
- crypto-pubkey
- crypto-sodium
- cryptocipher
- cryptoids
- cryptoids-class
@ -1161,6 +1159,7 @@ dont-distribute-packages:
- dobutokO4
- doc-review
- doi
- dojang
- domaindriven
- dormouse-client
- dotparse
@ -1480,7 +1479,7 @@ dont-distribute-packages:
- ghc-dump-util
- ghc-imported-from
- ghc-instances
- ghc-lib_9_8_1_20231009
- ghc-lib_9_8_1_20231121
- ghc-mod
- ghc-plugs-out
- ghc-session
@ -1931,6 +1930,8 @@ dont-distribute-packages:
- hasklepias
- haskoin-bitcoind
- haskoin-crypto
- haskoin-node
- haskoin-node_1_0_1
- haskoin-protocol
- haskoin-script
- haskoon
@ -3113,7 +3114,6 @@ dont-distribute-packages:
- postgresql-tx-query
- postgresql-tx-squeal
- postgresql-tx-squeal-compat-simple
- postgrest
- postmark
- potoki
- potoki-cereal
@ -3453,7 +3453,7 @@ dont-distribute-packages:
- samtools-conduit
- samtools-enumerator
- samtools-iteratee
- sandwich_0_2_0_0
- sandwich_0_2_1_0
- sarsi
- sasha
- sasl
@ -3507,9 +3507,6 @@ dont-distribute-packages:
- secrm
- sednaDBXML
- seitz-symbol
- selda-json
- selda-postgresql
- selda-sqlite
- selenium-server
- semantic-source
- semantic-version
@ -3599,10 +3596,12 @@ dont-distribute-packages:
- silvi
- simgi
- simple-c-value
- simple-cairo
- simple-firewire
- simple-log-syslog
- simple-logging
- simple-nix
- simple-pango
- simple-pascal
- simple-postgresql-orm
- simpleirc-lens
@ -3840,7 +3839,6 @@ dont-distribute-packages:
- tagged-list
- tagged-th
- tagsoup-navigate
- tagstew
- tahoe-directory
- tahoe-great-black-swamp
- tahoe-ssk
@ -4140,6 +4138,8 @@ dont-distribute-packages:
- warp-grpc
- warp-quic
- warped
- waterfall-cad
- waterfall-cad-examples
- wavesurfer
- wavy
- weatherhs

View file

@ -394,7 +394,6 @@ self: super: builtins.intersectAttrs super {
socket = dontCheck super.socket;
stackage = dontCheck super.stackage; # http://hydra.cryp.to/build/501867/nixlog/1/raw
textocat-api = dontCheck super.textocat-api; # http://hydra.cryp.to/build/887011/log/raw
warp = dontCheck super.warp; # http://hydra.cryp.to/build/501073/nixlog/5/raw
wreq = dontCheck super.wreq; # http://hydra.cryp.to/build/501895/nixlog/1/raw
wreq-sb = dontCheck super.wreq-sb; # http://hydra.cryp.to/build/783948/log/raw
wuss = dontCheck super.wuss; # http://hydra.cryp.to/build/875964/nixlog/2/raw
@ -414,14 +413,27 @@ self: super: builtins.intersectAttrs super {
mustache = dontCheck super.mustache;
arch-web = dontCheck super.arch-web;
# The curl executable is required for withApplication tests.
warp = addTestToolDepend pkgs.curl super.warp;
# Test suite requires running a database server. Testing is done upstream.
hasql = dontCheck super.hasql;
hasql-dynamic-statements = dontCheck super.hasql-dynamic-statements;
hasql-interpolate = dontCheck super.hasql-interpolate;
hasql-notifications = dontCheck super.hasql-notifications;
hasql-pool = dontCheck super.hasql-pool;
hasql-pool_0_10 = dontCheck super.hasql-pool_0_10;
hasql-transaction = dontCheck super.hasql-transaction;
# Test suite requires a running postgresql server,
# avoid compiling twice by providing executable as a separate output (with small closure size),
# generate shell completion
postgrest = lib.pipe super.postgrest [
dontCheck
enableSeparateBinOutput
(self.generateOptparseApplicativeCompletions [ "postgrest" ])
];
# Tries to mess with extended POSIX attributes, but can't in our chroot environment.
xattr = dontCheck super.xattr;
@ -1090,7 +1102,6 @@ self: super: builtins.intersectAttrs super {
'';
}) (lib.pipe
(super.cachix.override {
hnix-store-core = self.hnix-store-core_0_7_0_0;
nix = self.hercules-ci-cnix-store.nixPackage;
})
[

File diff suppressed because it is too large Load diff

View file

@ -354,7 +354,12 @@ rec {
/* Add a dummy command to trigger a build despite an equivalent
earlier build that is present in the store or cache.
*/
triggerRebuild = i: overrideCabal (drv: { postUnpack = ": trigger rebuild ${toString i}"; });
triggerRebuild = i: overrideCabal (drv: {
postUnpack = drv.postUnpack or "" + ''
# trigger rebuild ${toString i}
'';
});
/* Override the sources for the package and optionally the version.
This also takes of removing editedCabalFile.

View file

@ -1,79 +0,0 @@
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

@ -2,13 +2,13 @@
mkDerivation rec {
pname = "1lab";
version = "unstable-2023-10-11";
version = "unstable-2023-12-04";
src = fetchFromGitHub {
owner = "plt-amy";
repo = pname;
rev = "c6e0c3c714486fd6c89ace31443428ba48871685";
hash = "sha256-PC75NtT0e99HVyFedox+6xz/CY2zP2g4Vzqruj5Bjhc=";
rev = "47c2a96220b4d14419e5ddb973bc1fa06933e723";
hash = "sha256-0U6s6sXdynk2IWRBDXBJCf7Gc+gE8AhR1PXZl0DS4yU=";
};
# We don't need anything in support; avoid installing LICENSE.agda
@ -16,7 +16,7 @@ mkDerivation rec {
rm -rf support
'';
libraryName = "cubical-1lab";
libraryName = "1lab";
libraryFile = "1lab.agda-lib";
everythingFile = "src/index.lagda.md";

View file

@ -1,14 +1,14 @@
{ lib, mkDerivation, fetchFromGitHub, standard-library }:
mkDerivation rec {
version = "0.1.7.2";
version = "0.2.0";
pname = "agda-categories";
src = fetchFromGitHub {
owner = "agda";
repo = "agda-categories";
rev = "v${version}";
sha256 = "sha256-lQzAfPqkdb0pG5seYVODPngSLrJxhbH1jf0K6qqoj3c=";
sha256 = "sha256-GQuQxzYSQxAIVSJ1vf0blRC0juoxAqD1AHW66H/6NSk=";
};
postPatch = ''
@ -26,6 +26,10 @@ mkDerivation rec {
find src -name '*.agda' | sed -e 's|^src/[/]*|import |' -e 's|/|.|g' -e 's/.agda//' -e '/import Everything/d' | LC_COLLATE='C' sort > Everything.agda
'';
# agda: Heap exhausted;
# agda: Current maximum heap size is 4294967296 bytes (4096 MB).
GHCRTS = "-M5G";
buildInputs = [ standard-library ];
meta = with lib; {

View file

@ -24,5 +24,6 @@ mkDerivation rec {
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ turion ];
broken = true;
};
}

View file

@ -1,7 +1,7 @@
{ fetchFromGitHub, lib, mkDerivation, standard-library }:
mkDerivation rec {
version = "0.4.1";
version = "0.5.0";
pname = "functional-linear-algebra";
buildInputs = [ standard-library ];
@ -10,7 +10,7 @@ mkDerivation rec {
repo = "functional-linear-algebra";
owner = "ryanorendorff";
rev = "v${version}";
sha256 = "GrTeMEHEXb0t2RgHWiGfvvofNYl8YYaaoCE18JrG6Q4=";
sha256 = "sha256-3nme/eH4pY6bD0DkhL4Dj/Vp/WnZqkQtZTNk+n1oAyY=";
};
preConfigure = ''

View file

@ -2,18 +2,18 @@
mkDerivation rec {
pname = "standard-library";
version = "1.7.3";
version = "2.0";
src = fetchFromGitHub {
repo = "agda-stdlib";
owner = "agda";
rev = "v${version}";
hash = "sha256-vtL6VPvTXhl/mepulUm8SYyTjnGsqno4RHDmTIy22Xg=";
hash = "sha256-TjGvY3eqpF+DDwatT7A78flyPcTkcLHQ1xcg+MKgCoE=";
};
nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
preConfigure = ''
runhaskell GenerateEverything.hs
runhaskell GenerateEverything.hs --include-deprecated
# We will only build/consider Everything.agda, in particular we don't want Everything*.agda
# do be copied to the store.
rm EverythingSafe.agda

View file

@ -3,13 +3,13 @@
# See: https://www.haskellforall.com/2022/12/nixpkgs-support-for-incremental-haskell.html
# See: https://felixspringer.xyz/homepage/blog/incrementalHaskellBuildsWithNix
{ haskell, lib }:
{ haskell, haskellPackages, lib }:
let
inherit (haskell.lib.compose) overrideCabal;
# Incremental builds work with GHC >=9.4.
temporary = haskell.packages.ghc944.temporary;
temporary = haskellPackages.temporary;
# This will do a full build of `temporary`, while writing the intermediate build products
# (compiled modules, etc.) to the `intermediates` output.

View file

@ -27128,6 +27128,8 @@ with pkgs;
postgresqlTestHook = callPackage ../build-support/setup-hooks/postgresql-test-hook { };
postgrest = haskellPackages.postgrest.bin;
redshift_jdbc = callPackage ../development/java-modules/redshift_jdbc { };
liquibase_redshift_extension = callPackage ../development/java-modules/liquibase_redshift_extension { };

View file

@ -13,21 +13,16 @@ let
"ghc90"
"ghc902"
"ghc92"
"ghc924"
"ghc925"
"ghc926"
"ghc927"
"ghc928"
"ghc94"
"ghc942"
"ghc943"
"ghc944"
"ghc945"
"ghc946"
"ghc947"
"ghc948"
"ghc96"
"ghc962"
"ghc963"
"ghc98"
"ghc981"
@ -111,20 +106,6 @@ in {
llvmPackages = pkgs.llvmPackages_12;
};
ghc90 = compiler.ghc902;
ghc924 = callPackage ../development/compilers/ghc/9.2.4.nix {
bootPkgs =
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc810
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;
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc925 = callPackage ../development/compilers/ghc/9.2.5.nix {
bootPkgs =
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
@ -182,78 +163,6 @@ in {
llvmPackages = pkgs.llvmPackages_12;
};
ghc92 = compiler.ghc928;
ghc942 = callPackage ../development/compilers/ghc/9.4.2.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;
};
ghc943 = callPackage ../development/compilers/ghc/9.4.3.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;
};
ghc944 = callPackage ../development/compilers/ghc/9.4.4.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;
};
ghc945 = callPackage ../development/compilers/ghc/9.4.5.nix {
bootPkgs =
# Building with 9.2 is broken due to
@ -351,31 +260,13 @@ in {
llvmPackages = pkgs.llvmPackages_12;
};
ghc94 = compiler.ghc948;
ghc962 = callPackage ../development/compilers/ghc/9.6.2.nix {
bootPkgs =
# For GHC 9.2 no armv7l bindists are available.
if stdenv.hostPlatform.isAarch32 then
packages.ghc924
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc924
else
packages.ghc924Binary;
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 >= 11 && < 16
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
llvmPackages = pkgs.llvmPackages_15;
};
ghc963 = callPackage ../development/compilers/ghc/9.6.3.nix {
bootPkgs =
# For GHC 9.2 no armv7l bindists are available.
if stdenv.hostPlatform.isAarch32 then
packages.ghc924
packages.ghc928
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc924
packages.ghc928
else
packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -483,11 +374,6 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
ghc90 = packages.ghc902;
ghc924 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924;
ghc = bh.compiler.ghc924;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc925 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc925;
ghc = bh.compiler.ghc925;
@ -509,21 +395,6 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc92 = packages.ghc928;
ghc942 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc942;
ghc = bh.compiler.ghc942;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc943 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc943;
ghc = bh.compiler.ghc943;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc944 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc944;
ghc = bh.compiler.ghc944;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc945 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc945;
ghc = bh.compiler.ghc945;
@ -545,11 +416,6 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc94 = packages.ghc948;
ghc962 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc962;
ghc = bh.compiler.ghc962;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
};
ghc963 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc963;
ghc = bh.compiler.ghc963;

View file

@ -62,7 +62,6 @@ let
released = with compilerNames; [
ghc8107
ghc902
ghc924
ghc925
ghc926
ghc927
@ -70,7 +69,7 @@ let
ghc945
ghc946
ghc947
ghc962
ghc948
ghc963
ghc981
];
@ -507,16 +506,12 @@ let
haskell-language-server = lib.subtractLists [
# Support ceased as of 2.3.0.0
compilerNames.ghc8107
# Not yet supported
compilerNames.ghc981
] released;
hoogle = lib.subtractLists [
compilerNames.ghc962
compilerNames.ghc963
compilerNames.ghc981
] released;
hlint = lib.subtractLists [
compilerNames.ghc962
compilerNames.ghc963
compilerNames.ghc981
] released;
@ -568,7 +563,6 @@ let
weeder = [
compilerNames.ghc8107
compilerNames.ghc902
compilerNames.ghc924
compilerNames.ghc925
compilerNames.ghc926
compilerNames.ghc927
@ -576,7 +570,7 @@ let
compilerNames.ghc945
compilerNames.ghc946
compilerNames.ghc947
compilerNames.ghc962
compilerNames.ghc948
compilerNames.ghc963
];
})
@ -653,7 +647,6 @@ let
jobs.pkgsMusl.haskell.compiler.ghc8107Binary
jobs.pkgsMusl.haskell.compiler.ghc8107
jobs.pkgsMusl.haskell.compiler.ghc902
jobs.pkgsMusl.haskell.compiler.ghc924
jobs.pkgsMusl.haskell.compiler.ghc925
jobs.pkgsMusl.haskell.compiler.ghc926
jobs.pkgsMusl.haskell.compiler.ghc927
@ -661,7 +654,6 @@ let
jobs.pkgsMusl.haskell.compiler.ghcHEAD
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc924
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc925
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc926
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc927