Merge pull request #279413 from NixOS/haskell-updates

haskellPackages: Stackage LTS 21.25 -> 22.7; ghc: 9.4.8 -> 9.6.4
This commit is contained in:
maralorn 2024-03-17 00:22:14 +01:00 committed by GitHub
commit c75037bbf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
63 changed files with 10525 additions and 9125 deletions

View File

@ -113,7 +113,7 @@ Each of those compiler versions has a corresponding attribute set built using
it. However, the non-standard package sets are not tested regularly and, as a
result, contain fewer working packages. The corresponding package set for GHC
9.4.5 is `haskell.packages.ghc945`. In fact `haskellPackages` is just an alias
for `haskell.packages.ghc927`:
for `haskell.packages.ghc964`:
```console
$ nix-env -f '<nixpkgs>' -qaP -A haskell.packages.ghc927
@ -1020,6 +1020,11 @@ failing because of e.g. a syntax error in the Haddock documentation.
: Sets `doCheck` to `false` for `drv`. Useful if a package has a broken,
flaky or otherwise problematic test suite breaking the build.
`dontCheckIf condition drv`
: Sets `doCheck` to `false` for `drv`, but only if `condition` applies.
Otherwise it's a no-op. Useful to conditionally disable tests for a package
without interfering with previous overrides or default values.
<!-- Purposefully omitting the non-list variants here. They are a bit
ugly, and we may want to deprecate them at some point. -->

View File

@ -2,8 +2,10 @@
let
pkgs = import ../../.. {};
inherit (pkgs) lib;
getDeps = _: pkg: {
deps = builtins.filter (x: x != null) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
getDeps = _: pkg: let
pname = pkg.pname or null;
in {
deps = builtins.filter (x: x != null && x != pname) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
broken = (pkg.meta.hydraPlatforms or [null]) == [];
};
in

View File

@ -83,7 +83,7 @@ import Prelude hiding (id)
import Data.List (sortOn)
import Control.Concurrent.Async (concurrently)
import Control.Exception (evaluate)
import qualified Data.IntMap.Strict as IntMap
import qualified Data.IntMap.Lazy as IntMap
import qualified Data.IntSet as IntSet
import Data.Bifunctor (second)
import Data.Data (Proxy)
@ -299,7 +299,7 @@ calculateReverseDependencies depMap =
Map.fromDistinctAscList $ zip keys (zip (rdepMap False) (rdepMap True))
where
-- This code tries to efficiently invert the dependency map and calculate
-- its transitive closure by internally identifying every pkg with its index
-- its transitive closure by internally identifying every pkg with its index
-- in the package list and then using memoization.
keys :: [PkgName]
keys = Map.keys depMap
@ -317,11 +317,11 @@ calculateReverseDependencies depMap =
intDeps :: [(Int, (Bool, [Int]))]
intDeps = zip [0..] (fmap depInfoToIdx depInfos)
rdepMap onlyUnbroken = IntSet.size <$> resultList
rdepMap onlyUnbroken = IntSet.size <$> IntMap.elems resultList
where
resultList = go <$> [0..]
resultList = IntMap.fromDistinctAscList [(i, go i) | i <- [0..length keys - 1]]
oneStepMap = IntMap.fromListWith IntSet.union $ (\(key,(_,deps)) -> (,IntSet.singleton key) <$> deps) <=< filter (\(_, (broken,_)) -> not (broken && onlyUnbroken)) $ intDeps
go pkg = IntSet.unions (oneStep:((resultList !!) <$> IntSet.toList oneStep))
go pkg = IntSet.unions (oneStep:((resultList IntMap.!) <$> IntSet.toList oneStep))
where oneStep = IntMap.findWithDefault mempty pkg oneStepMap
-- | Generate a mapping of Hydra job names to maintainer GitHub handles. Calls

View File

@ -66,10 +66,6 @@ done
HACKAGE2NIX="${HACKAGE2NIX:-hackage2nix}"
# To prevent hackage2nix fails because of encoding.
# See: https://github.com/NixOS/nixpkgs/pull/122023
export LC_ALL=C.UTF-8
config_dir=pkgs/development/haskell-modules/configuration-hackage2nix
run_hackage2nix() {

View File

@ -8,7 +8,7 @@ set -eu -o pipefail
# (should be capitalized like the display name)
SOLVER=LTS
# Stackage solver verson, if any. Use latest if empty
VERSION=21
VERSION=
TMP_TEMPLATE=update-stackage.XXXXXXX
readonly SOLVER
readonly VERSION

View File

@ -2,13 +2,13 @@
with haskellPackages; mkDerivation {
pname = "Naproche-SAD";
version = "unstable-2023-07-11";
version = "unstable-2024-01-18";
src = fetchFromGitHub {
owner = "naproche";
repo = "naproche";
rev = "4c399d49a86987369bec6e1ac5ae3739cd6db0a8";
sha256 = "sha256-Ji6yxbDEcwuYAzIZwK5sHNltK1WBFBfpyoEtoID/U4k=";
rev = "bb3dbcbd2173e3334bc5bdcd04c07c6836a11387";
hash = "sha256-DWcowUjy8/VBuhqvDYlVINHssF4KhuzT0L+m1YwUxoE=";
};
isExecutable = true;
@ -20,11 +20,7 @@ with haskellPackages; mkDerivation {
];
prePatch = "hpack";
checkPhase = ''
export NAPROCHE_EPROVER=${eprover}/bin/eprover
dist/build/Naproche-SAD/Naproche-SAD examples/cantor.ftl.tex -t 60 --tex=on
'';
doCheck = false; # Tests are broken in upstream
postInstall = ''
wrapProgram $out/bin/Naproche-SAD \

View File

@ -1,6 +1,6 @@
{
"commit": "d77837f979c4b15fe0eb25cdf8a0463773434c9d",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/d77837f979c4b15fe0eb25cdf8a0463773434c9d.tar.gz",
"sha256": "01ihv1nwp0qqhwll5icl19ij5sb1nvhpnwgvwpcr319rn3b704km",
"msg": "Update from Hackage at 2023-12-17T16:07:47Z"
"commit": "c947711834678a5466dcca9367676bc61ed0a991",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/c947711834678a5466dcca9367676bc61ed0a991.tar.gz",
"sha256": "1slm1b6s8hk7x5rlr9fmsipkj8g6jsbvf5lfr2zzz8msfr5z8j8c",
"msg": "Update from Hackage at 2024-02-12T23:23:22Z"
}

View File

@ -36,6 +36,10 @@ let
};
in elmPkgs // {
inherit elmPkgs;
ansi-wl-pprint = overrideCabal (drv: {
jailbreak = true;
}) (self.callPackage ./packages/ansi-wl-pprint.nix {});
};
};

View File

@ -0,0 +1,17 @@
{ mkDerivation, ansi-terminal, base, fetchgit, lib }:
mkDerivation {
pname = "ansi-wl-pprint";
version = "0.6.8.1";
src = fetchgit {
url = "https://github.com/ekmett/ansi-wl-pprint";
sha256 = "00pgxgkramz6y1bgdlm00rsh6gd6mdaqllh6riax2rc2sa35kip4";
rev = "d16e2f6896d76b87b72af7220c2e93ba15c53280";
fetchSubmodules = true;
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [ ansi-terminal base ];
homepage = "http://github.com/ekmett/ansi-wl-pprint";
description = "The Wadler/Leijen Pretty Printer for colored ANSI terminal output";
license = lib.licenses.bsd3;
}

View File

@ -1,6 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
cabal2nix https://github.com/ekmett/ansi-wl-pprint --revision d16e2f6896d76b87b72af7220c2e93ba15c53280 > packages/ansi-wl-pprint.nix
# We're building binaries from commit that npm installer is using since
# November 1st release called 0.19.1-6 in npm registry.
# These binaries are built with newer ghc version and also support Aarch64 for Linux and Darwin.

View File

@ -103,7 +103,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' + lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC

View File

@ -105,7 +105,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -105,7 +105,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -105,7 +105,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -105,7 +105,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -105,7 +105,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -107,7 +107,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -107,7 +107,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -107,7 +107,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -107,7 +107,7 @@ let
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
BUILD_PROF_LIBS = NO
'' +
# -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.

View File

@ -0,0 +1,407 @@
{ lib, stdenv
, fetchurl, perl, gcc
, ncurses5
, ncurses6, gmp, libiconv, numactl, libffi
, llvmPackages
, coreutils
, targetPackages
# minimal = true; will remove files that aren't strictly necessary for
# regular builds and GHC bootstrapping.
# This is "useful" for staying within hydra's output limits for at least the
# aarch64-linux architecture.
, minimal ? false
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
downloadsUrl = "https://downloads.haskell.org/ghc";
# Copy sha256 from https://downloads.haskell.org/~ghc/9.6.3/SHA256SUMS
version = "9.6.3";
# Information about available bindists that we use in the build.
#
# # Bindist library checking
#
# The field `archSpecificLibraries` also provides a way for us get notified
# early when the upstream bindist changes its dependencies (e.g. because a
# newer Debian version is used that uses a new `ncurses` version).
#
# Usage:
#
# * You can find the `fileToCheckFor` of libraries by running `readelf -d`
# on the compiler binary (`exePathForLibraryCheck`).
# * To skip library checking for an architecture,
# set `exePathForLibraryCheck = null`.
# * To skip file checking for a specific arch specfic library,
# set `fileToCheckFor = null`.
ghcBinDists = {
# Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin)
# nixpkgs uses for the respective system.
defaultLibc = {
i686-linux = {
variantSuffix = "";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
sha256 = "58be26f8b8f6b5bd8baf5c32abb03e2c4621646b2142fab10e5c7de5af5c50f8";
};
exePathForLibraryCheck = "bin/ghc";
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
# The i686-linux bindist provided by GHC HQ is currently built on Debian 9,
# which link it against `libtinfo.so.5` (ncurses 5).
# Other bindists are linked `libtinfo.so.6` (ncurses 6).
{ nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; }
];
};
x86_64-linux = {
variantSuffix = "";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb11-linux.tar.xz";
sha256 = "c4c0124857265926f1cf22a09d950d7ba989ff94053a4ddf3dcdab5359f4cab7";
};
exePathForLibraryCheck = "bin/ghc";
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
{ nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
];
};
aarch64-linux = {
variantSuffix = "";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
sha256 = "03c389859319f09452081310fc13af7525063ea8930830ef76be2a14b312271e";
};
exePathForLibraryCheck = "bin/ghc";
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
{ nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
{ nixPackage = numactl; fileToCheckFor = null; }
];
};
x86_64-darwin = {
variantSuffix = "";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
sha256 = "dde46118ab8388fb1066312c097123e93b1dcf6ae366e3370f88ea456382c9db";
};
exePathForLibraryCheck = null; # we don't have a library check for darwin yet
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
{ nixPackage = ncurses6; fileToCheckFor = null; }
{ nixPackage = libiconv; fileToCheckFor = null; }
];
};
aarch64-darwin = {
variantSuffix = "";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz";
sha256 = "e1cdf458926b2eaf52d2a8287d99a965040ff9051171f5c3b7467049cf0eb213";
};
exePathForLibraryCheck = null; # we don't have a library check for darwin yet
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
{ nixPackage = ncurses6; fileToCheckFor = null; }
{ nixPackage = libiconv; fileToCheckFor = null; }
];
};
};
# Binary distributions for the musl libc for the respective system.
musl = {
x86_64-linux = {
variantSuffix = "-musl";
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3_12-linux.tar.xz";
sha256 = "8f457af0aa40127049c11134c8793f64351a446e87da1f8ec256e1279b5ab61f";
};
exePathForLibraryCheck = "bin/ghc";
archSpecificLibraries = [
{ nixPackage = gmp; fileToCheckFor = null; }
{ nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; }
];
};
};
};
distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc";
binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')");
gmpUsed = (builtins.head (
builtins.filter (
drv: lib.hasPrefix "gmp" (drv.nixPackage.name or "")
) binDistUsed.archSpecificLibraries
)).nixPackage;
# GHC has other native backends (like PowerPC), but here only the ones
# we ship bindists for matter.
useLLVM = !(stdenv.targetPlatform.isx86
|| (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin));
libPath =
lib.makeLibraryPath (
# Add arch-specific libraries.
map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries
);
libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
runtimeDeps = [
targetPackages.stdenv.cc
targetPackages.stdenv.cc.bintools
coreutils # for cat
]
++ lib.optionals useLLVM [
(lib.getBin llvmPackages.llvm)
]
# On darwin, we need unwrapped bintools as well (for otool)
++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [
targetPackages.stdenv.cc.bintools.bintools
];
in
stdenv.mkDerivation rec {
inherit version;
pname = "ghc-binary${binDistUsed.variantSuffix}";
src = fetchurl binDistUsed.src;
nativeBuildInputs = [ perl ];
# Set LD_LIBRARY_PATH or equivalent so that the programs running as part
# of the bindist installer can find the libraries they expect.
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location.
${libEnvVar} = libPath;
postUnpack =
# Verify our assumptions of which `libtinfo.so` (ncurses) version is used,
# so that we know when ghc bindists upgrade that and we need to update the
# version used in `libPath`.
lib.optionalString
(binDistUsed.exePathForLibraryCheck != null)
# Note the `*` glob because some GHCs have a suffix when unpacked, e.g.
# the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`.
# As a result, don't shell-quote this glob when splicing the string.
(let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
lib.concatStringsSep "\n" [
(''
shopt -u nullglob
echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
if ! test -e ${buildExeGlob}; then
echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
'')
(lib.concatMapStringsSep
"\n"
({ fileToCheckFor, nixPackage }:
lib.optionalString (fileToCheckFor != null) ''
echo "Checking bindist for ${fileToCheckFor} to ensure that is still used"
if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then
echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}"
if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then
echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
''
)
binDistUsed.archSpecificLibraries
)
])
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
+ lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# not enough room in the object files for the full path to libiconv :(
for exe in $(find . -type f -executable); do
isMachO $exe || continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
''
# We have to patch the GMP paths for the ghc-bignum package, for hadrian by
# modifying the package-db directly
+ ''
find . -name 'ghc-bignum*.conf' \
-exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib gmpUsed}/lib' -i {} \;
''
# Similar for iconv and libffi on darwin
+ lib.optionalString stdenv.isDarwin ''
find . -name 'base*.conf' \
-exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libiconv}/lib' -i {} \;
# To link RTS in the end we also need libffi now
find . -name 'rts*.conf' \
-exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libffi}/lib' \
-e 's@/Library/Developer/.*/usr/include/ffi@${lib.getDev libffi}/include@' \
-i {} \;
'' +
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
# FFI_LIB_DIR is a good indication of places it must be needed.
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
find . -name package.conf.in \
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
lib.optionalString stdenv.isLinux ''
find . -type f -executable -exec patchelf \
--interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
'';
# fix for `configure: error: Your linker is affected by binutils #16177`
preConfigure = lib.optionalString
stdenv.targetPlatform.isAarch32
"LD=ld.gold";
# GHC has a patched config.sub and bindists' platforms should always work
dontUpdateAutotoolsGnuConfigScripts = true;
configurePlatforms = [ ];
configureFlags =
lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
# From: https://github.com/NixOS/nixpkgs/pull/43369/commits
++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# Patch scripts to include runtime dependencies in $PATH.
postInstall = ''
for i in "$out/bin/"*; do
test ! -h "$i" || continue
isScript "$i" || continue
sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
done
'';
# Apparently necessary for the ghc Alpine (musl) bindist:
# When we strip, and then run the
# patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
# below, running ghc (e.g. during `installCheckPhase)` gives some apparently
# corrupted rpath or whatever makes the loader work on nonsensical strings:
# running install tests
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: <20>: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: <20>?: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
# This is extremely bogus and should be investigated.
dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false))
(if stdenv.hostPlatform.isAarch64 then
# Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs
# are 2 directories deep from $out/lib, so pooling symlinks there makes
# a short rpath.
''
(cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
(cd $out/lib; ln -s ${lib.getLib gmpUsed}/lib/libgmp.so.10)
(cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
for p in $(find "$out/lib" -type f -name "*\.so*"); do
(cd $out/lib; ln -s $p)
done
for p in $(find "$out/lib" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
fi
done
''
else
''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'') + lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isMachO $exe || continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
''
# Recache package db which needs to happen for Hadrian bindists
# where we modify the package db before installing
+ ''
package_db=("$out"/lib/ghc-*/lib/package.conf.d)
"$out/bin/ghc-pkg" --package-db="$package_db" recache
'';
# 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
hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
doInstallCheck = true;
installCheckPhase = ''
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
{-# LANGUAGE TemplateHaskell #-}
module Main where
main = putStrLn \$([|"yes"|])
EOF
env -i $out/bin/ghc --make main.hs || exit 1
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = {
targetPrefix = "";
enableShared = true;
inherit llvmPackages;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
# Normal GHC derivations expose the hadrian derivation used to build them
# here. In the case of bindists we just make sure that the attribute exists,
# as it is used for checking if a GHC derivation has been built with hadrian.
hadrian = null;
};
meta = rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
license = lib.licenses.bsd3;
# HACK: since we can't encode the libc / abi in platforms, we need
# to make the platform list dependent on the evaluation platform
# in order to avoid eval errors with musl which supports less
# platforms than the default libcs (i. e. glibc / libSystem).
# This is done for the benefit of Hydra, so `packagePlatforms`
# won't return any platforms that would cause an evaluation
# failure for `pkgsMusl.haskell.compiler.ghc922Binary`, as
# long as the evaluator runs on a platform that supports
# `pkgsMusl`.
platforms = builtins.attrNames ghcBinDists.${distSetName};
maintainers = lib.teams.haskell.members;
};
}

View File

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

View File

@ -528,6 +528,10 @@ stdenv.mkDerivation ({
] ++ lib.teams.haskell.members;
timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
# https://github.com/NixOS/nixpkgs/issues/208959
broken =
(lib.versionAtLeast version "9.6" && lib.versionOlder version "9.8")
&& stdenv.targetPlatform.isStatic;
};
dontStrip = targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm;

View File

@ -2,6 +2,7 @@
, pkgsHostTarget
, cmake
, makeWrapper
, fetchpatch
, mkDerivation
, fetchFromGitHub
, alex
@ -19,7 +20,7 @@
, FloatingHex
, isocline
, lens
, lsp
, lsp_2_4_0_0
, mtl
, network
, network-simple
@ -64,6 +65,14 @@ mkDerivation rec {
isLibrary = false;
isExecutable = true;
libraryToolDepends = [ hpack ];
patches = [
(fetchpatch {
name = "koka-stackage-22.patch";
url = "https://github.com/koka-lang/koka/commit/95f9b360544996e06d4bb33321a83a6b9605d092.patch";
sha256 = "1a1sv1r393wkhsnj56awsi8mqxakqdy86p7dg9i9xfv13q2g4h6x";
includes = [ "src/**" ];
})
];
executableHaskellDepends = [
aeson
array
@ -77,7 +86,7 @@ mkDerivation rec {
FloatingHex
isocline
lens
lsp
lsp_2_4_0_0
mtl
network
network-simple

View File

@ -8,10 +8,10 @@
}:
mkDerivation {
pname = "cabal2nix";
version = "unstable-2024-01-04";
version = "unstable-2024-02-05";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/e394e96c51cc7a2858145e710fbedbb2cb57f6ec.tar.gz";
sha256 = "0rzmyx2i2z3w2ibg4rbaasq0581sa7bf8n1cih6v3j6phzgl3058";
url = "https://github.com/NixOS/cabal2nix/archive/173e8a5fa70dc95a1aeb0bd877bf5fee6d5e6b4a.tar.gz";
sha256 = "1pld7jfsjmw486ch6li1fqci1jj5p2nvfq7nrkxrmf5p2ja5528g";
};
postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot";
isLibrary = true;

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
inherit (pkgs) lib;
in
self: super: {
@ -58,9 +59,6 @@ self: super: {
# their existence to callPackages, but their is no shim for lower GHC versions.
system-cxx-std-lib = null;
# Additionally depends on OneTuple for GHC < 9.0
base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries;
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
hashable = addBuildDepends [
@ -120,13 +118,6 @@ self: super: {
# Overly-strict bounds introducted by a revision in version 0.3.2.
text-metrics = doJailbreak super.text-metrics;
# OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9
OneTuple = addBuildDepends [
self.foldable1-classes-compat
] (super.OneTuple.override {
ghc-prim = self.hashable;
});
# Doesn't build with 9.0, see https://github.com/yi-editor/yi/issues/1125
yi-core = doDistribute (markUnbroken super.yi-core);
@ -170,4 +161,25 @@ self: super: {
# No instance for (Show B.Builder) arising from a use of print
http-types = dontCheck super.http-types;
# Packages which need compat library for GHC < 9.6
inherit
(lib.mapAttrs
(_: addBuildDepends [ self.foldable1-classes-compat ])
super)
indexed-traversable
these
;
base-compat-batteries = addBuildDepends [
self.foldable1-classes-compat
self.OneTuple
] super.base-compat-batteries;
# OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9
OneTuple = addBuildDepends [
self.foldable1-classes-compat
self.base-orphans
] (super.OneTuple.override {
ghc-prim = self.hashable;
});
}

View File

@ -4,6 +4,7 @@ with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
inherit (pkgs) lib;
in
self: super: {
@ -135,4 +136,21 @@ self: super: {
# No instance for (Show B.Builder) arising from a use of print
http-types = dontCheck super.http-types;
# Packages which need compat library for GHC < 9.6
inherit
(lib.mapAttrs
(_: addBuildDepends [ self.foldable1-classes-compat ])
super)
indexed-traversable
these
;
base-compat-batteries = addBuildDepends [
self.foldable1-classes-compat
self.OneTuple
] super.base-compat-batteries;
OneTuple = addBuildDepends [
self.foldable1-classes-compat
self.base-orphans
] super.OneTuple;
}

View File

@ -4,6 +4,7 @@ with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
inherit (pkgs) lib;
in
self: super: {
@ -74,14 +75,21 @@ self: super: {
stylish-haskell = doJailbreak super.stylish-haskell_0_14_4_0;
haskell-language-server = disableCabalFlag "fourmolu" (super.haskell-language-server.override {
haskell-language-server = lib.pipe (super.haskell-language-server.override {
hls-ormolu-plugin = null;
hls-stylish-haskell-plugin = null;
hls-fourmolu-plugin = null;
# Not buildable if GHC > 9.2.3, so we ship no compatible GHC
hls-stan-plugin = null;
});
}) [
(disableCabalFlag "fourmolu")
(disableCabalFlag "ormolu")
(disableCabalFlag "stylishHaskell")
];
# For GHC < 9.4, some packages need data-array-byte as an extra dependency
hashable = addBuildDepends [ self.data-array-byte ] super.hashable;
primitive = addBuildDepends [ self.data-array-byte ] super.primitive;
primitive-unlifted = super.primitive-unlifted_0_1_3_1;
# Jailbreaks & Version Updates
hashable-time = doJailbreak super.hashable-time;
@ -127,4 +135,18 @@ self: super: {
# Requires GHC < 9.4
ghc-source-gen = doDistribute (unmarkBroken super.ghc-source-gen);
# Packages which need compat library for GHC < 9.6
inherit
(lib.mapAttrs
(_: addBuildDepends [ self.foldable1-classes-compat ])
super)
indexed-traversable
OneTuple
these
;
base-compat-batteries = addBuildDepends [
self.foldable1-classes-compat
self.OneTuple
] super.base-compat-batteries;
}

View File

@ -59,10 +59,12 @@ in {
hashable-time = doJailbreak super.hashable-time;
libmpd = doJailbreak super.libmpd;
lens-family-th = doJailbreak super.lens-family-th; # template-haskell <2.19
# generically needs base-orphans for 9.4 only
base-orphans = dontCheck (doDistribute super.base-orphans);
generically = addBuildDepends [
self.base-orphans
] super.generically;
# the dontHaddock is due to a GHC panic. might be this bug, not sure.
# https://gitlab.haskell.org/ghc/ghc/-/issues/21619
@ -90,45 +92,52 @@ in {
ghc-tags = self.ghc-tags_1_6;
# A given major version of ghc-exactprint only supports one version of GHC.
ghc-exactprint = super.ghc-exactprint_1_6_1_3;
# Too strict upper bound on template-haskell
# https://github.com/mokus0/th-extras/issues/18
th-extras = doJailbreak super.th-extras;
# requires newer versions to work with GHC 9.4
servant = doJailbreak super.servant;
servant-server = doJailbreak super.servant-server;
servant-auth = doJailbreak super.servant-auth;
servant-auth-swagger = doJailbreak super.servant-auth-swagger;
servant-swagger = doJailbreak super.servant-swagger;
servant-client-core = doJailbreak super.servant-client-core;
servant-client = doJailbreak super.servant-client;
# https://github.com/kowainik/relude/issues/436
relude = dontCheck super.relude;
# Broken because of unix >= 2.8 for GHC >= 9.6
darcs = unmarkBroken (doDistribute super.darcs);
inherit
(
let
hls_overlay = lself: lsuper: {
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;
};
in
lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) {
haskell-language-server = allowInconsistentDependencies super.haskell-language-server;
fourmolu = self.fourmolu_0_14_0_0;
ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0);
hlint = super.hlint_3_6_1;
fourmolu = super.fourmolu;
ormolu = super.ormolu;
hlint = super.hlint;
stylish-haskell = super.stylish-haskell;
}
)
haskell-language-server
# HLS from 2.3 needs at least formolu 0.14.
# This means we need to bump a lot of other tools, too, because they all us ghc-lib-parser
# We do this globally to prevent inconsistent formatting or lints between hls and the command line tools.
fourmolu
ormolu
hlint
stylish-haskell
;
# Packages which need compat library for GHC < 9.6
inherit
(lib.mapAttrs
(_: addBuildDepends [ self.foldable1-classes-compat ])
super)
indexed-traversable
OneTuple
these
;
base-compat-batteries = addBuildDepends [
self.foldable1-classes-compat
self.OneTuple
] super.base-compat-batteries;
}

View File

@ -65,49 +65,18 @@ self: super: {
# Version deviations from Stackage LTS
#
doctest = doDistribute super.doctest_0_22_2;
http-api-data = doDistribute self.http-api-data_0_6; # allows base >= 4.18
some = doDistribute self.some_1_0_6;
th-abstraction = doDistribute self.th-abstraction_0_6_0_0;
th-desugar = doDistribute self.th-desugar_1_16;
semigroupoids = doDistribute self.semigroupoids_6_0_0_1;
bifunctors = doDistribute self.bifunctors_5_6_1;
base-compat = doDistribute self.base-compat_0_13_1;
base-compat-batteries = doDistribute self.base-compat-batteries_0_13_1;
fgl = doDistribute self.fgl_5_8_2_0;
# Because we bumped the version of th-abstraction above.^
aeson = doJailbreak super.aeson;
free = doJailbreak super.free;
# Because we bumped the version of base-compat above.^
cabal-plan = unmarkBroken super.cabal-plan;
cabal-plan-bounds = unmarkBroken super.cabal-plan-bounds;
# Requires filepath >= 1.4.100.0 <=> GHC >= 9.6
file-io = unmarkBroken super.file-io;
# Too strict upper bound on template-haskell
# https://github.com/mokus0/th-extras/pull/21
th-extras = doJailbreak super.th-extras;
ghc-lib = doDistribute self.ghc-lib_9_6_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;
fourmolu = doDistribute self.fourmolu_0_14_0_0;
ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0);
hlint = super.hlint_3_6_1;
# v0.1.6 forbids base >= 4.18
singleton-bool = doDistribute super.singleton-bool_0_1_7;
#
# Too strict bounds without upstream fix
#
# Forbids transformers >= 0.6
quickcheck-classes-base = doJailbreak super.quickcheck-classes-base;
# https://github.com/Gabriella439/Haskell-Break-Library/pull/3
break = doJailbreak super.break;
# Forbids mtl >= 2.3
ChasingBottoms = doJailbreak super.ChasingBottoms;
# Forbids base >= 4.18
@ -136,93 +105,23 @@ self: super: {
})
] (super.hourglass);
# Test suite doesn't compile with base-4.18 / GHC 9.6
# https://github.com/dreixel/syb/issues/40
syb = dontCheck super.syb;
# Patch 0.17.1 for support of mtl-2.3
xmonad-contrib = appendPatch
(pkgs.fetchpatch {
name = "xmonad-contrib-mtl-2.3.patch";
url = "https://github.com/xmonad/xmonad-contrib/commit/8cb789af39e93edb07f1eee39c87908e0d7c5ee5.patch";
sha256 = "sha256-ehCvVy0N2Udii/0K79dsRSBP7/i84yMoeyupvO8WQz4=";
})
(doJailbreak super.xmonad-contrib);
# Patch 0.12.0.1 for support of unix-2.8.0.0
arbtt = appendPatch
(pkgs.fetchpatch {
name = "arbtt-unix-2.8.0.0.patch";
url = "https://github.com/nomeata/arbtt/pull/168/commits/ddaac94395ac50e3d3cd34c133dda4a8e5a3fd6c.patch";
sha256 = "sha256-5Gmz23f4M+NfgduA5O+9RaPmnneAB/lAlge8MrFpJYs=";
})
super.arbtt;
# 2023-04-03: plugins disabled for hls 1.10.0.0 based on
#
haskell-language-server = super.haskell-language-server.override {
hls-floskell-plugin = null;
};
# Newer version of servant required for GHC 9.6
servant = self.servant_0_20_1;
servant-server = self.servant-server_0_20;
servant-client = self.servant-client_0_20;
servant-client-core = self.servant-client-core_0_20;
# Select versions compatible with servant_0_20_1
servant-docs = self.servant-docs_0_13;
servant-swagger = self.servant-swagger_1_2;
# Jailbreaks for servant <0.20
servant-lucid = doJailbreak super.servant-lucid;
# Jailbreak strict upper bounds: http-api-data <0.6
servant_0_20_1 = doJailbreak super.servant_0_20_1;
servant-server_0_20 = doJailbreak super.servant-server_0_20;
servant-client_0_20 = doJailbreak super.servant-client_0_20;
servant-client-core_0_20 = doJailbreak super.servant-client-core_0_20;
# Jailbreak strict upper bounds: doctest <0.22
servant-swagger_1_2 = doJailbreak super.servant-swagger_1_2;
lifted-base = dontCheck super.lifted-base;
hw-fingertree = dontCheck super.hw-fingertree;
hw-prim = dontCheck (doJailbreak super.hw-prim);
stm-containers = dontCheck super.stm-containers;
regex-tdfa = dontCheck super.regex-tdfa;
rebase = doJailbreak super.rebase_1_20_2;
rerebase = doJailbreak super.rerebase_1_20_2;
hiedb = dontCheck super.hiedb;
retrie = dontCheck super.retrie;
# https://github.com/kowainik/relude/issues/436
relude = dontCheck (doJailbreak super.relude);
ghc-exactprint = unmarkBroken (addBuildDepends (with self.ghc-exactprint.scope; [
HUnit Diff data-default extra fail free ghc-paths ordered-containers silently syb
]) super.ghc-exactprint_1_7_0_1);
inherit (pkgs.lib.mapAttrs (_: doJailbreak ) super)
hls-cabal-plugin
algebraic-graphs
co-log-core
lens
cryptohash-sha1
cryptohash-md5
ghc-trace-events
tasty-hspec
constraints-extras
tree-diff
implicit-hie-cradle
focus
hie-compat
dbus # template-haskell >=2.18 && <2.20, transformers <0.6, unix <2.8
gi-cairo-connector # mtl <2.3
haskintex # text <2
lens-family-th # template-haskell <2.19
ghc-prof # base <4.18
profiteur # vector <0.13
mfsolve # mtl <2.3
cubicbezier # mtl <2.3
dhall # template-haskell <2.20
env-guard # doctest <0.21
package-version # doctest <0.21, tasty-hedgehog <1.4
;
@ -233,9 +132,35 @@ self: super: {
# Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
gtk = doJailbreak super.gtk;
# 2023-12-23: It needs this to build under ghc-9.6.3.
# A factor of 100 is insufficent, 200 seems seems to work.
hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip;
# Doctest comments have bogus imports.
bsb-http-chunked = dontCheck super.bsb-http-chunked;
# This can be removed once https://github.com/typeclasses/ascii-predicates/pull/1
# is merged and in a release that's being tracked.
ascii-predicates = appendPatch
(pkgs.fetchpatch
{ url = "https://github.com/typeclasses/ascii-predicates/commit/2e6d9ed45987a8566f3a77eedf7836055c076d1a.patch";
name = "ascii-predicates-pull-1.patch";
relative = "ascii-predicates";
sha256 = "sha256-4JguQFZNRQpjZThLrAo13jNeypvLfqFp6o7c1bnkmZo=";
})
super.ascii-predicates;
# This can be removed once https://github.com/typeclasses/ascii-numbers/pull/1
# is merged and in a release that's being tracked.
ascii-numbers = appendPatch
(pkgs.fetchpatch
{ url = "https://github.com/typeclasses/ascii-numbers/commit/e9474ad91bc997891f1a46afd5d0bdf9b9f7d768.patch";
name = "ascii-numbers-pull-1.patch";
relative = "ascii-numbers";
sha256 = "sha256-buw1UeW57CFefEfqdDUraSyQ+H/NvCZOv6WF2ORiYQg=";
})
super.ascii-numbers;
# Fix ghc-9.6.x build errors.
libmpd = appendPatch
# https://github.com/vimus/libmpd-haskell/pull/138
@ -263,5 +188,8 @@ self: super: {
# 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).
# https://gitlab.haskell.org/ghc/ghc/-/issues/23746#note_525318
tls = if pkgs.stdenv.hostPlatform.isAarch64 then self.forceLlvmCodegenBackend super.tls else super.tls;
inherit (lib.mapAttrs (_: self.forceLlvmCodegenBackend) super)
tls
mmark
;
}

View File

@ -49,11 +49,12 @@ self: super: {
unix = null;
xhtml = null;
#
# HLS
# https://haskell-language-server.readthedocs.io/en/latest/support/plugin-support.html
#
haskell-language-server = super.haskell-language-server.override {
hls-class-plugin = null;
hls-floskell-plugin = null;
hls-fourmolu-plugin = null;
hls-gadt-plugin = null;
hls-hlint-plugin = null;
@ -65,55 +66,66 @@ self: super: {
hls-stylish-haskell-plugin = null;
};
#
# Version upgrades
alex = doDistribute self.alex_3_4_0_1;
some = doDistribute self.some_1_0_6;
tagged = doDistribute self.tagged_0_8_8;
#
th-abstraction = doDistribute self.th-abstraction_0_6_0_0;
hspec-core = doDistribute self.hspec-core_2_11_7;
hspec-meta = doDistribute self.hspec-meta_2_11_7;
hspec-discover = doDistribute self.hspec-discover_2_11_7;
hspec = doDistribute self.hspec_2_11_7;
hspec-expectations = doDistribute self.hspec-expectations_0_8_4;
bifunctors = doDistribute self.bifunctors_5_6_1;
free = doDistribute self.free_5_2;
semigroupoids = doDistribute self.semigroupoids_6_0_0_1;
doctest = doDistribute self.doctest_0_22_2;
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_8_1_20231121;
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_8_0_0;
ghc-lib = doDistribute self.ghc-lib_9_8_1_20231121;
megaparsec = doDistribute self.megaparsec_9_6_1;
tasty-hspec = doDistribute self.tasty-hspec_1_2_0_4;
hedgehog = doDistribute self.hedgehog_1_4;
rebase = doDistribute self.rebase_1_20_2;
rerebase = doDistribute self.rerebase_1_20_2;
aeson = doDistribute self.aeson_2_2_1_0;
aeson-pretty = doDistribute self.aeson-pretty_0_8_10;
attoparsec-aeson = doDistribute self.attoparsec-aeson_2_2_0_1;
ormolu = doDistribute self.ormolu_0_7_3_0;
fourmolu = doDistribute (dontCheck self.fourmolu_0_14_1_0);
xmonad = doDistribute self.xmonad_0_18_0;
hlint = doDistribute self.hlint_3_8;
#
# Jailbreaks
#
blaze-svg = doJailbreak super.blaze-svg; # base <4.19
commutative-semigroups = doJailbreak super.commutative-semigroups; # base < 4.19
diagrams-lib = doJailbreak super.diagrams-lib; # base <4.19, text <2.1
diagrams-postscript = doJailbreak super.diagrams-postscript; # base <4.19, bytestring <0.12
diagrams-svg = doJailbreak super.diagrams-svg; # base <4.19, text <2.1
ghc-trace-events = doJailbreak super.ghc-trace-events; # text < 2.1, bytestring < 0.12, base < 4.19
primitive-unlifted = doJailbreak super.primitive-unlifted; # bytestring < 0.12
statestack = doJailbreak super.statestack; # base < 4.19
newtype-generics = doJailbreak super.newtype-generics; # base < 4.19
hw-prim = doJailbreak super.hw-prim; # doctest < 0.22, ghc-prim < 0.11, hedgehog < 1.4
hw-fingertree = doJailbreak super.hw-fingertree; # deepseq <1.5, doctest < 0.22, hedgehog < 1.4
svg-builder = doJailbreak super.svg-builder; # base <4.19, bytestring <0.12, text <2.1
# Too strict bound on base, believe it or not.
# https://github.com/judah/terminfo/pull/55#issuecomment-1876894232
terminfo_0_4_1_6 = doJailbreak super.terminfo_0_4_1_6;
#
# Test suite issues
#
unordered-containers = dontCheck super.unordered-containers; # ChasingBottoms doesn't support base 4.20
lifted-base = dontCheck super.lifted-base; # doesn't compile with transformers == 0.6.*
# https://github.com/wz1000/HieDb/issues/64
hiedb = overrideCabal (drv: {
testFlags = drv.testFlags or [ ] ++ [
"--match" "!/hiedb/Command line/point-info/correctly prints type signatures/"
];
}) super.hiedb;
hourglass = dontCheck super.hourglass; # umaintained, test suite doesn't compile anymore
bsb-http-chunked = dontCheck super.bsb-http-chunked; # umaintained, test suite doesn't compile anymore
#
# Other build fixes
#
# 2023-12-23: It needs this to build under ghc-9.6.3.
# A factor of 100 is insufficent, 200 seems seems to work.
hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip;
# Fix build with text-2.x.
libmpd = appendPatch (pkgs.fetchpatch
{ url = "https://github.com/vimus/libmpd-haskell/pull/138.patch";
sha256 = "Q4fA2J/Tq+WernBo+UIMdj604ILOMlIYkG4Pr046DfM=";
})
super.libmpd;
# Symbol syntax seems to have changed in 9.8, removing a seemingly redundant colon; appears to be an overspecified assertion.
# https://github.com/wz1000/HieDb/issues/74
hiedb =
assert super.hiedb.version == "0.5.0.1";
dontCheck super.hiedb;
# Unbroken due to hspec* upgrades
hspec-api = doDistribute (unmarkBroken super.hspec-api);
}

View File

@ -28,33 +28,10 @@ default-package-overrides:
- gi-gdkx11 < 4
# 2021-11-09: ghc-bignum is bundled starting with 9.0.1; only 1.0 builds with GHCs prior to 9.2.1
- ghc-bignum == 1.0
# needs http-client >= 0.7.11 which isn't part of Stackage LTS 18
- http-client-restricted < 0.0.5
# 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
# 2023-07-06: ghcide-2.0.0.1 explicitly needs implicit-hie < 0.1.3, because some sort of
# breaking change was introduced in implicit-hie-0.1.3.0.
# https://github.com/haskell/haskell-language-server/blob/feb596592de95f09cf4ee885f3e74178161919f1/ghcide/ghcide.cabal#L107-L111
- implicit-hie < 0.1.3
- hie-bios < 0.13
# pandoc-crossref 0.3.17 needs pandoc >= 3.1.8
- pandoc-crossref < 0.3.17.0
# 2023-09-17: reflex-dom 0.6.3.0 is broken https://github.com/reflex-frp/reflex-dom/issues/462
- reflex-dom < 0.6.2.0
# Only an older version of dependent-sum-template is compatible with ghc 9.4
# https://github.com/obsidiansystems/dependent-sum-template/issues/5
- dependent-sum-template < 0.1.2
# hls-floskell-plugin 2.4 does not yet support floskell 0.11
- floskell < 0.11
# Newer daemons requires GHC 9.6
- daemons == 0.3.0
# 2024-02-22: Needed for haskell-language-server-2.6.0.0
- lsp < 2.4.0.0
# 2024-02-22: Needed for hls-fourmolu-plugin-2.6.0.0 and others
- lsp-test < 0.17.0.0
extra-packages:
- Cabal-syntax == 3.6.* # Dummy package that ensures packages depending on Cabal-syntax can work for Cabal < 3.8
@ -71,8 +48,7 @@ extra-packages:
- base16-bytestring < 1 # required for cabal-install etc.
- basement < 0.0.15 # 2022-08-30: last version to support GHC < 8.10
- bower-json == 1.0.0.1 # 2022-05-21: Needed for spago 0.20.9
- brick == 0.70.* # 2022-08-13: needed by matterhorn-50200.17.0
- brick-skylighting < 1.0 # 2022-08-13: needed by matterhorn-50200.17.0 to match brick
- brick == 0.70.* # 2022-08-13: needed by taskell
- brittany == 0.13.1.2 # 2022-09-20: needed for hls on ghc 8.8
- crackNum < 3.0 # 2021-05-21: 3.0 removed the lib which sbv 7.13 uses
- dependent-map == 0.2.4.0 # required by Hasura 1.3.1, 2020-08-20
@ -84,18 +60,9 @@ extra-packages:
- ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2
- ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2
- ghc-exactprint == 1.6.* # 2023-03-30: needed for GHC == 9.4
- ghc-lib == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 9.2
- ghc-lib == 9.4.* # 2023-03-17: preserve for GHC 9.4
- ghc-lib == 9.6.* # 2023-03-17: preserve for GHC 9.6
- ghc-lib-parser == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 9.2
- ghc-lib-parser == 9.4.* # 2023-03-17: preserve for GHC 9.4
- ghc-lib-parser == 9.6.* # 2023-10-24: preserve for GHC 9.6
- ghc-lib-parser-ex == 8.10.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 9.2
- ghc-lib-parser-ex == 9.4.* # 2023-03-17: preserve for GHC 9.4
- ghc-lib-parser-ex == 9.6.* # 2023-10-24: preserve for GHC 9.6
- ghc-syntax-highlighter == 0.0.10.* # 2023-11-20:
- gi-soup == 2.4.28 # 2023-04-05: the last version to support libsoup-2.4 (and thus be compatible with our other gi- packages)
- haddock == 2.23.* # required on GHC < 8.10.x
@ -117,8 +84,8 @@ extra-packages:
- language-docker == 11.0.0 # required by hadolint 2.12.0, 2022-11-16
- language-javascript == 0.7.0.0 # required by purescript
- lens-aeson < 1.2 # 2022-12-17: For aeson < 2.0 compat
- lsp == 1.4.0.0 # 2022-09-18: need for dhall-lsp-server 1.1.2
- lsp-types == 1.4.0.1 # 2022-09-18: need for dhall-lsp-server 1.1.2
- lsp == 2.1.0.0 # 2024-02-28: need for dhall-lsp-server unstable
- lsp-types == 2.0.2.0 # 2024-02-28: need for dhall-lsp-server unstable
- mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls
- network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15
- optparse-applicative < 0.16 # needed for niv-0.2.19
@ -126,6 +93,7 @@ extra-packages:
- fourmolu == 0.14.0.0 # 2023-11-13: for ghc-lib-parser 9.6 compat
- ormolu == 0.5.2.0 # 2023-08-08: for hls on ghc 9.0 and 9.2
- ormolu == 0.7.2.0 # 2023-11-13: for ghc-lib-parser 9.6 compat
- primitive-unlifted == 0.1.3.1 # 2024-03-16: Needed for hls on ghc 9.2
- path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2
- resolv < 0.2 # required to build cabal-install-3.10.1.0 with Stackage LTS 21
- sbv == 7.13 # required for pkgs.petrinizer
@ -137,12 +105,10 @@ extra-packages:
- weeder == 2.2.* # 2022-02-21: preserve for GHC 8.10.7
- weeder == 2.3.* # 2022-05-31: preserve for GHC 9.0.2
- weeder == 2.4.* # 2023-02-02: preserve for GHC 9.2.*
- commonmark-extensions < 0.2.3.3 # 2022-12-17: required by emanote 1.0.0.0 (to avoid a bug in 0.2.3.3)
- retrie < 1.2.0.0 # 2022-12-30: required for hls on ghc < 9.2
- ghc-tags == 1.5.* # 2023-02-18: preserve for ghc-lib == 9.2.*
- ghc-tags == 1.6.* # 2023-02-18: preserve for ghc-lib == 9.4.*
- shake-cabal < 0.2.2.3 # 2023-07-01: last version to support Cabal 3.6.*
- unix-compat < 0.7 # 2023-07-04: Need System.PosixCompat.User for git-annex
- algebraic-graphs < 0.7 # 2023-08-14: Needed for building weeder < 2.6.0
- fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10
@ -180,6 +146,7 @@ package-maintainers:
danielrolls:
- byte-count-reader
- shellify
- specup
domenkozar:
- cachix
- cachix-api
@ -300,13 +267,11 @@ package-maintainers:
- hlint
- hmatrix
- hspec-discover
- iCalendar
- matrix-client
- optics
- pandoc
- pandoc-cli
- pandoc-crossref
- paths
- postgresql-simple
- purebred-email
- reflex-dom
@ -773,6 +738,7 @@ supported-platforms:
swisstable: [ platforms.x86_64 ] # Needs AVX2
systemd-api: [ platforms.linux ]
tasty-papi: [ platforms.linux ] # limited by pkgs.papi
tcod-haskell: [ platforms.linux ] # limited by pkgs.libtcod
udev: [ platforms.linux ]
vty-windows: [ platforms.windows ] # depends on Win32
Win32-console: [ platforms.windows ]

View File

@ -114,7 +114,6 @@ self: super: builtins.intersectAttrs super {
}))
super)
hls-brittany-plugin
hls-stan-plugin
hls-floskell-plugin
hls-fourmolu-plugin
hls-overloaded-record-dot-plugin
@ -123,6 +122,9 @@ self: super: builtins.intersectAttrs super {
# PLUGINS WITH DISABLED TESTS
# 2023-04-01: TODO: We should reenable all these tests to figure if they are still broken.
inherit (pkgs.lib.mapAttrs (_: dontCheck) super)
# Tests require ghcide-test-utils which is broken
hls-semantic-tokens-plugin
# Tests have file permissions expections that dont work with the nix store.
hls-gadt-plugin
@ -173,6 +175,9 @@ self: super: builtins.intersectAttrs super {
# 2023-04-03: https://github.com/haskell/haskell-language-server/issues/3549
hls-retrie-plugin
# 2024-01-25: Golden files are missing
hls-stan-plugin
;
###########################################
@ -428,7 +433,6 @@ self: super: builtins.intersectAttrs super {
hasql-interpolate = dontCheck super.hasql-interpolate;
hasql-notifications = dontCheck super.hasql-notifications;
hasql-pool = dontCheck super.hasql-pool;
hasql-pool_0_10_0_1 = doDistribute (dontCheck super.hasql-pool_0_10_0_1);
hasql-transaction = dontCheck super.hasql-transaction;
# Test suite requires a running postgresql server,
@ -466,6 +470,7 @@ self: super: builtins.intersectAttrs super {
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK32; };
shellify = enableSeparateBinOutput super.shellify;
specup = enableSeparateBinOutput super.specup;
# Test suite wants to connect to $DISPLAY.
bindings-GLFW = dontCheck super.bindings-GLFW;
@ -652,6 +657,8 @@ self: super: builtins.intersectAttrs super {
# tests require working stack installation with all-cabal-hashes cloned in $HOME
stackage-curator = dontCheck super.stackage-curator;
stack = self.generateOptparseApplicativeCompletions [ "stack" ] super.stack;
# hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
io-streams = enableCabalFlag "NoInteractiveTests" super.io-streams;
@ -791,6 +798,7 @@ self: super: builtins.intersectAttrs super {
substituteInPlace Test.hs \
--replace ', testCase "crypto" test_crypto' ""
'' + (drv.postPatch or "");
# Ensure git-annex uses the exact same coreutils it saw at build-time.
# This is especially important on Darwin but also in Linux environments
# where non-GNU coreutils are used by default.
@ -801,6 +809,19 @@ self: super: builtins.intersectAttrs super {
buildTools = [
pkgs.buildPackages.makeWrapper
] ++ (drv.buildTools or []);
# Git annex provides a restricted login shell. Setting
# passthru.shellPath here allows a user's login shell to be set to
# `git-annex-shell` by making `shell = haskellPackages.git-annex`.
# https://git-annex.branchable.com/git-annex-shell/
passthru.shellPath = "/bin/git-annex-shell";
# Install man pages which is no longer done by Setup.hs
# TODO(@sternenseemann): figure out why install-desktops wants to create /usr
# and run that, too.
postInstall = drv.postInstall or "" + ''
make install-mans "DESTDIR=$out" PREFIX=
'';
}) (super.git-annex.override {
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null;
@ -1082,7 +1103,7 @@ self: super: builtins.intersectAttrs super {
rel8 = pkgs.lib.pipe super.rel8 [
(addTestToolDepend pkgs.postgresql)
# https://github.com/NixOS/nixpkgs/issues/198495
(overrideCabal { doCheck = pkgs.postgresql.doCheck; })
(dontCheckIf (!pkgs.postgresql.doCheck))
];
# Wants running postgresql database accessible over ip, so postgresqlTestHook
@ -1157,10 +1178,7 @@ self: super: builtins.intersectAttrs super {
# Some hash implementations are x86 only, but part of the test suite.
# So executing and building it on non-x86 platforms will always fail.
hashes = overrideCabal {
doCheck = with pkgs.stdenv; hostPlatform == buildPlatform
&& buildPlatform.isx86;
} super.hashes;
hashes = dontCheckIf (!pkgs.stdenv.hostPlatform.isx86) super.hashes;
# Tries to access network
aws-sns-verify = dontCheck super.aws-sns-verify;
@ -1198,11 +1216,9 @@ self: super: builtins.intersectAttrs super {
{
fourmolu = fourmoluTestFix super.fourmolu;
fourmolu_0_14_0_0 = fourmoluTestFix super.fourmolu_0_14_0_0;
fourmolu_0_14_1_0 = fourmoluTestFix super.fourmolu_0_14_1_0;
})
fourmolu
fourmolu_0_14_0_0
fourmolu_0_14_1_0
;
@ -1339,6 +1355,10 @@ self: super: builtins.intersectAttrs super {
webkit2gtk3-javascriptcore
gi-webkit2
gi-webkit2webextension
gi-gtk_4_0_8
gi-gdk_4_0_7
gi-gsk
gi-adwaita
;
# Makes the mpi-hs package respect the choice of mpi implementation in Nixpkgs.
@ -1360,4 +1380,12 @@ self: super: builtins.intersectAttrs super {
mpi-hs-cereal
mpi-hs-binary
;
postgresql-libpq = overrideCabal (drv: {
# Using use-pkg-config flag, because pg_config won't work when cross-compiling.
configureFlags = drv.configureFlags or [] ++ [ "-fuse-pkg-config" ];
# Move postgresql from SystemDepends to PkgconfigDepends
libraryPkgconfigDepends = drv.librarySystemDepends;
librarySystemDepends = [];
}) super.postgresql-libpq;
}

View File

@ -27,10 +27,10 @@ in
, buildFlags ? []
, haddockFlags ? []
, description ? null
, doCheck ? !isCross && lib.versionOlder "7.4" ghc.version
, doCheck ? !isCross
, doBenchmark ? false
, doHoogle ? true
, doHaddockQuickjump ? doHoogle && lib.versionAtLeast ghc.version "8.6"
, doHaddockQuickjump ? doHoogle
, doInstallIntermediates ? false
, editedCabalFile ? null
, enableLibraryProfiling ? !(ghc.isGhcjs or false)
@ -41,7 +41,7 @@ in
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic && (ghc.enableShared or false)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
, enableStaticLibraries ? !(stdenv.hostPlatform.isWindows or stdenv.hostPlatform.isWasm)
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && lib.versionAtLeast ghc.version "8.4"
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
# On macOS, statically linking against system frameworks is not supported;
# see https://developer.apple.com/library/content/qa/qa1118/_index.html
@ -125,23 +125,17 @@ assert stdenv.hostPlatform.isWasm -> enableStaticLibraries == false;
let
inherit (lib) optional optionals optionalString versionOlder versionAtLeast
inherit (lib) optional optionals optionalString versionAtLeast
concatStringsSep enableFeature optionalAttrs;
isGhcjs = ghc.isGhcjs or false;
isHaLVM = ghc.isHaLVM or false;
packageDbFlag = if isGhcjs || isHaLVM || versionOlder "7.6" ghc.version
then "package-db"
else "package-conf";
# GHC used for building Setup.hs
#
# Same as our GHC, unless we're cross, in which case it is native GHC with the
# same version, or ghcjs, in which case its the ghc used to build ghcjs.
nativeGhc = buildHaskellPackages.ghc;
nativePackageDbFlag = if versionOlder "7.6" nativeGhc.version
then "package-db"
else "package-conf";
# the target dir for haddock documentation
docdir = docoutput: docoutput + "/share/doc/" + pname + "-" + version;
@ -233,23 +227,20 @@ let
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
(optionalString enableParallelBuilding "--ghc-options=${parallelBuildingFlags}")
(optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp")
(enableFeature (enableDeadCodeElimination && !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs")
(enableFeature enableLibraryProfiling "library-profiling")
(optionalString ((enableExecutableProfiling || enableLibraryProfiling) && versionOlder "8" ghc.version) "--profiling-detail=${profilingDetail}")
(enableFeature enableExecutableProfiling (if versionOlder ghc.version "8" then "executable-profiling" else "profiling"))
(optionalString (enableExecutableProfiling || enableLibraryProfiling) "--profiling-detail=${profilingDetail}")
(enableFeature enableExecutableProfiling "profiling")
(enableFeature enableSharedLibraries "shared")
(optionalString (versionAtLeast ghc.version "7.10") (enableFeature doCoverage "coverage"))
(optionalString (versionOlder "8.4" ghc.version) (enableFeature enableStaticLibraries "static"))
(optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic"))
(optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests"))
(enableFeature doCoverage "coverage")
(enableFeature enableStaticLibraries "static")
(enableFeature enableSharedExecutables "executable-dynamic")
(enableFeature doCheck "tests")
(enableFeature doBenchmark "benchmarks")
"--enable-library-vanilla" # TODO: Should this be configurable?
(enableFeature enableLibraryForGhci "library-for-ghci")
] ++ optionals (enableDeadCodeElimination && (lib.versionOlder "8.0.1" ghc.version)) [
"--ghc-option=-split-sections"
] ++ optionals dontStrip [
"--disable-library-stripping"
"--disable-executable-stripping"
(enableFeature enableDeadCodeElimination "split-sections")
(enableFeature (!dontStrip) "library-stripping")
(enableFeature (!dontStrip) "executable-stripping")
] ++ optionals isGhcjs [
"--ghcjs"
] ++ optionals isCross ([
@ -264,7 +255,7 @@ let
postPhases = optional doInstallIntermediates "installIntermediatesPhase";
setupCompileFlags = [
(optionalString (!coreSetup) "-${nativePackageDbFlag}=$setupPackageConfDir")
(optionalString (!coreSetup) "-package-db=$setupPackageConfDir")
(optionalString enableParallelBuilding parallelBuildingFlags)
"-threaded" # https://github.com/haskell/cabal/issues/2398
"-rtsopts" # allow us to pass RTS flags to the generated Setup executable
@ -433,7 +424,7 @@ stdenv.mkDerivation ({
for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do
${buildPkgDb nativeGhc "$setupPackageConfDir"}
done
${nativeGhcCommand}-pkg --${nativePackageDbFlag}="$setupPackageConfDir" recache
${nativeGhcCommand}-pkg --package-db="$setupPackageConfDir" recache
''
# For normal components
+ ''
@ -445,9 +436,6 @@ stdenv.mkDerivation ({
if [ -d "$p/lib" ]; then
configureFlags+=" --extra-lib-dirs=$p/lib"
fi
''
# It is not clear why --extra-framework-dirs does work fine on Linux
+ optionalString (!stdenv.buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") ''
if [[ -d "$p/Library/Frameworks" ]]; then
configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
fi
@ -490,7 +478,7 @@ stdenv.mkDerivation ({
sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," "$f"
done
'') + ''
${ghcCommand}-pkg --${packageDbFlag}="$packageConfDir" recache
${ghcCommand}-pkg --package-db="$packageConfDir" recache
runHook postSetupCompilerEnvironment
'';
@ -622,11 +610,6 @@ stdenv.mkDerivation ({
done
''}
${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"}
${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && lib.versionOlder ghc.version "7.10") ''
for exe in "${binDir}/"* ; do
install_name_tool -add_rpath "$out/${ghcLibdir}/${pname}-${version}" "$exe"
done
''}
${optionalString enableSeparateDocOutput ''
for x in ${docdir "$doc"}"/html/src/"*.html; do

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +0,0 @@
{ mkDerivation, aeson, async, attoparsec, base, base64-bytestring
, bifunctors, binary, binary-conduit, boost, bytestring, Cabal
, cabal-pkg-config-version-hook, cachix, cachix-api, conduit
, conduit-extra, containers, directory, dlist, exceptions, filepath
, hercules-ci-api, hercules-ci-api-agent, hercules-ci-api-core
, hercules-ci-cnix-expr, hercules-ci-cnix-store, hostname, hspec
, hspec-discover, http-client, http-client-tls, http-conduit, HUnit
, inline-c, inline-c-cpp, katip, lens, lens-aeson, lib
, lifted-async, lifted-base, monad-control, mtl, network
, network-uri, nix, optparse-applicative, process, process-extras
, profunctors, protolude, QuickCheck, safe-exceptions, scientific
, servant, servant-auth-client, servant-client, servant-client-core
, stm, tagged, temporary, text, time, tls, tomland, transformers
, transformers-base, unbounded-delays, unix, unliftio
, unliftio-core, unordered-containers, uuid, vector, websockets
, wuss
}:
mkDerivation {
pname = "hercules-ci-agent";
version = "0.10.1";
sha256 = "a87e1b9ee650c493137d98370df8b3a9d842eea5b3a4c935c34275267ccf94d5";
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ];
libraryHaskellDepends = [
aeson async base binary binary-conduit bytestring conduit
containers directory dlist exceptions filepath
hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr
hercules-ci-cnix-store katip lens lens-aeson lifted-async
lifted-base monad-control mtl network network-uri process
process-extras protolude safe-exceptions stm tagged temporary text
time tls transformers transformers-base unbounded-delays unix
unliftio unliftio-core uuid vector websockets wuss
];
executableHaskellDepends = [
aeson async attoparsec base base64-bytestring bifunctors binary
binary-conduit bytestring cachix cachix-api conduit conduit-extra
containers directory dlist exceptions filepath hercules-ci-api
hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr
hercules-ci-cnix-store hostname http-client http-client-tls
http-conduit inline-c inline-c-cpp katip lens lens-aeson
lifted-async lifted-base monad-control mtl network network-uri
optparse-applicative process process-extras profunctors protolude
safe-exceptions scientific servant servant-auth-client
servant-client servant-client-core stm temporary text time tomland
transformers transformers-base unix unliftio unliftio-core
unordered-containers uuid vector websockets wuss
];
executableSystemDepends = [ boost ];
executablePkgconfigDepends = [ nix ];
testHaskellDepends = [
aeson async attoparsec base bifunctors binary binary-conduit
bytestring conduit containers exceptions filepath
hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-store
hspec HUnit katip lens lens-aeson lifted-async lifted-base
monad-control mtl process profunctors protolude QuickCheck
safe-exceptions scientific stm tagged temporary text tomland
transformers transformers-base unliftio-core unordered-containers
uuid vector
];
testToolDepends = [ hspec-discover ];
homepage = "https://docs.hercules-ci.com";
description = "Runs Continuous Integration tasks on your machines";
license = lib.licenses.asl20;
}

View File

@ -1,27 +0,0 @@
{ mkDerivation, aeson, base, base64-bytestring-type, bytestring
, containers, cookie, deepseq, exceptions, hashable
, hercules-ci-api-core, hspec, http-api-data, http-media, lens
, lens-aeson, lib, memory, network-uri, profunctors, QuickCheck
, quickcheck-classes, servant, servant-auth, string-conv, swagger2
, text, time, unordered-containers, uuid, vector
}:
mkDerivation {
pname = "hercules-ci-api-agent";
version = "0.5.1.0";
sha256 = "4d98e5a3824b09e3989251787dc0e3c9724011282eec343065c70ba9f1565ee6";
libraryHaskellDepends = [
aeson base base64-bytestring-type bytestring containers cookie
deepseq exceptions hashable hercules-ci-api-core http-api-data
http-media lens lens-aeson memory servant servant-auth string-conv
swagger2 text time unordered-containers uuid vector
];
testHaskellDepends = [
aeson base bytestring containers cookie exceptions hashable
hercules-ci-api-core hspec http-api-data http-media lens memory
network-uri profunctors QuickCheck quickcheck-classes servant
servant-auth string-conv swagger2 text time uuid vector
];
homepage = "https://github.com/hercules-ci/hercules-ci-agent#readme";
description = "API definition for Hercules CI Agent to talk to hercules-ci.com or Hercules CI Enterprise";
license = lib.licenses.asl20;
}

View File

@ -1,22 +0,0 @@
{ mkDerivation, aeson, base, bytestring, containers, cookie
, deepseq, exceptions, hashable, http-api-data, http-media, katip
, lens, lib, lifted-base, memory, monad-control, openapi3
, safe-exceptions, servant, servant-auth, servant-auth-swagger
, servant-openapi3, servant-swagger, servant-swagger-ui-core
, string-conv, swagger2, text, time, uuid
}:
mkDerivation {
pname = "hercules-ci-api-core";
version = "0.1.6.0";
sha256 = "0707c0792223993de583d42144a9e55fb510e6436a67d130d800df23457a1d93";
libraryHaskellDepends = [
aeson base bytestring containers cookie deepseq exceptions hashable
http-api-data http-media katip lens lifted-base memory
monad-control openapi3 safe-exceptions servant servant-auth
servant-auth-swagger servant-openapi3 servant-swagger
servant-swagger-ui-core string-conv swagger2 text time uuid
];
homepage = "https://github.com/hercules-ci/hercules-ci-agent#readme";
description = "Types and convenience modules use across Hercules CI API packages";
license = lib.licenses.asl20;
}

View File

@ -1,39 +0,0 @@
{ mkDerivation, aeson, base, bytestring, containers, cookie
, exceptions, hashable, hercules-ci-api-core, hspec, http-api-data
, http-media, lens, lens-aeson, lib, memory, network-uri, openapi3
, profunctors, protolude, QuickCheck, quickcheck-classes, servant
, servant-auth, servant-auth-swagger, servant-openapi3
, servant-swagger, servant-swagger-ui-core, string-conv, swagger2
, text, time, uuid, vector
}:
mkDerivation {
pname = "hercules-ci-api";
version = "0.8.2.0";
sha256 = "d7e5c0f92c614d0251e11aed56544989c612dd2311dc5b6e7b3fa727c187d256";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bytestring containers cookie exceptions hashable
hercules-ci-api-core http-api-data http-media lens lens-aeson
memory network-uri openapi3 profunctors servant servant-auth
servant-auth-swagger servant-openapi3 servant-swagger
servant-swagger-ui-core string-conv swagger2 text time uuid
];
executableHaskellDepends = [
aeson base bytestring containers cookie exceptions hashable
http-api-data http-media lens memory network-uri openapi3
profunctors servant servant-auth servant-auth-swagger
servant-openapi3 servant-swagger servant-swagger-ui-core
string-conv swagger2 text time uuid
];
testHaskellDepends = [
aeson base bytestring containers exceptions hashable
hercules-ci-api-core hspec http-api-data http-media protolude
QuickCheck quickcheck-classes servant servant-auth string-conv text
time uuid vector
];
homepage = "https://github.com/hercules-ci/hercules-ci-agent#readme";
description = "Hercules CI API definition with Servant";
license = lib.licenses.asl20;
mainProgram = "hercules-gen-swagger";
}

View File

@ -1,43 +0,0 @@
{ mkDerivation, aeson, aeson-pretty, async, atomic-write
, attoparsec, base, bytestring, conduit, containers, data-has
, directory, exceptions, filepath, hercules-ci-agent
, hercules-ci-api, hercules-ci-api-agent, hercules-ci-api-core
, hercules-ci-cnix-expr, hercules-ci-cnix-store
, hercules-ci-optparse-applicative, hostname, hspec, http-client
, http-client-tls, http-types, inline-c-cpp, katip, lens
, lens-aeson, lib, lifted-base, monad-control, network-uri, process
, protolude, QuickCheck, retry, rio, safe-exceptions, servant
, servant-auth-client, servant-client, servant-client-core
, servant-conduit, temporary, text, tls, transformers
, transformers-base, unix, unliftio, unliftio-core
, unordered-containers, uuid
}:
mkDerivation {
pname = "hercules-ci-cli";
version = "0.3.7";
sha256 = "bf0a7d9dc26eaff45a1b61f43bef5fb43a8d546b12083f37d450c5b8a7449ec0";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson aeson-pretty async atomic-write attoparsec base bytestring
conduit containers data-has directory exceptions filepath
hercules-ci-agent hercules-ci-api hercules-ci-api-agent
hercules-ci-api-core hercules-ci-cnix-expr hercules-ci-cnix-store
hercules-ci-optparse-applicative hostname http-client
http-client-tls http-types inline-c-cpp katip lens lens-aeson
lifted-base monad-control network-uri process protolude retry rio
safe-exceptions servant servant-auth-client servant-client
servant-client-core servant-conduit temporary text tls transformers
transformers-base unix unliftio unliftio-core unordered-containers
uuid
];
executableHaskellDepends = [ base ];
testHaskellDepends = [
aeson base bytestring containers hspec protolude QuickCheck
unordered-containers
];
homepage = "https://docs.hercules-ci.com";
description = "The hci command for working with Hercules CI";
license = lib.licenses.asl20;
mainProgram = "hci";
}

View File

@ -1,30 +0,0 @@
{ mkDerivation, aeson, base, boost, bytestring, Cabal
, cabal-pkg-config-version-hook, conduit, containers, directory
, exceptions, filepath, hercules-ci-cnix-store, hspec
, hspec-discover, inline-c, inline-c-cpp, lib, nix, process
, protolude, QuickCheck, scientific, temporary, text, unliftio
, unordered-containers, vector
}:
mkDerivation {
pname = "hercules-ci-cnix-expr";
version = "0.3.6.1";
sha256 = "f967e0da57a7aabef256d8843171df51988690036af866537e29ac6ebde76aa5";
enableSeparateDataOutput = true;
setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ];
libraryHaskellDepends = [
aeson base bytestring conduit containers directory exceptions
filepath hercules-ci-cnix-store inline-c inline-c-cpp protolude
scientific text unliftio unordered-containers vector
];
librarySystemDepends = [ boost ];
libraryPkgconfigDepends = [ nix ];
testHaskellDepends = [
aeson base bytestring containers filepath hercules-ci-cnix-store
hspec process protolude QuickCheck scientific temporary text
unordered-containers vector
];
testToolDepends = [ hspec-discover ];
homepage = "https://docs.hercules-ci.com";
description = "Bindings for the Nix evaluator";
license = lib.licenses.asl20;
}

View File

@ -1,26 +0,0 @@
{ mkDerivation, base, boost, bytestring, Cabal
, cabal-pkg-config-version-hook, conduit, containers, exceptions
, hspec, hspec-discover, inline-c, inline-c-cpp, lib, nix
, protolude, template-haskell, temporary, text, unix, unliftio-core
, vector
}:
mkDerivation {
pname = "hercules-ci-cnix-store";
version = "0.3.5.0";
sha256 = "395a311514ab5121bf71adc0f67a53b152a091114725fb750c08767a047c7280";
setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ];
libraryHaskellDepends = [
base bytestring conduit containers inline-c inline-c-cpp protolude
template-haskell unix unliftio-core vector
];
librarySystemDepends = [ boost ];
libraryPkgconfigDepends = [ nix ];
testHaskellDepends = [
base bytestring containers exceptions hspec inline-c inline-c-cpp
protolude temporary text
];
testToolDepends = [ hspec-discover ];
homepage = "https://docs.hercules-ci.com";
description = "Haskell bindings for Nix's libstore";
license = lib.licenses.asl20;
}

View File

@ -1,37 +0,0 @@
{ mkDerivation, aeson, aeson-pretty, base, base-compat-batteries
, bytestring, Cabal, cabal-doctest, containers, cookie, doctest
, generics-sop, Glob, hashable, hspec, hspec-discover, http-media
, HUnit, insert-ordered-containers, lens, lib, mtl, optics-core
, optics-th, QuickCheck, quickcheck-instances, scientific
, template-haskell, text, time, transformers, unordered-containers
, utf8-string, uuid-types, vector
}:
mkDerivation {
pname = "openapi3";
version = "3.2.4";
sha256 = "dbcb90464b4712a03c37fa3fcaca3a6784ace2794d85730a8a8c5d9b3ea14ba0";
revision = "1";
editedCabalFile = "08ikd506fxz3pllg5w8lx9yn9qfqlx9il9xwzz7s17yxn5k3xmnk";
isLibrary = true;
isExecutable = true;
setupHaskellDepends = [ base Cabal cabal-doctest ];
libraryHaskellDepends = [
aeson aeson-pretty base base-compat-batteries bytestring containers
cookie generics-sop hashable http-media insert-ordered-containers
lens mtl optics-core optics-th QuickCheck scientific
template-haskell text time transformers unordered-containers
uuid-types vector
];
executableHaskellDepends = [ aeson base lens text ];
testHaskellDepends = [
aeson base base-compat-batteries bytestring containers doctest Glob
hashable hspec HUnit insert-ordered-containers lens mtl QuickCheck
quickcheck-instances template-haskell text time
unordered-containers utf8-string vector
];
testToolDepends = [ hspec-discover ];
homepage = "https://github.com/biocad/openapi3";
description = "OpenAPI 3.0 data model";
license = lib.licenses.bsd3;
mainProgram = "example";
}

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE[0]}")"
cabal2nix cabal://hercules-ci-agent >hercules-ci-agent.nix
cabal2nix cabal://hercules-ci-api >hercules-ci-api.nix
cabal2nix cabal://hercules-ci-api-agent >hercules-ci-api-agent.nix
cabal2nix cabal://hercules-ci-api-core >hercules-ci-api-core.nix
cabal2nix cabal://hercules-ci-cli >hercules-ci-cli.nix
cabal2nix cabal://hercules-ci-cnix-expr >hercules-ci-cnix-expr.nix
cabal2nix cabal://hercules-ci-cnix-store >hercules-ci-cnix-store.nix
cabal2nix cabal://openapi3 >openapi3.nix

View File

@ -108,6 +108,11 @@ rec {
of test suites listed in the package description file.
*/
dontCheck = overrideCabal (drv: { doCheck = false; });
/* The dontCheckIf variant sets doCheck = false if the condition
applies. In any other case the previously set/default value is used.
This prevents accidentally re-enabling tests in a later override.
*/
dontCheckIf = condition: if condition then dontCheck else lib.id;
/* doBenchmark enables dependency checking and compilation
for benchmarks listed in the package description file.
@ -398,7 +403,7 @@ rec {
# Some information about which phases should be run.
controlPhases = ghc: let inherit (ghcInfo ghc) isCross; in
{ doCheck ? !isCross && (lib.versionOlder "7.4" ghc.version)
{ doCheck ? !isCross
, doBenchmark ? false
, ...
}: { inherit doCheck doBenchmark; };

View File

@ -105,6 +105,11 @@ rec {
of test suites listed in the package description file.
*/
dontCheck = compose.dontCheck;
/* The dontCheckIf variant sets doCheck = false if the condition
applies. In any other case the previously set/default value is used.
This prevents accidentally re-enabling tests in a later override.
*/
dontCheckIf = drv: condition: compose.dontCheckIf condition drv;
/* doBenchmark enables dependency checking, compilation and execution
for benchmarks listed in the package description file.

View File

@ -199,12 +199,16 @@ in package-set { inherit pkgs lib callPackage; } self // {
# for any version that has been released on hackage as opposed to only
# versions released before whatever version of all-cabal-hashes you happen
# to be currently using.
callHackageDirect = {pkg, ver, sha256}:
callHackageDirect = {pkg, ver, sha256, rev ? { revision = null; sha256 = null; }}: args:
let pkgver = "${pkg}-${ver}";
in self.callCabal2nix pkg (pkgs.fetchzip {
url = "mirror://hackage/${pkgver}/${pkgver}.tar.gz";
inherit sha256;
});
firstRevision = self.callCabal2nix pkg (pkgs.fetchzip {
url = "mirror://hackage/${pkgver}/${pkgver}.tar.gz";
inherit sha256;
}) args;
in overrideCabal (orig: {
revision = rev.revision;
editedCabalFile = rev.sha256;
}) firstRevision;
# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nixWithOptions = name: src: extraCabal2nixOptions: args:
@ -635,7 +639,7 @@ in package-set { inherit pkgs lib callPackage; } self // {
Type: drv -> drv
*/
forceLlvmCodegenBackend = haskellLib.overrideCabal (drv: {
forceLlvmCodegenBackend = overrideCabal (drv: {
configureFlags = drv.configureFlags or [ ] ++ [ "--ghc-option=-fllvm" ];
buildTools = drv.buildTools or [ ] ++ [ self.llvmPackages.llvm ];
});

View File

@ -41,13 +41,4 @@ self: super: {
# cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix
hercules-ci-optparse-applicative = self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix {};
# Hotfixes
hercules-ci-agent = self.callPackage ./hotfixes/hercules-ci-agent.nix {};
hercules-ci-api = self.callPackage ./hotfixes/hercules-ci-api.nix {};
hercules-ci-api-agent = self.callPackage ./hotfixes/hercules-ci-api-agent.nix {};
hercules-ci-api-core = self.callPackage ./hotfixes/hercules-ci-api-core.nix {};
hercules-ci-cli = self.callPackage ./hotfixes/hercules-ci-cli.nix {};
hercules-ci-cnix-expr = self.callPackage ./hotfixes/hercules-ci-cnix-expr.nix {};
hercules-ci-cnix-store = self.callPackage ./hotfixes/hercules-ci-cnix-store.nix {};
openapi3 = self.callPackage ./hotfixes/openapi3.nix {};
}

View File

@ -47,8 +47,6 @@ let
isGhcjs = ghc.isGhcjs or false;
isHaLVM = ghc.isHaLVM or false;
ghc761OrLater = isGhcjs || isHaLVM || lib.versionOlder "7.6.1" ghc.version;
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
ghcCommandCaps= lib.toUpper ghcCommand';
@ -122,7 +120,7 @@ symlinkJoin {
for prg in ${ghcCommand}-pkg ${ghcCommand}-pkg-${ghc.version}; do
if [[ -x "${ghc}/bin/$prg" ]]; then
rm -f $out/bin/$prg
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=${packageCfgDir}"
fi
done

View File

@ -1,17 +1,19 @@
{ mkDerivation, ansi-wl-pprint, base, fetchFromGitHub, lib, process, QuickCheck
{ mkDerivation, base, fetchFromGitHub, lib, prettyprinter
, prettyprinter-ansi-terminal, process, QuickCheck, text
, transformers, transformers-compat
}:
mkDerivation {
pname = "hercules-ci-optparse-applicative";
version = "0.16.1.0";
version = "0.18.1.0";
src = fetchFromGitHub {
owner = "hercules-ci";
repo = "optparse-applicative";
rev = "3d20deefbef2e66d3c075facc5d01c1aede34f3c";
sha256 = "sha256-FnFbPvy5iITT7rAjZBBUNQdo3UDP2z8iLg0MiIdXMdo=";
sha256 = "1cgxc80zfgzk4rrhspnlj7790jb0ddq7ybj7qjan5xmjjir90763";
rev = "a123939663ba1cd0f1750343f1c6b9864ac21207";
};
libraryHaskellDepends = [
ansi-wl-pprint base process transformers transformers-compat
base prettyprinter prettyprinter-ansi-terminal process text
transformers transformers-compat
];
testHaskellDepends = [ base QuickCheck ];
homepage = "https://github.com/hercules-ci/optparse-applicative";

View File

@ -0,0 +1,13 @@
diff --git a/hadrian.cabal b/hadrian.cabal
index 70fded11aa..3893537f05 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -150,7 +150,7 @@ executable hadrian
, TypeOperators
other-extensions: MultiParamTypeClasses
, TypeFamilies
- build-depends: Cabal >= 3.2 && < 3.9
+ build-depends: Cabal >= 3.2 && < 3.11
, base >= 4.11 && < 5
, bytestring >= 0.10 && < 0.13
, containers >= 0.5 && < 0.7

View File

@ -23,6 +23,10 @@ mkDerivation {
'';
patches = lib.optionals (!enableHyperlinkedSource) [
./disable-hyperlinked-source.patch
] ++ lib.optionals (lib.elem ghcVersion [ "9.8.1" "9.8.2" ]) [
# Incorrect bounds on Cabal
# https://gitlab.haskell.org/ghc/ghc/-/issues/24100
./hadrian-9.8.1-allow-Cabal-3.10.patch
];
# Overwrite UserSettings.hs with a provided custom one
postPatch = lib.optionalString (userSettings != null) ''

View File

@ -8,7 +8,7 @@
# Run
# $ nix-instantiate --eval -E 'with import <nixpkgs> {}; builtins.attrNames pkgs.haskell.packages'
# to list for your nixpkgs version.
, supportedGhcVersions ? [ "94" ]
, supportedGhcVersions ? [ "96" ]
# Whether to build hls with the dynamic run-time system.
# See https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#static-binaries for more information.

View File

@ -6,15 +6,6 @@ let
in
(haskell.lib.compose.overrideCabal (drv: {
# pandoc-cli's pandoc executable report the libraries version via --version, match that,
inherit (static.scope.pandoc) version;
# but prevent haskellPackages.mkDerivation from recomputing the src tarball based on that.
inherit (static) src;
# Make it possible to recover the cli version if necessary.
passthru = drv.passthru or {} // {
cliVersion = static.version;
};
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed];
buildTools = (drv.buildTools or []) ++ [
@ -37,7 +28,7 @@ in
-t ${haskellPackages.warp} \
$out/bin/pandoc
remove-references-to \
-t ${haskellPackages.pandoc_3_1_11} \
-t ${haskellPackages.pandoc} \
$out/bin/pandoc
'' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
mkdir -p $out/share/bash-completion/completions
@ -53,5 +44,5 @@ in
# lead to a transitive runtime dependency on the whole GHC distribution.
# This should ideally be fixed in haskellPackages (or even Cabal),
# but a minimal pandoc is important enough to patch it manually.
disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.warp haskellPackages.pandoc_3_1_11 ];
disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.warp haskellPackages.pandoc ];
})

View File

@ -1,7 +1,7 @@
{ lib, writeText, haskellPackages, cabal-install }:
(haskellPackages.shellFor {
packages = p: [ p.constraints p.linear ];
packages = p: [ p.constraints p.cereal ];
# WARNING: When updating this, make sure that the libraries passed to
# `extraDependencies` are not actually transitive dependencies of libraries in
# `packages` above. We explicitly want to test that it is possible to specify
@ -14,8 +14,8 @@
mkdir -p "$sourceRoot"
cd "$sourceRoot"
tar -xf ${haskellPackages.constraints.src}
tar -xf ${haskellPackages.linear.src}
cp ${writeText "cabal.project" "packages: constraints* linear*"} cabal.project
tar -xf ${haskellPackages.cereal.src}
cp ${writeText "cabal.project" "packages: constraints* cereal*"} cabal.project
'';
buildPhase = ''
export HOME=$(mktemp -d)
@ -37,7 +37,7 @@
fi
# Check packages arg
cabal v2-build --offline --verbose constraints linear --ghc-options="-O0 -j$NIX_BUILD_CORES"
cabal v2-build --offline --verbose constraints cereal --ghc-options="-O0 -j$NIX_BUILD_CORES"
'';
installPhase = ''
touch $out

View File

@ -9,10 +9,10 @@
}:
mkDerivation {
pname = "nix-output-monitor";
version = "2.1.1";
version = "2.1.2";
src = fetchzip {
url = "https://code.maralorn.de/maralorn/nix-output-monitor/archive/v2.1.1.tar.gz";
sha256 = "1k1gdx7yczz7xm096i8lk09zq6yw1yj8izx6czymfd4qqwj2y49l";
url = "https://code.maralorn.de/maralorn/nix-output-monitor/archive/v2.1.2.tar.gz";
sha256 = "192h67myibpc2bw5ng60qi4m9jyjd9cf14aba4ps44ayjw95wkc0";
};
isLibrary = true;
isExecutable = true;

View File

@ -13241,6 +13241,8 @@ with pkgs;
sockdump = callPackage ../tools/networking/sockdump { };
specup = haskellPackages.specup.bin;
spglib = callPackage ../development/libraries/spglib {
inherit (llvmPackages) openmp;
};
@ -16098,13 +16100,13 @@ with pkgs;
haskell = callPackage ./haskell-packages.nix { };
haskellPackages = dontRecurseIntoAttrs
# JS backend is only available for GHC >= 9.6
(if stdenv.hostPlatform.isGhcjs
then haskell.packages.native-bignum.ghc96
# Prefer native-bignum to avoid linking issues with gmp
else if stdenv.hostPlatform.isStatic
then haskell.packages.native-bignum.ghc94
else haskell.packages.ghc94)
# Prefer native-bignum to avoid linking issues with gmp
# GHC 9.6 rts can't be built statically with hadrian, so we need to use 9.4
# until 9.8 is ready
(if stdenv.hostPlatform.isStatic then haskell.packages.native-bignum.ghc94
# JS backend can't use gmp
else if stdenv.hostPlatform.isGhcjs then haskell.packages.native-bignum.ghc96
else haskell.packages.ghc96)
// { __recurseIntoDerivationForReleaseJobs = true; };
# haskellPackages.ghc is build->host (it exposes the compiler used to build the
@ -16117,9 +16119,11 @@ with pkgs;
# plain, cross-compiled compiler (which is only theoretical at the moment).
ghc = targetPackages.haskellPackages.ghc or
# Prefer native-bignum to avoid linking issues with gmp
(if stdenv.targetPlatform.isStatic
then haskell.compiler.native-bignum.ghc94
else haskell.compiler.ghc94);
# Use 9.4 for static over broken 9.6
(if stdenv.targetPlatform.isStatic then haskell.compiler.native-bignum.ghc94
# JS backend can't use GMP
else if stdenv.targetPlatform.isGhcjs then haskell.compiler.native-bignum.ghc96
else haskell.compiler.ghc96);
alex = haskell.lib.compose.justStaticExecutables haskellPackages.alex;
@ -30660,9 +30664,8 @@ with pkgs;
daktilo = callPackage ../tools/misc/daktilo { };
darcs = haskell.lib.compose.overrideCabal (drv: {
configureFlags = (lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
}) (haskell.lib.compose.justStaticExecutables haskellPackages.darcs);
darcs = haskell.lib.compose.disableCabalFlag "library"
(haskell.lib.compose.justStaticExecutables haskell.packages.ghc94.darcs);
darkman = callPackage ../applications/misc/darkman { };

View File

@ -9,25 +9,18 @@ let
"ghc8107"
];
nativeBignumIncludes = [
"ghc90"
"ghc902"
"ghc92"
"ghc925"
"ghc926"
"ghc927"
"ghc928"
"ghc94"
"ghc945"
"ghc946"
"ghc947"
"ghc948"
"ghc96"
"ghc963"
"ghc964"
"ghc98"
"ghc981"
"ghcHEAD"
nativeBignumExcludes = integerSimpleIncludes ++ [
# haskell.compiler sub groups
"integer-simple"
"native-bignum"
# Binary GHCs
"ghc865Binary"
"ghc8107Binary"
"ghc924Binary"
"ghc963Binary"
# ghcjs
"ghcjs"
"ghcjs810"
];
haskellLibUncomposable = import ../development/haskell-modules/lib {
@ -73,6 +66,10 @@ in {
llvmPackages = pkgs.llvmPackages_12;
};
ghc963Binary = callPackage ../development/compilers/ghc/9.6.3-binary.nix {
llvmPackages = pkgs.llvmPackages_15;
};
ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
bootPkgs =
# the oldest ghc with aarch64-darwin support is 8.10.5
@ -295,8 +292,14 @@ in {
};
ghc96 = compiler.ghc964;
ghc981 = callPackage ../development/compilers/ghc/9.8.1.nix {
# No bindist packaged for 9.4.* yet
bootPkgs = packages.ghc947;
bootPkgs =
# For GHC 9.6 no armv7l bindists are available.
if stdenv.hostPlatform.isAarch32 then
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else
packages.ghc963Binary;
inherit (buildPackages.python3Packages) sphinx;
# Need to use apple's patched xattr until
# https://github.com/xattr/xattr/issues/44 and
@ -306,9 +309,34 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
llvmPackages = pkgs.llvmPackages_15;
};
ghc98 = compiler.ghc981;
ghc982 = callPackage ../development/compilers/ghc/9.8.2.nix {
bootPkgs =
# For GHC 9.6 no armv7l bindists are available.
if stdenv.hostPlatform.isAarch32 then
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else
packages.ghc963Binary;
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;
};
ghc98 = compiler.ghc982;
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs = packages.ghc963;
bootPkgs =
# For GHC 9.6 no armv7l bindists are available.
if stdenv.hostPlatform.isAarch32 then
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else
packages.ghc963Binary;
inherit (buildPackages.python3Packages) sphinx;
# Need to use apple's patched xattr until
# https://github.com/xattr/xattr/issues/44 and
@ -340,7 +368,7 @@ in {
# with "native" and "gmp" backends.
native-bignum = let
nativeBignumGhcNames = pkgs.lib.filter
(name: builtins.elem name nativeBignumIncludes)
(name: !(builtins.elem name nativeBignumExcludes))
(pkgs.lib.attrNames compiler);
in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
nativeBignumGhcNames
@ -371,6 +399,12 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc963Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc963Binary;
ghc = bh.compiler.ghc963Binary;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8107 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8107;
ghc = bh.compiler.ghc8107;
@ -441,7 +475,12 @@ in {
ghc = bh.compiler.ghc981;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
};
ghc98 = packages.ghc981;
ghc982 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc982;
ghc = bh.compiler.ghc982;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
};
ghc98 = packages.ghc982;
ghcHEAD = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghcHEAD;
ghc = bh.compiler.ghcHEAD;
@ -479,7 +518,7 @@ in {
native-bignum =
let
nativeBignumGhcNames = pkgs.lib.filter
(name: builtins.elem name nativeBignumIncludes)
(name: !(builtins.elem name nativeBignumExcludes))
(pkgs.lib.attrNames compiler);
in
pkgs.lib.genAttrs nativeBignumGhcNames

View File

@ -72,6 +72,7 @@ let
ghc963
ghc964
ghc981
ghc982
];
# packagePlatforms applied to `haskell.packages.*`
@ -331,7 +332,7 @@ let
nota
nvfetcher
ormolu
pakcs
# pakcs broken by set-extra on 2024-03-15
pandoc
petrinizer
place-cursor-at
@ -342,6 +343,7 @@ let
sourceAndTags
spacecookie
spago
specup
splot
stack
stack2nix
@ -357,7 +359,7 @@ let
uusi
uqm
uuagc
vaultenv
# vaultenv: broken by connection on 2024-03-16
wstunnel
xmobar
xmonadctl
@ -372,7 +374,7 @@ let
elm
elm-format
elm-instrument
elmi-to-json
# elmi-to-json broken by hashable-time on 2024-03-16
;
};
@ -446,8 +448,8 @@ let
;
};
haskell.packages.native-bignum.ghc981 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc981)
haskell.packages.native-bignum.ghc982 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc982)
hello
random
QuickCheck
@ -487,18 +489,23 @@ let
# working as expected.
cabal-install = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
Cabal_3_10_2_1 = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
Cabal-syntax_3_10_1_0 = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
cabal2nix = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
cabal2nix-unstable = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
funcmp = released;
haskell-language-server = lib.subtractLists [
@ -508,20 +515,23 @@ let
compilerNames.ghc902
] released;
hoogle = lib.subtractLists [
compilerNames.ghc963
compilerNames.ghc981
compilerNames.ghc982
] released;
hlint = lib.subtractLists [
compilerNames.ghc963
compilerNames.ghc902
compilerNames.ghc981
compilerNames.ghc982
] released;
hpack = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
hsdns = released;
jailbreak-cabal = released;
language-nix = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
large-hashable = [
compilerNames.ghc928
@ -529,6 +539,7 @@ let
nix-paths = released;
titlecase = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
ghc-api-compat = [
compilerNames.ghc8107
@ -539,12 +550,15 @@ let
];
ghc-lib = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
ghc-lib-parser = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
ghc-lib-parser-ex = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
ghc-source-gen = [
# Feel free to remove these as they break,
@ -553,26 +567,20 @@ let
compilerNames.ghc902
compilerNames.ghc928
];
ghc-tags = lib.subtractLists [
compilerNames.ghc981
] released;
# broken on 2024-03-16
# ghc-tags = lib.subtractLists [
# compilerNames.ghc981
# compilerNames.ghc982
# ] released;
hashable = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
primitive = released;
weeder = [
compilerNames.ghc8107
compilerNames.ghc902
compilerNames.ghc925
compilerNames.ghc926
compilerNames.ghc927
compilerNames.ghc928
compilerNames.ghc945
compilerNames.ghc946
compilerNames.ghc947
compilerNames.ghc948
compilerNames.ghc963
];
weeder = lib.subtractLists [
compilerNames.ghc981
compilerNames.ghc982
] released;
})
{
mergeable = pkgs.releaseTools.aggregate {
@ -673,7 +681,7 @@ let
constituents = accumulateDerivations [
jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
jobs.pkgsStatic.haskellPackages
jobs.pkgsStatic.haskell.packages.native-bignum.ghc981
jobs.pkgsStatic.haskell.packages.native-bignum.ghc982
];
};
}