Merge pull request #232914 from NixOS/haskell-updates

haskellPackages: update stackage and hackage, ghc: 9.2.7 -> 9.2.8
This commit is contained in:
Dennis Gosnell 2023-05-30 12:53:37 +09:00 committed by GitHub
commit d746b4e460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 2207 additions and 1032 deletions

View File

@ -307,12 +307,12 @@ $ nix-env --install --attr haskellPackages.dhall-nixpkgs
$ nix-env --install --attr nix-prefetch-git # Used by dhall-to-nixpkgs
$ dhall-to-nixpkgs github https://github.com/Gabriel439/dhall-semver.git
$ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git
{ buildDhallGitHubPackage, Prelude }:
buildDhallGitHubPackage {
name = "dhall-semver";
githubBase = "github.com";
owner = "Gabriel439";
owner = "Gabriella439";
repo = "dhall-semver";
rev = "2d44ae605302ce5dc6c657a1216887fbb96392a4";
fetchSubmodules = false;

View File

@ -276,6 +276,15 @@ Defaults to `true`.
: Whether to generate an index for interactive navigation of the HTML documentation.
Defaults to `true` if supported.
`doInstallIntermediates`
: Whether to install intermediate build products (files written to `dist/build`
by GHC during the build process). With `enableSeparateIntermediatesOutput`,
these files are instead installed to [a separate `intermediates`
output.][multiple-outputs] The output can then be passed into a future build of
the same package with the `previousIntermediates` argument to support
incremental builds. See [“Incremental builds”](#haskell-incremental-builds) for
more information. Defaults to `false`.
`enableLibraryProfiling`
: Whether to enable [profiling][profiling] for libraries contained in the
package. Enabled by default if supported.
@ -371,6 +380,12 @@ Defaults to `false`.
: Whether to install documentation to a separate `doc` output.
Is automatically enabled if `doHaddock` is `true`.
`enableSeparateIntermediatesOutput`
: When `doInstallIntermediates` is true, whether to install intermediate build
products to a separate `intermediates` output. See [“Incremental
builds”](#haskell-incremental-builds) for more information. Defaults to
`false`.
`allowInconsistentDependencies`
: If enabled, allow multiple versions of the same Haskell package in the
dependency tree at configure time. Often in such a situation compilation would
@ -381,6 +396,11 @@ later fail because of type mismatches. Defaults to `false`.
when loading the library in the REPL, but requires extra build time and
disk space. Defaults to `false`.
`previousIntermediates`
: If non-null, intermediate build artifacts are copied from this input to
`dist/build` before performing compiling. See [“Incremental
builds”](#haskell-incremental-builds) for more information. Defaults to `null`.
`buildTarget`
: Name of the executable or library to build and install.
If unset, all available targets are built and installed.
@ -496,6 +516,54 @@ the [Meta-attributes section](#chap-meta) for their documentation.
* `broken`
* `hydraPlatforms`
### Incremental builds {#haskell-incremental-builds}
`haskellPackages.mkDerivation` supports incremental builds for GHC 9.4 and
newer with the `doInstallIntermediates`, `enableSeparateIntermediatesOutput`,
and `previousIntermediates` arguments.
The basic idea is to first perform a full build of the package in question,
save its intermediate build products for later, and then copy those build
products into the build directory of an incremental build performed later.
Then, GHC will use those build artifacts to avoid recompiling unchanged
modules.
For more detail on how to store and use incremental build products, see
[Gabriella Gonzalez blog post “Nixpkgs support for incremental Haskell
builds”.][incremental-builds] motivation behind this feature.
An incremental build for [the `turtle` package][turtle] can be performed like
so:
```nix
let
pkgs = import <nixpkgs> {};
inherit (pkgs) haskell;
inherit (haskell.lib.compose) overrideCabal;
# Incremental builds work with GHC >=9.4.
turtle = haskell.packages.ghc944.turtle;
# This will do a full build of `turtle`, while writing the intermediate build products
# (compiled modules, etc.) to the `intermediates` output.
turtle-full-build-with-incremental-output = overrideCabal (drv: {
doInstallIntermediates = true;
enableSeparateIntermediatesOutput = true;
}) turtle;
# This will do an incremental build of `turtle` by copying the previously
# compiled modules and intermediate build products into the source tree
# before running the build.
#
# GHC will then naturally pick up and reuse these products, making this build
# complete much more quickly than the previous one.
turtle-incremental-build = overrideCabal (drv: {
previousIntermediates = turtle-full-build-with-incremental-output.intermediates;
}) turtle;
in
turtle-incremental-build
```
## Development environments {#haskell-development-environments}
In addition to building and installing Haskell software, nixpkgs can also
@ -1083,8 +1151,11 @@ on the issue linked above.
[haskell.nix]: https://input-output-hk.github.io/haskell.nix/index.html
[HLS user guide]: https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-editor
[hoogle]: https://wiki.haskell.org/Hoogle
[incremental-builds]: https://www.haskellforall.com/2022/12/nixpkgs-support-for-incremental-haskell.html
[jailbreak-cabal]: https://github.com/NixOS/jailbreak-cabal/
[multiple-outputs]: https://nixos.org/manual/nixpkgs/stable/#chap-multiple-output
[optparse-applicative-completions]: https://github.com/pcapriotti/optparse-applicative/blob/7726b63796aa5d0df82e926d467f039b78ca09e2/README.md#bash-zsh-and-fish-completions
[profiling-detail]: https://cabal.readthedocs.io/en/latest/cabal-project.html#cfg-field-profiling-detail
[profiling]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html
[search.nixos.org]: https://search.nixos.org
[turtle]: https://hackage.haskell.org/package/turtle

View File

@ -5536,18 +5536,18 @@
githubId = 606000;
name = "Gabriel Adomnicai";
};
Gabriel439 = {
email = "Gabriel439@gmail.com";
github = "Gabriella439";
githubId = 1313787;
name = "Gabriel Gonzalez";
};
GabrielDougherty = {
email = "contact@gabrieldougherty.com";
github = "GabrielDougherty";
githubId = 10541219;
name = "Gabriel Dougherty";
};
Gabriella439 = {
email = "GenuineGabriella@gmail.com";
github = "Gabriella439";
githubId = 1313787;
name = "Gabriella Gonzalez";
};
gador = {
email = "florian.brandes@posteo.de";
github = "gador";

View File

@ -213,7 +213,7 @@ with lib.maintainers; {
dhall = {
members = [
Gabriel439
Gabriella439
ehmry
];
scope = "Maintain Dhall and related packages.";
@ -556,6 +556,15 @@ with lib.maintainers; {
shortName = "Minimal Bootstrap";
};
mercury = {
members = [
_9999years
Gabriella439
];
scope = "Group registry for packages maintained by Mercury";
shortName = "Mercury Employees";
};
mobile = {
members = [
samueldr

View File

@ -1,6 +1,6 @@
{
"commit": "c607134983625cc3fc664211145b7f31dff95d1c",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/c607134983625cc3fc664211145b7f31dff95d1c.tar.gz",
"sha256": "10frbz00cbklr3k0y45qd0wb9rwln7ivm05nb9lq7vl9a9dxx93w",
"msg": "Update from Hackage at 2023-05-10T18:33:26Z"
"commit": "149e34766e4b393af8f4b1e02b3a8cb341d22151",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/149e34766e4b393af8f4b1e02b3a8cb341d22151.tar.gz",
"sha256": "09acrzaqr05hbhdj2d0i5yj8j321fi7qcxfmpgws25bz9l07qand",
"msg": "Update from Hackage at 2023-05-28T10:08:17Z"
}

View File

@ -0,0 +1,391 @@
{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
, xattr, autoSignDarwinBinariesHook
, bash
, libiconv ? null, ncurses
, glibcLocales ? null
, # GHC can be built with system libffi or a bundled one.
libffi ? null
, useLLVM ? !(stdenv.targetPlatform.isx86
|| stdenv.targetPlatform.isPower
|| stdenv.targetPlatform.isSparc
|| (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin))
, # LLVM is conceptually a run-time-only dependency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildTargetLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slightly slower native
# bignum backend instead of the faster but GPLed gmp backend.
enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
&& lib.meta.availableOn stdenv.targetPlatform gmp)
, gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
# aarch64 outputs otherwise exceed 2GB limit
, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
, # 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.8";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "sha256-XxPReGv0/RL0tF+qN6vttbs/NtXlj32lMH6L/oilZ6E=";
};
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 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-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

@ -122,7 +122,6 @@ self: super: {
# 2023-04-03: https://github.com/haskell/haskell-language-server/issues/3546#issuecomment-1494139751
# There will probably be a new revision soon.
hls-tactics-plugin = assert super.hls-tactics-plugin.version == "1.8.0.0"; doJailbreak super.hls-tactics-plugin;
hls-brittany-plugin = assert super.hls-brittany-plugin.version == "1.1.0.0"; doJailbreak super.hls-brittany-plugin;
hls-hlint-plugin = super.hls-hlint-plugin.override {
@ -131,65 +130,6 @@ self: super: {
apply-refact = self.apply-refact_0_11_0_0;
};
hls-test-utils = appendPatch (fetchpatch {
name = "hls-test-utils-ghcide-1.10-compat.patch";
url = "https://github.com/haskell/haskell-language-server/commit/014c8f90249f11a8dfa1286e67d452ccfb42b2d0.patch";
relative = "hls-test-utils";
hash = "sha256-sBuqSmgCQSgbXV6KPEZcIP09wbx81q5xjSg7/slH2HQ=";
}) super.hls-test-utils;
hls-rename-plugin = if lib.versionAtLeast super.ghc.version "9.4" then overrideCabal
(drv: {
prePatch = drv.prePatch or "" + ''
"${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
'';
})
(appendPatch (fetchpatch {
name = "hls-rename-ghc-9.4-compat.patch";
url = "https://github.com/haskell/haskell-language-server/commit/472947cdb9e711f6ef889bba3b83b0dd44a1b6bc.patch";
relative = "plugins/hls-rename-plugin";
hash = "sha256-WPhCQmn3rjCOiQFJz23QQ84zfm43FNll0BfsNK5pkG0=";
}) super.hls-rename-plugin) else super.hls-rename-plugin;
hls-floskell-plugin = if lib.versionAtLeast super.ghc.version "9.4" then overrideCabal
(drv: {
prePatch = drv.prePatch or "" + ''
"${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
'';
})
(appendPatch (fetchpatch {
name = "hls-floskell-ghc-9.4-compat.patch";
url = "https://github.com/haskell/haskell-language-server/commit/ddc67b2d4d719623b657aa54db20bf58c58a5d4a.patch";
relative = "plugins/hls-floskell-plugin";
hash = "sha256-n2vuzGbdvhW6I8c7Q22SuNIKSX2LwGNBTVyLLHJIsiU=";
}) super.hls-floskell-plugin) else super.hls-floskell-plugin;
hls-stylish-haskell-plugin = if lib.versionAtLeast super.ghc.version "9.4" then overrideCabal
(drv: {
prePatch = drv.prePatch or "" + ''
"${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
'';
})
(appendPatch (fetchpatch {
name = "hls-stylish-haskell-ghc-9.4-compat.patch";
url = "https://github.com/haskell/haskell-language-server/commit/ddc67b2d4d719623b657aa54db20bf58c58a5d4a.patch";
relative = "plugins/hls-stylish-haskell-plugin";
hash = "sha256-GtN9t5zMOROCDSLiscLZ5GmqDV+ql9R2z/+W++C2h2Q=";
}) super.hls-stylish-haskell-plugin) else super.hls-stylish-haskell-plugin;
hie-compat = if lib.versionAtLeast super.ghc.version "9.6" then overrideCabal
(drv: {
prePatch = drv.prePatch or "" + ''
"${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
'';
})
(appendPatch (fetchpatch {
name = "hie-compat-9.6-compat.patch";
url = "https://github.com/haskell/haskell-language-server/commit/191bda61fef34696a793503e639a53003ff70660.patch";
relative = "hie-compat";
hash = "sha256-z81+fwxwZ8BQWGRqTnh3XlQ6AG7EiaahdKjT+0lFu1Q=";
}) super.hie-compat) else super.hie-compat;
# For -f-auto see cabal.project in haskell-language-server.
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex);
@ -1102,6 +1042,9 @@ self: super: {
cp -v embeddedfiles/*.info* $out/share/info/
'';
}) super.hledger;
hledger_1_29_2 = doDistribute (super.hledger_1_29_2.override {
hledger-lib = self.hledger-lib_1_29_2;
});
hledger-ui = overrideCabal (drv: {
postInstall = ''
for i in $(seq 1 9); do
@ -2515,7 +2458,7 @@ self: super: {
# 2022-11-15: Needs newer witch package and brick 1.3 which in turn works with text-zipper 0.12
# Other dependencies are resolved with doJailbreak for both swarm and brick_1_3
swarm = doJailbreak (super.swarm.override {
brick = doJailbreak (dontCheck super.brick_1_7);
brick = doJailbreak (dontCheck super.brick_1_9);
});
# Too strict upper bound on bytestring
@ -2659,7 +2602,7 @@ self: super: {
# https://github.com/fourmolu/fourmolu/issues/231
fourmolu_0_12_0_0 = dontCheck (super.fourmolu_0_12_0_0.overrideScope (lself: lsuper: {
Cabal-syntax = lself.Cabal-syntax_3_10_1_0;
ghc-lib-parser = lself.ghc-lib-parser_9_6_1_20230312;
ghc-lib-parser = lself.ghc-lib-parser_9_6_2_20230523;
parsec = lself.parsec_3_1_16_1;
text = lself.text_2_0_2;
}));

View File

@ -117,6 +117,12 @@ self: super: ({
yesod-bin = addBuildDepend darwin.apple_sdk.frameworks.Cocoa super.yesod-bin;
yesod-core = super.yesod-core.overrideAttrs (drv: {
# Allow access to local networking when the Darwin sandbox is enabled, so yesod-core can
# run tests that access localhost.
__darwinAllowLocalNetworking = true;
});
hmatrix = addBuildDepend darwin.apple_sdk.frameworks.Accelerate super.hmatrix;
blas-hs = overrideCabal (drv: {
@ -276,6 +282,12 @@ self: super: ({
'' + drv.postPatch or "";
}) super.http-client-tls;
http2 = super.http2.overrideAttrs (drv: {
# Allow access to local networking when the Darwin sandbox is enabled, so http2 can run tests
# that access localhost.
__darwinAllowLocalNetworking = true;
});
foldl = overrideCabal (drv: {
postPatch = ''
# This comment has been inserted, so the derivation hash changes, forcing

View File

@ -190,14 +190,6 @@ in {
# https://github.com/kowainik/relude/issues/436
relude = dontCheck (doJailbreak super.relude);
# Fixes compilation failure with GHC >= 9.4 on aarch64-* due to an API change
cborg = appendPatch (pkgs.fetchpatch {
name = "cborg-support-ghc-9.4.patch";
url = "https://github.com/well-typed/cborg/pull/304.diff";
sha256 = "sha256-W4HldlESKOVkTPhz9nkFrvbj9akCOtF1SbIt5eJqtj8=";
relative = "cborg";
}) super.cborg;
ormolu = doDistribute self.ormolu_0_5_3_0;
# https://github.com/tweag/ormolu/issues/941
fourmolu = overrideCabal (drv: {

View File

@ -77,8 +77,8 @@ self: super: {
aeson = doDistribute self.aeson_2_1_2_1;
memory = doDistribute self.memory_0_18_0;
ghc-lib = doDistribute self.ghc-lib_9_6_1_20230312;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_1_20230312;
ghc-lib = doDistribute self.ghc-lib_9_6_2_20230523;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_2_20230523;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_6_0_0;
# allows mtl, template-haskell, text and transformers
@ -103,8 +103,7 @@ self: super: {
# Forbids base >= 4.18, fix proposed: https://github.com/sjakobi/newtype-generics/pull/25
newtype-generics = jailbreakForCurrentVersion super.newtype-generics "0.6.2";
# Forbids base >= 4.18, fix proposed: https://github.com/well-typed/cborg/pull/312
cborg = jailbreakForCurrentVersion super.cborg "0.2.8.0";
cborg-json = jailbreakForCurrentVersion super.cborg-json "0.2.5.0";
serialise = jailbreakForCurrentVersion super.serialise "0.2.6.0";
@ -155,13 +154,22 @@ self: super: {
# 2023-04-03: plugins disabled for hls 1.10.0.0 based on
#
haskell-language-server = super.haskell-language-server.override {
hls-ormolu-plugin = null;
hls-floskell-plugin = null;
hls-fourmolu-plugin = null;
hls-hlint-plugin = null;
hls-stylish-haskell-plugin = null;
};
haskell-language-server =
let
# TODO: HLS-2.0.0.0 added support for the foumolu plugin for ghc-9.6.
# However, putting together all the overrides to get the latest
# version of fourmolu compiling together with ghc-9.6 and HLS is a
# little annoying, so currently fourmolu has been disabled. We should
# try to enable this at some point in the future.
hlsWithFlags = disableCabalFlag "fourmolu" super.haskell-language-server;
in
hlsWithFlags.override {
hls-ormolu-plugin = null;
hls-floskell-plugin = null;
hls-fourmolu-plugin = null;
hls-hlint-plugin = null;
hls-stylish-haskell-plugin = null;
};
MonadRandom = super.MonadRandom_0_6;
unix-compat = super.unix-compat_0_7;

View File

@ -843,7 +843,6 @@ broken-packages:
- conferer-provider-json
- conferer-snap
- conferer-source-json
- conferer-warp
- confide
- ConfigFileTH
- config-parser
@ -2430,6 +2429,7 @@ broken-packages:
- hplaylist
- hpodder
- hpqtypes
- hprox # dependency missing in job https://hydra.nixos.org/build/221844808 at 2023-05-30
- hps-kmeans
- hPushover
- hpygments
@ -2739,6 +2739,7 @@ broken-packages:
- inj-base
- inject-function
- injections
- inline-c-objc # failure building test suite 'tests' in job https://hydra.nixos.org/build/221844966 at 2023-05-30
- in-other-words-plugin
- inserts
- instana-haskell-trace-sdk
@ -5056,6 +5057,7 @@ broken-packages:
- state-record
- static
- static-canvas
- static-ls # failure in job https://hydra.nixos.org/build/221848657 at 2023-05-30
- static-tensor
- statistics-dirichlet
- statistics-fusion
@ -5862,6 +5864,7 @@ broken-packages:
- wol
- word24
- word2vec-model
- word8set # failure in job https://hydra.nixos.org/build/221843616 at 2023-05-30
- wordchoice
- wordify
- Wordlint

View File

@ -202,7 +202,7 @@ package-maintainers:
- vulkan-utils
erictapen:
- hakyll
Gabriel439:
Gabriella439:
- annah
- bench
- break
@ -568,6 +568,7 @@ unsupported-platforms:
bytelog: [ platforms.darwin ] # due to posix-api
camfort: [ aarch64-linux ]
charsetdetect: [ aarch64-linux ] # not supported by vendored lib / not configured properly https://github.com/batterseapower/libcharsetdetect/issues/3
coinor-clp: [ aarch64-linux ] # aarch64-linux is not supported by required system dependency clp
cut-the-crap: [ platforms.darwin ]
essence-of-live-coding-PortMidi: [ platforms.darwin ]
Euterpea: [ platforms.darwin ]
@ -814,3 +815,10 @@ dont-distribute-packages:
# Output exceeds Hydra's maximum allowable size
- stripeapi
# Packages that (transitively) depend on insecure packages
- distributed-process-zookeeper # depends on hzk
- hzk # depends on zookeeper_mt, which depends on openssl-1.1
- persistent-zookeper # depends on hzk
- pocket-dns # depends on persistent-zookeeper
- zoovisitor # depends on zookeeper_mt, which depends on openssl-1.1

View File

@ -1,4 +1,4 @@
# Stackage LTS 20.20
# Stackage LTS 20.23
# This file is auto-generated by
# maintainers/scripts/haskell/update-stackage.sh
default-package-overrides:
@ -203,7 +203,7 @@ default-package-overrides:
- bitvec ==1.1.4.0
- bitwise-enum ==1.0.1.0
- blake2 ==0.3.0
- Blammo ==1.1.1.1
- Blammo ==1.1.1.2
- blank-canvas ==0.7.3
- blanks ==0.5.0
- blas-carray ==0.1.0.2
@ -227,7 +227,7 @@ default-package-overrides:
- bookkeeping ==0.4.0.1
- Boolean ==0.2.4
- boolsimplifier ==0.1.8
- boomerang ==1.4.8.1
- boomerang ==1.4.9
- boots ==0.2.0.1
- bordacount ==0.1.0.0
- boring ==0.2.1
@ -294,11 +294,11 @@ default-package-overrides:
- cache ==0.1.3.0
- cached-json-file ==0.1.1
- cacophony ==0.10.1
- cairo ==0.13.8.2
- cairo ==0.13.10.0
- calendar-recycling ==0.0.0.1
- call-alloy ==0.4.0.3
- calligraphy ==0.1.4
- call-plantuml ==0.0.1.1
- call-plantuml ==0.0.1.2
- call-stack ==0.4.0
- can-i-haz ==0.3.1.1
- capability ==0.5.0.1
@ -315,7 +315,7 @@ default-package-overrides:
- cassava-megaparsec ==2.0.4
- cast ==0.1.0.2
- cayley-client ==0.4.19.2
- cborg ==0.2.8.0
- cborg ==0.2.9.0
- cborg-json ==0.2.5.0
- cdar-mBound ==0.1.0.4
- c-enum ==0.1.1.3
@ -388,7 +388,7 @@ default-package-overrides:
- commutative ==0.0.2
- comonad ==5.0.8
- comonad-extras ==4.0.1
- compactmap ==0.1.4.2.1
- compactmap ==0.1.4.3
- compensated ==0.8.3
- compiler-warnings ==0.1.0
- componentm ==0.0.0.2
@ -405,11 +405,11 @@ default-package-overrides:
- concise ==0.1.0.1
- concurrency ==1.11.0.2
- concurrent-extra ==0.7.0.12
- concurrent-output ==1.10.17
- concurrent-output ==1.10.18
- concurrent-split ==0.0.1.1
- cond ==0.4.1.1
- conduino ==0.2.2.0
- conduit ==1.3.4.3
- conduit ==1.3.5
- conduit-aeson ==0.1.0.1
- conduit-algorithms ==0.0.13.0
- conduit-combinators ==1.3.0
@ -447,7 +447,7 @@ default-package-overrides:
- cookie ==0.4.6
- copr-api ==0.1.0
- core-data ==0.3.9.1
- core-program ==0.6.6.0
- core-program ==0.6.8.0
- core-telemetry ==0.2.9.1
- core-text ==0.3.8.1
- countable ==1.2
@ -486,7 +486,7 @@ default-package-overrides:
- crypt-sha512 ==0
- csp ==1.4.0
- css-text ==0.1.3.0
- c-struct ==0.1.1.3
- c-struct ==0.1.3.0
- csv ==0.1.2
- csv-conduit ==0.7.3.0
- ctrie ==0.2
@ -587,7 +587,7 @@ default-package-overrides:
- diagrams-cairo ==1.4.2
- diagrams-canvas ==1.4.1.1
- diagrams-contrib ==1.4.5
- diagrams-core ==1.5.0.1
- diagrams-core ==1.5.1
- diagrams-lib ==1.4.5.2
- diagrams-postscript ==1.5.1.1
- diagrams-rasterific ==1.4.2.2
@ -655,7 +655,7 @@ default-package-overrides:
- duration ==0.2.0.0
- dvorak ==0.1.0.0
- dynamic-state ==0.3.1
- dyre ==0.9.1
- dyre ==0.9.2
- eap ==0.9.0.2
- Earley ==0.13.0.1
- easy-file ==0.2.5
@ -923,7 +923,7 @@ default-package-overrides:
- ghc-source-gen ==0.4.3.0
- ghc-syntax-highlighter ==0.0.8.0
- ghc-tcplugins-extra ==0.4.4
- ghc-trace-events ==0.1.2.6
- ghc-trace-events ==0.1.2.7
- ghc-typelits-extra ==0.4.5
- ghc-typelits-knownnat ==0.7.8
- ghc-typelits-natnormalise ==0.7.8
@ -949,11 +949,11 @@ default-package-overrides:
- gi-gtksource ==3.0.28
- gi-harfbuzz ==0.0.9
- gi-javascriptcore ==4.0.27
- gio ==0.13.8.2
- gio ==0.13.10.0
- gi-pango ==1.0.29
- githash ==0.1.6.3
- github ==0.28.0.1
- github-release ==2.0.0.5
- github-release ==2.0.0.6
- github-rest ==1.1.2
- github-types ==0.2.1
- github-webhooks ==0.16.0
@ -966,7 +966,7 @@ default-package-overrides:
- gl ==0.9
- glasso ==0.1.0
- GLFW-b ==3.3.0.0
- glib ==0.13.8.2
- glib ==0.13.10.0
- Glob ==0.10.2
- glob-posix ==0.2.0.1
- gloss ==1.13.2.2
@ -995,9 +995,9 @@ default-package-overrides:
- groom ==0.1.2.1
- grouped-list ==0.2.3.0
- groups ==0.5.3
- gtk ==0.15.7
- gtk2hs-buildtools ==0.13.8.3
- gtk3 ==0.15.7
- gtk ==0.15.8
- gtk2hs-buildtools ==0.13.10.0
- gtk3 ==0.15.8
- gtk-sni-tray ==0.1.8.1
- gtk-strut ==0.1.3.2
- guarded-allocation ==0.0.1
@ -1047,7 +1047,7 @@ default-package-overrides:
- hasql-dynamic-statements ==0.3.1.2
- hasql-implicits ==0.1.1
- hasql-migration ==0.3.0
- hasql-notifications ==0.2.0.4
- hasql-notifications ==0.2.0.5
- hasql-optparse-applicative ==0.5
- hasql-pool ==0.8.0.7
- hasql-queue ==1.2.0.2
@ -1133,7 +1133,7 @@ default-package-overrides:
- hpack ==0.35.2
- hpack-dhall ==0.5.7
- hpc-codecov ==0.3.0.0
- hpc-lcov ==1.1.0
- hpc-lcov ==1.1.1
- HPDF ==1.6.1
- hpp ==0.6.5
- hpqtypes ==1.9.4.0
@ -1181,7 +1181,7 @@ default-package-overrides:
- hspec-expectations-json ==1.0.0.7
- hspec-expectations-lifted ==0.10.0
- hspec-expectations-pretty-diff ==0.7.2.6
- hspec-golden ==0.2.0.1
- hspec-golden ==0.2.1.0
- hspec-golden-aeson ==0.9.0.0
- hspec-hedgehog ==0.0.1.2
- hspec-junit-formatter ==1.1.0.2
@ -1256,7 +1256,7 @@ default-package-overrides:
- hw-hspec-hedgehog ==0.1.1.1
- hw-int ==0.0.2.0
- hw-ip ==2.4.2.1
- hw-json ==1.3.2.3
- hw-json ==1.3.2.4
- hw-json-simd ==0.1.1.2
- hw-json-simple-cursor ==0.1.1.1
- hw-json-standard-cursor ==0.2.3.2
@ -1314,7 +1314,7 @@ default-package-overrides:
- influxdb ==1.9.2.2
- ini ==0.4.2
- inj ==1.0
- inline-c ==0.9.1.7
- inline-c ==0.9.1.8
- inline-c-cpp ==0.5.0.0
- inliterate ==0.1.0
- input-parsers ==0.2.3.2
@ -1452,7 +1452,7 @@ default-package-overrides:
- lens-properties ==4.11.1
- lens-regex ==0.1.3
- lens-regex-pcre ==1.1.0.0
- lentil ==1.5.5.2
- lentil ==1.5.5.4
- LetsBeRational ==1.0.0.0
- leveldb-haskell ==0.6.5
- lexer-applicative ==2.1.0.2
@ -1525,14 +1525,14 @@ default-package-overrides:
- mainland-pretty ==0.7.1
- main-tester ==0.2.0.1
- managed ==1.0.10
- mandrill ==0.5.6.0
- mandrill ==0.5.7.0
- map-syntax ==0.3
- markdown ==0.1.17.5
- markdown-unlit ==0.5.1
- markov-chain ==0.0.3.4
- markov-chain-usage-model ==0.0.0
- mason ==0.2.6
- massiv ==1.0.3.0
- massiv ==1.0.4.0
- massiv-io ==1.0.0.1
- massiv-persist ==1.0.0.3
- massiv-serialise ==1.0.0.2
@ -1540,6 +1540,7 @@ default-package-overrides:
- mathexpr ==0.3.1.0
- math-extras ==0.1.1.0
- math-functions ==0.3.4.2
- mathlist ==0.1.0.4
- matplotlib ==0.7.7
- matrices ==0.5.0
- matrix ==0.3.6.1
@ -1713,7 +1714,7 @@ default-package-overrides:
- netwire ==5.0.3
- netwire-input ==0.0.7
- netwire-input-glfw ==0.0.11
- network ==3.1.2.9
- network ==3.1.4.0
- network-bsd ==2.8.1.0
- network-byte-order ==0.1.6
- network-conduit-tls ==1.3.2
@ -1804,10 +1805,10 @@ default-package-overrides:
- optics-extra ==0.4.2.1
- optics-th ==0.4.1
- optics-vl ==0.2.1
- optima ==0.4.0.3
- optima ==0.4.0.4
- optional-args ==1.0.2
- options ==1.2.1.1
- optparse-applicative ==0.17.0.0
- optparse-applicative ==0.17.1.0
- optparse-enum ==1.0.0.0
- optparse-generic ==1.4.9
- optparse-simple ==0.1.1.4
@ -1829,7 +1830,7 @@ default-package-overrides:
- pandoc-plot ==1.5.5
- pandoc-throw ==0.1.0.0
- pandoc-types ==1.22.2.1
- pango ==0.13.8.2
- pango ==0.13.10.0
- pantry ==0.5.7
- parallel ==3.2.2.0
- parallel-io ==0.3.5
@ -1955,7 +1956,7 @@ default-package-overrides:
- postgresql-binary ==0.13.1
- postgresql-libpq ==0.9.5.0
- postgresql-libpq-notify ==0.2.0.0
- postgresql-migration ==0.2.1.6
- postgresql-migration ==0.2.1.7
- postgresql-query ==3.10.0
- postgresql-schema ==0.1.14
- postgresql-simple ==0.6.4
@ -2124,7 +2125,7 @@ default-package-overrides:
- regex-pcre-builtin ==0.95.2.3.8.44
- regex-posix ==0.96.0.1
- regex-posix-clib ==2.7
- regex-tdfa ==1.3.2
- regex-tdfa ==1.3.2.1
- regex-with-pcre ==1.1.0.2
- registry ==0.3.3.4
- registry-aeson ==0.2.3.3
@ -2408,7 +2409,7 @@ default-package-overrides:
- stack ==2.9.1
- stack-all ==0.4.1
- stack-clean-old ==0.4.6
- stack-templatizer ==0.1.0.2
- stack-templatizer ==0.1.1.0
- state-codes ==0.1.3
- stateref ==0.3
- statestack ==0.3.1.1
@ -2427,7 +2428,7 @@ default-package-overrides:
- stm-extras ==0.1.0.3
- stm-hamt ==1.2.0.11
- stm-lifted ==2.5.0.0
- STMonadTrans ==0.4.6
- STMonadTrans ==0.4.7
- stm-split ==0.0.2.1
- stopwatch ==0.1.0.6
- storable-complex ==0.2.3.0
@ -2587,7 +2588,7 @@ default-package-overrides:
- testing-feat ==1.1.1.1
- testing-type-modifiers ==0.1.0.1
- texmath ==0.12.5.5
- text-ansi ==0.2.1
- text-ansi ==0.2.1.1
- text-binary ==0.2.1.1
- text-builder ==0.6.7
- text-builder-dev ==0.3.3.2
@ -2683,7 +2684,7 @@ default-package-overrides:
- transaction ==0.1.1.3
- transformers-base ==0.4.6
- transformers-compat ==0.7.2
- transformers-either ==0.1.3
- transformers-either ==0.1.4
- transformers-fix ==1.0
- transient ==0.7.0.0
- traverse-with-class ==1.0.1.1

View File

@ -1265,7 +1265,6 @@ dont-distribute-packages:
- distributed-process-systest
- distributed-process-task
- distributed-process-tests
- distributed-process-zookeeper
- distributed-static
- distribution-plot
- dixi
@ -1514,7 +1513,7 @@ dont-distribute-packages:
- fpnla-examples
- frame-markdown
- freckle-app
- freckle-app_1_9_0_1
- freckle-app_1_9_0_2
- free-functors
- free-game
- free-theorems-counterexamples
@ -1541,7 +1540,6 @@ dont-distribute-packages:
- functor-combo
- funflow
- funflow-nix
- fungll-combinators
- funion
- funnyprint
- funsat
@ -1934,6 +1932,8 @@ dont-distribute-packages:
- hakyll-ogmarkup
- hakyll-shortcut-links
- halberd
- halide-JuicyPixels
- halide-arrayfire
- hall-symbols
- halma-gui
- halma-telegram-bot
@ -3004,7 +3004,7 @@ dont-distribute-packages:
- padKONTROL
- pairing
- panda
- pandoc-crossref_0_3_15_2
- pandoc-crossref_0_3_16_0
- pandoc-highlighting-extensions
- pandoc-japanese-filters
- pandora-io
@ -3119,13 +3119,13 @@ dont-distribute-packages:
- plugins-auto
- png-file
- pngload
- pocket-dns
- point-octree
- pointless-lenses
- pointless-rewrite
- poker
- polh-lexicon
- polydata
- polyglot
- polysemy-RandomFu
- polysemy-account
- polysemy-account-api
@ -3570,6 +3570,7 @@ dont-distribute-packages:
- servant-openapi3
- servant-postgresql
- servant-pushbullet-client
- servant-queryparam-openapi3
- servant-rate-limit
- servant-reason
- servant-server-namedargs
@ -3740,7 +3741,6 @@ dont-distribute-packages:
- stackage-setup
- stackage-upload
- stackage2nix
- stackctl
- stan
- starrover2
- stateful-mtl
@ -4308,5 +4308,4 @@ dont-distribute-packages:
- zoom-cache
- zoom-cache-pcm
- zoom-cache-sndfile
- zoovisitor
- zuramaru

View File

@ -426,18 +426,8 @@ self: super: builtins.intersectAttrs super {
'';
}) super.leksah);
dyre =
appendPatch
# Dyre needs special support for reading the NIX_GHC env var. This is
# available upstream in https://github.com/willdonnelly/dyre/pull/43, but
# hasn't been released to Hackage as of dyre-0.9.1. Likely included in
# next version.
(pkgs.fetchpatch {
url = "https://github.com/willdonnelly/dyre/commit/c7f29d321aae343d6b314f058812dffcba9d7133.patch";
sha256 = "10m22k35bi6cci798vjpy4c2l08lq5nmmj24iwp0aflvmjdgscdb";
})
# dyre's tests appear to be trying to directly call GHC.
(dontCheck super.dyre);
# dyre's tests appear to be trying to directly call GHC.
dyre = dontCheck super.dyre;
# https://github.com/edwinb/EpiVM/issues/13
# https://github.com/edwinb/EpiVM/issues/14
@ -1023,6 +1013,7 @@ self: super: builtins.intersectAttrs super {
(super.cachix.override {
fsnotify = dontCheck super.fsnotify_0_4_1_0;
hnix-store-core = super.hnix-store-core_0_6_1_0;
nix = self.hercules-ci-cnix-store.nixPackage;
})
[
(addBuildTool self.hercules-ci-cnix-store.nixPackage)

View File

@ -31,6 +31,7 @@ in
, doBenchmark ? false
, doHoogle ? true
, doHaddockQuickjump ? doHoogle && lib.versionAtLeast ghc.version "8.6"
, doInstallIntermediates ? false
, editedCabalFile ? null
# aarch64 outputs otherwise exceed 2GB limit
, enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.targetPlatform.isAarch64 or false)
@ -84,6 +85,7 @@ in
, enableSeparateBinOutput ? false
, enableSeparateDataOutput ? false
, enableSeparateDocOutput ? doHaddock
, enableSeparateIntermediatesOutput ? false
, # Don't fail at configure time if there are multiple versions of the
# same package in the (recursive) dependencies of the package being
# built. Will delay failures, if any, to compile time.
@ -93,6 +95,10 @@ in
# This can make it slightly faster to load this library into GHCi, but takes
# extra disk space and compile time.
enableLibraryForGhci ? false
# Set this to a previous build of this same package to reuse the intermediate
# build products from that prior build as a starting point for accelerating
# this build
, previousIntermediates ? null
} @ args:
assert editedCabalFile != null -> revision != null;
@ -240,6 +246,8 @@ let
"--ghc-options=-haddock"
];
postPhases = optional doInstallIntermediates [ "installIntermediatesPhase" ];
setupCompileFlags = [
(optionalString (!coreSetup) "-${nativePackageDbFlag}=$setupPackageConfDir")
(optionalString enableParallelBuilding (parallelBuildingFlags))
@ -306,6 +314,8 @@ let
continue
fi
'';
intermediatesDir = "share/haskell/${ghc.version}/${pname}-${version}/dist";
in lib.fix (drv:
assert allPkgconfigDepends != [] -> pkg-config != null;
@ -316,7 +326,9 @@ stdenv.mkDerivation ({
outputs = [ "out" ]
++ (optional enableSeparateDataOutput "data")
++ (optional enableSeparateDocOutput "doc")
++ (optional enableSeparateBinOutput "bin");
++ (optional enableSeparateBinOutput "bin")
++ (optional enableSeparateIntermediatesOutput "intermediates");
setOutputFlags = false;
pos = builtins.unsafeGetAttrPos "pname" args;
@ -393,7 +405,13 @@ stdenv.mkDerivation ({
# only use the links hack if we're actually building dylibs. otherwise, the
# "dynamic-library-dirs" point to nonexistent paths, and the ln command becomes
# "ln -s $out/lib/links", which tries to recreate the links dir and fails
+ (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables)) ''
#
# Note: We need to disable this work-around when using intermediate build
# products from a prior build because otherwise Nix will change permissions on
# the `$out/lib/links` directory to read-only when the build is done after the
# dist directory has already been exported, which triggers an unnecessary
# rebuild of modules included in the exported dist directory.
+ (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables) && !enableSeparateIntermediatesOutput) ''
# Work around a limit in the macOS Sierra linker on the number of paths
# referenced by any one dynamic library:
#
@ -471,11 +489,22 @@ stdenv.mkDerivation ({
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString}
runHook postBuild
'';
buildPhase =
''
runHook preBuild
''
+ lib.optionalString (previousIntermediates != null)
''
mkdir -p dist;
rm -r dist/build
cp -r ${previousIntermediates}/${intermediatesDir}/build dist/build
find dist/build -exec chmod u+w {} +
find dist/build -exec touch -d '1970-01-01T00:00:00Z' {} +
''
+ ''
${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString}
runHook postBuild
'';
inherit doCheck;
@ -558,6 +587,15 @@ stdenv.mkDerivation ({
runHook postInstall
'';
${if doInstallIntermediates then "installIntermediatesPhase" else null} = ''
runHook preInstallIntermediates
intermediatesOutput=${if enableSeparateIntermediatesOutput then "$intermediates" else "$out"}
installIntermediatesDir="$intermediatesOutput/${intermediatesDir}"
mkdir -p "$installIntermediatesDir"
cp -r dist/build "$installIntermediatesDir"
runHook postInstallIntermediates
'';
passthru = passthru // rec {
inherit pname version;
@ -719,6 +757,7 @@ stdenv.mkDerivation ({
// optionalAttrs (args ? preFixup) { inherit preFixup; }
// optionalAttrs (args ? postFixup) { inherit postFixup; }
// optionalAttrs (args ? dontStrip) { inherit dontStrip; }
// optionalAttrs (postPhases != []) { inherit postPhases; }
// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
)
)

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,35 @@
# Demonstration of incremental builds for Haskell. Useful for speeding up CI.
#
# See: https://www.haskellforall.com/2022/12/nixpkgs-support-for-incremental-haskell.html
# See: https://felixspringer.xyz/homepage/blog/incrementalHaskellBuildsWithNix
{ haskell, lib }:
let
inherit (haskell.lib.compose) overrideCabal;
# Incremental builds work with GHC >=9.4.
temporary = haskell.packages.ghc944.temporary;
# This will do a full build of `temporary`, while writing the intermediate build products
# (compiled modules, etc.) to the `intermediates` output.
temporary-full-build-with-incremental-output = overrideCabal (drv: {
doInstallIntermediates = true;
enableSeparateIntermediatesOutput = true;
}) temporary;
# This will do an incremental build of `temporary` by copying the previously
# compiled modules and intermediate build products into the source tree
# before running the build.
#
# GHC will then naturally pick up and reuse these products, making this build
# complete much more quickly than the previous one.
temporary-incremental-build = overrideCabal (drv: {
previousIntermediates = temporary-full-build-with-incremental-output.intermediates;
}) temporary;
in
temporary-incremental-build.overrideAttrs (old: {
meta = {
maintainers = lib.teams.mercury.members;
};
})

View File

@ -20,6 +20,7 @@ let
"ghc925"
"ghc926"
"ghc927"
"ghc928"
"ghc92"
"ghc942"
"ghc943"
@ -39,6 +40,7 @@ let
"ghc925"
"ghc926"
"ghc927"
"ghc928"
"ghc94"
"ghc942"
"ghc943"
@ -231,7 +233,24 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc92 = ghc927;
ghc928 = callPackage ../development/compilers/ghc/9.2.8.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
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;
};
ghc92 = ghc928;
ghc942 = callPackage ../development/compilers/ghc/9.4.2.nix {
bootPkgs =
# Building with 9.2 is broken due to
@ -485,7 +504,12 @@ in {
ghc = bh.compiler.ghc927;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc92 = ghc927;
ghc928 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc928;
ghc = bh.compiler.ghc928;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc92 = ghc928;
ghc942 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc942;
ghc = bh.compiler.ghc942;

View File

@ -67,6 +67,7 @@ let
ghc925
ghc926
ghc927
ghc928
ghc945
ghc961
];
@ -330,7 +331,6 @@ let
nvfetcher
ormolu
pandoc
pakcs
petrinizer
place-cursor-at
pinboard-notes-backup
@ -437,8 +437,8 @@ let
;
};
haskell.packages.native-bignum.ghc927 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc927)
haskell.packages.native-bignum.ghc928 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc928)
hello
lens
random
@ -533,6 +533,7 @@ let
compilerNames.ghc925
compilerNames.ghc926
compilerNames.ghc927
compilerNames.ghc928
compilerNames.ghc945
];
weeder = [
@ -542,6 +543,7 @@ let
compilerNames.ghc925
compilerNames.ghc926
compilerNames.ghc927
compilerNames.ghc928
compilerNames.ghc945
];
})
@ -623,6 +625,7 @@ let
jobs.pkgsMusl.haskell.compiler.ghc925
jobs.pkgsMusl.haskell.compiler.ghc926
jobs.pkgsMusl.haskell.compiler.ghc927
jobs.pkgsMusl.haskell.compiler.ghc928
jobs.pkgsMusl.haskell.compiler.ghcHEAD
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
@ -630,6 +633,7 @@ let
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc925
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc926
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc927
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};
@ -645,7 +649,7 @@ let
};
constituents = accumulateDerivations [
jobs.pkgsStatic.haskellPackages
jobs.pkgsStatic.haskell.packages.native-bignum.ghc927
jobs.pkgsStatic.haskell.packages.native-bignum.ghc928
];
};
}