Merge pull request #160733 from NixOS/haskell-updates

haskellPackages.ghc: 8.10.7 -> 9.0.2
This commit is contained in:
maralorn 2022-03-30 21:33:13 +02:00 committed by GitHub
commit 3bfa15fe13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 12509 additions and 13761 deletions

View file

@ -120,7 +120,7 @@ rec {
Example:
mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc921.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
=> { _type = "option"; default = «derivation /nix/store/jxx55cxsjrf8kyh3fp2ya17q99w7541r-ghc-8.10.7.drv»; defaultText = { ... }; description = "The GHC package to use."; example = { ... }; type = { ... }; }
*/

View file

@ -0,0 +1,22 @@
let
nixpkgs = import ../../..;
inherit (nixpkgs {}) haskellPackages lib;
maintainedPkgs = lib.filterAttrs (
_: v: builtins.length (v.meta.maintainers or []) > 0
) haskellPackages;
brokenPkgs = lib.filterAttrs (_: v: v.meta.broken) maintainedPkgs;
transitiveBrokenPkgs = lib.filterAttrs
(_: v: !(builtins.tryEval (v.outPath or null)).success && !v.meta.broken)
maintainedPkgs;
infoList = pkgs: lib.concatStringsSep "\n" (lib.mapAttrsToList (name: drv: "${name} ${(builtins.elemAt drv.meta.maintainers 0).github}") pkgs);
in {
report = ''
BROKEN:
${infoList brokenPkgs}
TRANSITIVE BROKEN:
${infoList transitiveBrokenPkgs}
'';
transitiveErrors =
builtins.attrValues transitiveBrokenPkgs;
}

View file

@ -1,26 +1,38 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nix curl jq nix-prefetch-github git gnused gnugrep -I nixpkgs=.
# shellcheck shell=bash
set -eu -o pipefail
tmpfile=$(mktemp "update-stackage.XXXXXXX")
# shellcheck disable=SC2064
# Stackage solver to use, LTS or Nightly
# (should be capitalized like the display name)
SOLVER=LTS
TMP_TEMPLATE=update-stackage.XXXXXXX
readonly SOLVER
readonly TMP_TEMPLATE
toLower() {
printf "%s" "$1" | tr '[:upper:]' '[:lower:]'
}
tmpfile=$(mktemp "$TMP_TEMPLATE")
tmpfile_new=$(mktemp "$TMP_TEMPLATE")
stackage_config="pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml"
trap "rm ${tmpfile} ${tmpfile}.new" 0
touch "$tmpfile" "$tmpfile.new" # Creating files here so that trap creates no errors.
trap 'rm "${tmpfile}" "${tmpfile_new}"' 0
touch "$tmpfile" "$tmpfile_new" # Creating files here so that trap creates no errors.
curl -L -s "https://stackage.org/lts/cabal.config" >"$tmpfile"
old_version=$(grep "# Stackage" $stackage_config | sed -E 's/.*([0-9]{2}\.[0-9]+)/\1/')
version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.lts-//p" "$tmpfile")
curl -L -s "https://stackage.org/$(toLower "$SOLVER")/cabal.config" >"$tmpfile"
old_version=$(grep '^# Stackage' $stackage_config | sed -e 's/.\+ \([A-Za-z]\+ [0-9.-]\+\)$/\1/g')
version="$SOLVER $(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.$(toLower "$SOLVER")-//p" "$tmpfile")"
if [[ "$old_version" == "$version" ]]; then
echo "No new stackage version"
exit 0 # Nothing to do
fi
echo "Updating Stackage LTS from $old_version to $version."
echo "Updating Stackage from $old_version to $version."
# Create a simple yaml version of the file.
sed -r \
@ -30,10 +42,10 @@ sed -r \
-e 's|,$||' \
-e '/installed$/d' \
-e '/^$/d' \
< "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
< "${tmpfile}" | sort --ignore-case >"${tmpfile_new}"
cat > $stackage_config << EOF
# Stackage LTS $version
# Stackage $version
# This file is auto-generated by
# maintainers/scripts/haskell/update-stackage.sh
default-package-overrides:
@ -45,12 +57,13 @@ sed -r \
-e '/ distribution-nixpkgs /d' \
-e '/ jailbreak-cabal /d' \
-e '/ language-nix /d' \
< "${tmpfile}.new" >> $stackage_config
-e '/ cabal-install /d' \
< "${tmpfile_new}" >> $stackage_config
if [[ "${1:-}" == "--do-commit" ]]; then
git add $stackage_config
git commit -F - << EOF
haskellPackages: stackage-lts $old_version -> $version
haskellPackages: stackage $old_version -> $version
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
EOF

View file

@ -120,14 +120,14 @@ lib.mkOption {
```nix
lib.mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc921.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
# is like
lib.mkOption {
type = lib.types.package;
default = pkgs.ghc;
defaultText = lib.literalExpression "pkgs.ghc";
example = lib.literalExpression "pkgs.haskell.package.ghc921.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = lib.literalExpression "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
description = "The GHC package to use.";
}
```

View file

@ -183,14 +183,14 @@ lib.mkOption {
<programlisting language="bash">
lib.mkPackageOption pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ];
example = &quot;pkgs.haskell.package.ghc921.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = &quot;pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
}
# is like
lib.mkOption {
type = lib.types.package;
default = pkgs.ghc;
defaultText = lib.literalExpression &quot;pkgs.ghc&quot;;
example = lib.literalExpression &quot;pkgs.haskell.package.ghc921.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = lib.literalExpression &quot;pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
description = &quot;The GHC package to use.&quot;;
}
</programlisting>

View file

@ -88,6 +88,14 @@
and their users.
</para>
</listitem>
<listitem>
<para>
The default GHC version has been updated from 8.10.7 to 9.0.2.
<literal>pkgs.haskellPackages</literal> and
<literal>pkgs.ghc</literal> will now use this version by
default.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-new-services">

View file

@ -29,6 +29,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- Module authors can use `mkRenamedOptionModuleWith` to automate the deprecation cycle without annoying out-of-tree module authors and their users.
- The default GHC version has been updated from 8.10.7 to 9.0.2. `pkgs.haskellPackages` and `pkgs.ghc` will now use this version by default.
## New Services {#sec-release-22.05-new-services}
- [aesmd](https://github.com/intel/linux-sgx#install-the-intelr-sgx-psw), the Intel SGX Architectural Enclave Service Manager. Available as [services.aesmd](#opt-services.aesmd.enable).

View file

@ -1,17 +1,13 @@
{lib, stdenvNoCC, haskellPackages, fetchurl, writers}:
let
hledger-lib = haskellPackages.hledger-lib_1_24_1;
in
stdenvNoCC.mkDerivation rec {
pname = "hledger-check-fancyassertions";
inherit (hledger-lib) version;
inherit (haskellPackages.hledger-lib) version;
src = fetchurl {
name = "hledger-check-fancyassertion-${version}.hs";
url = "https://raw.githubusercontent.com/simonmichael/hledger/hledger-lib-${version}/bin/hledger-check-fancyassertions.hs";
sha256 = "0naggvivc6szsc8haa52a6lm079ikz5qfva0ljnqx0f1zlkxv984";
sha256 = "1xy3ssxnwybq40nlffz95w7m9xbzf8ysb13svg0i8g5sfgrw11vk";
};
dontUnpack = true;
@ -20,13 +16,12 @@ stdenvNoCC.mkDerivation rec {
executable = writers.writeHaskell
"hledger-check-fancyassertions"
{
libraries = [
libraries = with haskellPackages; [
hledger-lib
] ++ (with haskellPackages; [
base base-compat base-compat-batteries filepath
megaparsec microlens optparse-applicative string-qq text time
transformers
]);
];
inherit (haskellPackages) ghc;
}
src;

View file

@ -16,11 +16,16 @@ let
- make it self-contained by including docker-compose
*/
arion =
justStaticExecutables (
(justStaticExecutables (
overrideCabal
cabalOverrides
arion-compose
);
)
).overrideAttrs (o: {
# Patch away the arion-compose name. Unlike the Haskell library, the program
# is called arion (arion was already taken on hackage).
pname = "arion";
});
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
@ -31,9 +36,6 @@ let
passthru = (o.passthru or {}) // {
inherit eval build;
};
# Patch away the arion-compose name. Unlike the Haskell library, the program
# is called arion (arion was already taken on hackage).
pname = "arion";
src = arion-compose.src;
# PYTHONPATH

View file

@ -1,6 +1,6 @@
{
"commit": "aa8f2230d08c540df249147ea681a5c22314d083",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/aa8f2230d08c540df249147ea681a5c22314d083.tar.gz",
"sha256": "1h92r4si1vmf3v2m843xaqwr99hpnn1s0x08qcvd2gwjkc2qq10a",
"msg": "Update from Hackage at 2022-02-14T17:17:31Z"
"commit": "f504760b580057f368d85ed6f6c4e78a38968ff4",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/f504760b580057f368d85ed6f6c4e78a38968ff4.tar.gz",
"sha256": "0m3w7bawx0qxj2qn3yx1d4j90dq89k5c4604f6z38cxxx0rszmzj",
"msg": "Update from Hackage at 2022-03-26T03:24:04Z"
}

View file

@ -11,6 +11,12 @@ haskellPackages.mkDerivation rec {
sha256 = "sha256-o7NLd7jC1BvcoVzbD18LvHg/SqOnfn9yELUrpg2uZtY=";
};
# -Werror breaks build with GHC >= 9.0
# https://github.com/carp-lang/Carp/issues/1386
postPatch = ''
substituteInPlace CarpHask.cabal --replace "-Werror" ""
'';
buildTools = [ makeWrapper ];
executableHaskellDepends = with haskellPackages; [

View file

@ -77,6 +77,9 @@ let
in elmPkgs // {
inherit elmPkgs;
# We need attoparsec < 0.14 to build elm for now
attoparsec = self.attoparsec_0_13_2_5;
# Needed for elm-format
indents = self.callPackage ./packages/indents.nix {};
bimap = self.callPackage ./packages/bimap.nix {};

View file

@ -366,6 +366,10 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};

View file

@ -335,6 +335,10 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};

View file

@ -33,7 +33,7 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
, # Whether to build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
@ -105,9 +105,13 @@ let
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' +
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
# This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
@ -327,6 +331,10 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};

View file

@ -34,7 +34,7 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
, # Whether to build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
@ -106,9 +106,13 @@ let
CrossCompilePrefix = ${targetPrefix}
'' + lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' +
# -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
# makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
# This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
@ -167,12 +171,12 @@ assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
stdenv.mkDerivation (rec {
version = "9.2.1";
version = "9.2.2";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "f444012f97a136d9940f77cdff03fda48f9475e2ed0fec966c4d35c4df55f746";
sha256 = "902463a4cc6ee479af9358b9f8b2ee3237b03e934a1ea65b6d1fcf3e0d749ea6";
};
enableParallelBuilding = true;
@ -221,6 +225,9 @@ stdenv.mkDerivation (rec {
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
export XATTR=${lib.getBin xattr}/bin/xattr
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + lib.optionalString targetPlatform.isMusl ''
@ -282,10 +289,6 @@ stdenv.mkDerivation (rec {
autoSignDarwinBinariesHook
] ++ lib.optionals enableDocs [
sphinx
] ++ lib.optionals stdenv.isDarwin [
# TODO(@sternenseemann): backport addition of XATTR env var like
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447
xattr
];
# For building runtime libs
@ -328,6 +331,10 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};

View file

@ -347,6 +347,10 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
# This is used by the haskell builder to query
# the presence of the haddock program.
hasHaddock = enableHaddockProgram;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};

File diff suppressed because it is too large Load diff

View file

@ -30,6 +30,8 @@ self: super: ({
double-conversion = addExtraLibrary pkgs.libcxx super.double-conversion;
streamly = addBuildDepend darwin.apple_sdk.frameworks.Cocoa super.streamly;
apecs-physics = addPkgconfigDepends [
darwin.apple_sdk.frameworks.ApplicationServices
] super.apecs-physics;
@ -287,4 +289,7 @@ self: super: ({
# https://github.com/fpco/inline-c/issues/127
inline-c-cpp = dontCheck super.inline-c-cpp;
# https://github.com/haskell-crypto/cryptonite/issues/360
cryptonite = appendPatch ./patches/cryptonite-remove-argon2.patch super.cryptonite;
})

View file

@ -43,15 +43,18 @@ self: super: {
# cabal-install needs more recent versions of Cabal and base16-bytestring.
cabal-install = super.cabal-install.overrideScope (self: super: {
Cabal = self.Cabal_3_6_2_0;
Cabal = self.Cabal_3_6_3_0;
});
# cabal-install-parsers is written for Cabal 3.6
cabal-install-parsers = super.cabal-install-parsers.override { Cabal = super.Cabal_3_6_2_0; };
# Pick right versions for GHC-specific packages
ghc-api-compat = doDistribute self.ghc-api-compat_8_10_7;
# ghc versions which dont match the ghc-lib-parser-ex version need the
# additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;
# Jailbreak to fix the build.
base-noprelude = doJailbreak super.base-noprelude;
system-fileio = doJailbreak super.system-fileio;
unliftio-core = doJailbreak super.unliftio-core;
# Jailbreaking because monoidal-containers hasnt bumped it's base dependency for 8.10.
@ -65,9 +68,6 @@ self: super: {
shellmet = doJailbreak super.shellmet;
shower = doJailbreak super.shower;
# The shipped Setup.hs file is broken.
csv = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.hs"; }) super.csv;
# Apply patch from https://github.com/finnsson/template-helper/issues/12#issuecomment-611795375 to fix the build.
language-haskell-extract = appendPatch (pkgs.fetchpatch {
name = "language-haskell-extract-0.2.4.patch";
@ -84,4 +84,41 @@ self: super: {
mime-string = disableOptimization super.mime-string;
# Older compilers need the latest ghc-lib to build this package.
hls-hlint-plugin = addBuildDepend self.ghc-lib super.hls-hlint-plugin;
haskell-language-server = appendConfigureFlags [
"-f-fourmolu"
"-f-stylishhaskell"
"-f-brittany"
"-f-hlint"
]
(super.haskell-language-server.override {
# Not buildable on 8.10
hls-fourmolu-plugin = null;
# https://github.com/haskell/haskell-language-server/issues/2728
hls-hlint-plugin = null;
});
# ormolu 0.3 requires Cabal == 3.4
ormolu = super.ormolu_0_2_0_0;
# weeder 2.3.0 no longer supports GHC 8.10
weeder = doDistribute (doJailbreak self.weeder_2_2_0);
# OneTuple needs hashable instead of ghc-prim for GHC < 9
OneTuple = 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);
# Temporarily disabled blaze-textual for GHC >= 9.0 causing hackage2nix ignoring it
# https://github.com/paul-rouse/mysql-simple/blob/872604f87044ff6d1a240d9819a16c2bdf4ed8f5/Database/MySQL/Internal/Blaze.hs#L4-L10
mysql-simple = addBuildDepends [
self.blaze-textual
] super.mysql-simple;
taffybar = markUnbroken (doDistribute super.taffybar);
}

View file

@ -81,9 +81,6 @@ self: super: {
# cabal2spec needs a recent version of Cabal
cabal2spec = super.cabal2spec.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; });
# Builds only with ghc-8.8.x and beyond.
policeman = markBroken super.policeman;
# https://github.com/pikajude/stylish-cabal/issues/12
stylish-cabal = doDistribute (markUnbroken (super.stylish-cabal.override { haddock-library = self.haddock-library_1_7_0; }));
haddock-library_1_7_0 = dontCheck super.haddock-library_1_7_0;

View file

@ -50,7 +50,7 @@ self: super: {
# cabal-install needs more recent versions of Cabal and random, but an older
# version of base16-bytestring.
cabal-install = super.cabal-install.overrideScope (self: super: {
Cabal = self.Cabal_3_6_2_0;
Cabal = self.Cabal_3_6_3_0;
});
# Ignore overly restrictive upper version bounds.
@ -96,9 +96,6 @@ self: super: {
# of issues with Cabal 3.x.
darcs = dontDistribute super.darcs;
# The package needs the latest Cabal version.
cabal-install-parsers = super.cabal-install-parsers.overrideScope (self: super: { Cabal = self.Cabal_3_6_2_0; });
# cabal-fmt requires Cabal3
cabal-fmt = super.cabal-fmt.override { Cabal = self.Cabal_3_2_1_0; };
@ -121,8 +118,7 @@ self: super: {
# additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;
# Older compilers need the latest ghc-lib to build this package.
hls-hlint-plugin = addBuildDepend self.ghc-lib super.hls-hlint-plugin;
ormolu = super.ormolu_0_2_0_0;
# vector 0.12.2 indroduced doctest checks that dont work on older compilers
vector = dontCheck super.vector;
@ -130,4 +126,28 @@ self: super: {
ghc-api-compat = doDistribute super.ghc-api-compat_8_6;
mime-string = disableOptimization super.mime-string;
haskell-language-server = appendConfigureFlags [
"-f-fourmolu"
"-f-stylishhaskell"
"-f-brittany"
"-f-hlint"
]
(super.haskell-language-server.override {
# Not buildable on 8.8
hls-fourmolu-plugin = null;
# https://github.com/haskell/haskell-language-server/issues/2728
hls-hlint-plugin = null;
});
# OneTuple needs hashable instead of ghc-prim for GHC < 9
OneTuple = super.OneTuple.override {
ghc-prim = self.hashable;
};
# Temporarily disabled blaze-textual for GHC >= 9.0 causing hackage2nix ignoring it
# https://github.com/paul-rouse/mysql-simple/blob/872604f87044ff6d1a240d9819a16c2bdf4ed8f5/Database/MySQL/Internal/Blaze.hs#L4-L10
mysql-simple = addBuildDepends [
self.blaze-textual
] super.mysql-simple;
}

View file

@ -44,10 +44,15 @@ self: super: {
# cabal-install needs more recent versions of Cabal and base16-bytestring.
cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: {
Cabal = self.Cabal_3_6_2_0;
Cabal = self.Cabal_3_6_3_0;
});
# Jailbreaks & Version Updates
# This `doJailbreak` can be removed once the following PR is released to Hackage:
# https://github.com/thsutton/aeson-diff/pull/58
aeson-diff = doJailbreak super.aeson-diff;
async = doJailbreak super.async;
data-fix = doJailbreak super.data-fix;
dec = doJailbreak super.dec;
@ -60,7 +65,6 @@ self: super: {
lukko = doJailbreak super.lukko;
parallel = doJailbreak super.parallel;
primitive = doJailbreak (dontCheck super.primitive);
primitive-extras = doDistribute (self.primitive-extras_0_10_1_4);
regex-posix = doJailbreak super.regex-posix;
resolv = doJailbreak super.resolv;
singleton-bool = doJailbreak super.singleton-bool;
@ -71,23 +75,11 @@ self: super: {
vector-binary-instances = doJailbreak super.vector-binary-instances;
vector-th-unbox = doJailbreak super.vector-th-unbox;
zlib = doJailbreak super.zlib;
weeder = self.weeder_2_3_0;
generic-lens-core = self.generic-lens-core_2_2_1_0;
generic-lens = self.generic-lens_2_2_1_0;
th-desugar = self.th-desugar_1_13;
# 2021-11-08: Fixed in autoapply-0.4.2
autoapply = doJailbreak self.autoapply_0_4_1_1;
# Doesn't allow Dhall 1.39.*; forbids lens 5.1
weeder_2_3_0 = doJailbreak (super.weeder_2_3_0.override {
dhall = self.dhall_1_40_2;
});
# Upstream also disables test for GHC 9: https://github.com/kcsongor/generic-lens/pull/130
generic-lens_2_2_1_0 = dontCheck super.generic-lens_2_2_1_0;
autoapply = doJailbreak super.autoapply;
doctest = dontCheck super.doctest;
# Apply patches from head.hackage.
doctest = dontCheck (doJailbreak super.doctest_0_18_2);
language-haskell-extract = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/language-haskell-extract-0.2.4.patch";
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
@ -99,41 +91,24 @@ self: super: {
# The test suite seems pretty broken.
base64-bytestring = dontCheck super.base64-bytestring;
# 5 introduced support for GHC 9.0.x, but hasn't landed in stackage yet
lens = super.lens_5_1;
# 0.16.0 introduced support for GHC 9.0.x, stackage has 0.15.0
memory = super.memory_0_16_0;
# GHC 9.0.x doesn't like `import Spec (main)` in Main.hs
# https://github.com/snoyberg/mono-traversable/issues/192
mono-traversable = dontCheck super.mono-traversable;
# Test suite sometimes segfaults with GHC 9.0.1 and 9.0.2
# https://github.com/ekmett/reflection/issues/51
# https://gitlab.haskell.org/ghc/ghc/-/issues/21141
reflection = dontCheck super.reflection;
# Disable tests pending resolution of
# https://github.com/Soostone/retry/issues/71
retry = dontCheck super.retry;
# Hlint needs >= 3.3.4 for ghc 9 support.
hlint = doDistribute super.hlint_3_3_6;
# 2021-09-18: ghc-api-compat and ghc-lib-* need >= 9.0.x versions for hls and hlint
ghc-api-compat = doDistribute super.ghc-api-compat_9_0_1;
ghc-lib-parser = self.ghc-lib-parser_9_0_2_20211226;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_0_0_6;
ghc-lib = self.ghc-lib_9_0_2_20211226;
# 2021-09-18: Need semialign >= 1.2 for correct bounds
semialign = super.semialign_1_2_0_1;
# 2021-09-18: cabal2nix does not detect the need for ghc-api-compat.
hiedb = overrideCabal (old: {
libraryHaskellDepends = old.libraryHaskellDepends ++ [self.ghc-api-compat];
}) super.hiedb;
# 2021-09-18: Need path >= 0.9.0 for ghc 9 compat
path = self.path_0_9_0;
# 2021-09-18: Need ormolu >= 0.3.0.0 for ghc 9 compat
ormolu = doDistribute self.ormolu_0_3_1_0;
# 2021-09-18: https://github.com/haskell/haskell-language-server/issues/2206
# Restrictive upper bound on ormolu
hls-ormolu-plugin = doJailbreak super.hls-ormolu-plugin;
@ -143,18 +118,4 @@ self: super: {
multistate = doJailbreak super.multistate;
# https://github.com/lspitzner/butcher/issues/7
butcher = doJailbreak super.butcher;
# Fixes a bug triggered on GHC 9.0.1
text-short = self.text-short_0_1_5;
fourmolu = doJailbreak self.fourmolu_0_4_0_0;
# 2022-02-05: The following plugins dont work yet on ghc9.
# Compare: https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html
haskell-language-server = appendConfigureFlags [
"-f-brittany"
"-f-stylishhaskell"
] (super.haskell-language-server.override {
hls-stylish-haskell-plugin = null; # No upstream support
hls-brittany-plugin = null; # Dependencies don't build with 9.0.1
});
}

View file

@ -42,64 +42,42 @@ self: super: {
unix = null;
xhtml = null;
# Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/20594
tf-random = overrideCabal {
doHaddock = !pkgs.stdenv.isAarch64;
} super.tf-random;
aeson = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/aeson-1.5.6.0.patch";
sha256 = "07rk7f0lhgilxvbg2grpl1p5x25wjf9m7a0wqmi2jr0q61p9a0nl";
# The revision information is newer than that included in the patch
excludes = ["*.cabal"];
}) (doJailbreak super.aeson);
basement = overrideCabal (drv: {
# This is inside a conditional block so `doJailbreak` doesn't work
postPatch = "sed -i -e 's,<4.16,<4.17,' basement.cabal";
}) (appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/basement-0.0.12.patch";
sha256 = "0c8n2krz827cv87p3vb1vpl3v0k255aysjx9lq44gz3z1dhxd64z";
}) super.basement);
# Tests fail because of typechecking changes
conduit = dontCheck super.conduit;
cryptonite = appendPatch (pkgs.fetchpatch {
# 0.30 introduced support for GHC 9.2.x, so when this assert fails, the whole block can be removed
cryptonite = assert super.cryptonite.version == "0.29"; appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cryptonite-0.29.patch";
sha256 = "1g48lrmqgd88hqvfq3klz7lsrpwrir2v1931myrhh6dy0d9pqj09";
}) super.cryptonite;
# cabal-install needs more recent versions of Cabal
cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: {
Cabal = self.Cabal_3_6_2_0;
Cabal = self.Cabal_3_6_3_0;
});
doctest = dontCheck (doJailbreak super.doctest_0_18_2);
doctest = dontCheck (doJailbreak super.doctest);
# Tests fail in GHC 9.2
extra = dontCheck super.extra;
# Jailbreaks & Version Updates
# This `doJailbreak` can be removed once we have doctest v0.20
aeson-diff = assert super.doctest.version == "0.18.2"; doJailbreak super.aeson-diff;
assoc = doJailbreak super.assoc;
async = doJailbreak super.async;
attoparsec = super.attoparsec_0_14_4;
base64-bytestring = doJailbreak super.base64-bytestring;
base-compat = self.base-compat_0_12_1;
base-compat-batteries = self.base-compat-batteries_0_12_1;
binary-instances = doJailbreak super.binary-instances;
binary-orphans = super.binary-orphans_1_0_2;
ChasingBottoms = doJailbreak super.ChasingBottoms;
constraints = doJailbreak super.constraints;
cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
cryptohash-md5 = doJailbreak super.cryptohash-md5;
cryptohash-sha1 = doJailbreak super.cryptohash-sha1;
data-fix = doJailbreak super.data-fix;
dec = doJailbreak super.dec;
ed25519 = doJailbreak super.ed25519;
genvalidity = self.genvalidity_1_0_0_1;
genvalidity-property = self.genvalidity-property_1_0_0_0;
genvalidity-hspec = self.genvalidity-hspec_1_0_0_0;
ghc-byteorder = doJailbreak super.ghc-byteorder;
ghc-exactprint = overrideCabal (drv: {
# HACK: ghc-exactprint 1.4.1 is not buildable for GHC < 9.2,
@ -115,49 +93,59 @@ self: super: {
self.data-default
] ++ drv.libraryHaskellDepends or [];
}) super.ghc-exactprint;
ghc-lib = self.ghc-lib_9_2_1_20220109;
ghc-lib-parser = self.ghc-lib-parser_9_2_1_20220109;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_1;
ghc-lib = self.ghc-lib_9_2_2_20220307;
ghc-lib-parser = self.ghc-lib-parser_9_2_2_20220307;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_3;
hackage-security = doJailbreak super.hackage-security;
hashable = super.hashable_1_4_0_2;
hashable-time = doJailbreak super.hashable-time_0_3;
hedgehog = doJailbreak super.hedgehog;
hashable-time = doJailbreak super.hashable-time;
# 1.1.1 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
hedgehog = assert super.hedgehog.version == "1.0.5"; doJailbreak super.hedgehog;
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
indexed-traversable = doJailbreak super.indexed-traversable;
indexed-traversable-instances = doJailbreak super.indexed-traversable-instances;
lifted-async = doJailbreak super.lifted-async;
lukko = doJailbreak super.lukko;
network = super.network_3_1_2_7;
lzma-conduit = doJailbreak super.lzma-conduit;
ormolu = self.ormolu_0_4_0_0;
OneTuple = super.OneTuple_0_3_1;
parallel = doJailbreak super.parallel;
path = doJailbreak super.path_0_9_2;
path = doJailbreak super.path;
polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
primitive = doJailbreak super.primitive;
quickcheck-instances = super.quickcheck-instances_0_3_27;
# https://github.com/protolude/protolude/pull/136
protolude = appendPatches [
(pkgs.fetchpatch {
url = "https://github.com/protolude/protolude/commit/47820a36c25ea6f0c6e44382f7d4f3507358b8e7.diff";
sha256 = "sha256-PtHx5SyTgqFzI03YVeQD+RqglO6ASMQWSxdpy4ROMDY=";
})
] (doJailbreak super.protolude);
regex-posix = doJailbreak super.regex-posix;
resolv = doJailbreak super.resolv;
retrie = doDistribute (dontCheck self.retrie_1_2_0_1);
semialign = super.semialign_1_2_0_1;
singleton-bool = doJailbreak super.singleton-bool;
scientific = doJailbreak super.scientific;
servant = doJailbreak super.servant;
servant-auth = doJailbreak super.servant-auth;
servant-server = appendPatches [
# awaiting release
(pkgs.fetchpatch {
url = "https://github.com/haskell-servant/servant/commit/61d0d14b5cb01db3d589101b3f17b0178f52e386.diff";
relative = "servant-server";
sha256 = "sha256-3lM8xLO8avVRo8oncJR8QLDSWEzOaoCmzgVtyaEBEw8=";
})
] (doJailbreak super.servant-server);
servant-swagger = doJailbreak super.servant-swagger;
servant-auth-swagger = doJailbreak super.servant-auth-swagger;
shelly = doJailbreak super.shelly;
split = doJailbreak super.split;
splitmix = doJailbreak super.splitmix;
tar = doJailbreak super.tar;
tasty-hedgehog = doJailbreak super.tasty-hedgehog;
tasty-hspec = doJailbreak super.tasty-hspec;
th-desugar = self.th-desugar_1_13;
these = doJailbreak super.these;
time-compat = doJailbreak super.time-compat_1_9_6_1;
time-compat = doJailbreak super.time-compat;
tomland = doJailbreak super.tomland;
type-equality = doJailbreak super.type-equality;
unordered-containers = doJailbreak super.unordered-containers;
vector = doJailbreak (dontCheck super.vector);
vector = dontCheck super.vector;
vector-binary-instances = doJailbreak super.vector-binary-instances;
# Upper bound on `hashable` is too restrictive
witherable = doJailbreak super.witherable;
zlib = doJailbreak super.zlib;
hpack = overrideCabal (drv: {
# Cabal 3.6 seems to preserve comments when reading, which makes this test fail
@ -167,7 +155,7 @@ self: super: {
] ++ drv.testFlags or [];
}) (doJailbreak super.hpack);
validity = pkgs.lib.pipe super.validity_0_12_0_0 [
validity = pkgs.lib.pipe super.validity [
# head.hackage patch
(appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/9110e6972b5daf085e19cad41f97920d3ddac499/patches/validity-0.12.0.0.patch";
@ -192,32 +180,14 @@ self: super: {
# Tests depend on `parseTime` which is no longer available
hourglass = dontCheck super.hourglass;
# 1.2.1 introduced support for GHC 9.2.1, stackage has 1.2.0
# The test suite indirectly depends on random, which leads to infinite recursion
random = dontCheck super.random_1_2_1;
# 0.16.0 introduced support for GHC 9.0.x, stackage has 0.15.0
memory = appendPatch (pkgs.fetchpatch {
# 0.17.0 introduced support for GHC 9.2.x, so when this assert fails, the whole block can be removed
memory = assert super.memory.version == "0.16.0"; appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/memory-0.16.0.patch";
sha256 = "1kjganx729a6xfgfnrb3z7q6mvnidl042zrsd9n5n5a3i76nl5nl";
}) (overrideCabal {
editedCabalFile = null;
revision = null;
} super.memory_0_16_0);
# GHC 9.0.x doesn't like `import Spec (main)` in Main.hs
# https://github.com/snoyberg/mono-traversable/issues/192
mono-traversable = dontCheck super.mono-traversable;
# Disable tests pending resolution of
# https://github.com/Soostone/retry/issues/71
retry = dontCheck super.retry;
# Upper bound on `hashable` is too restrictive
semigroupoids = overrideCabal (drv: { postPatch = "sed -i -e 's,hashable >= 1.2.7.0 && < 1.4,hashable >= 1.2.7.0 \\&\\& < 1.5,' semigroupoids.cabal";}) super.semigroupoids;
# Tests have a circular dependency on quickcheck-instances
text-short = dontCheck super.text-short_0_1_5;
} super.memory);
# Use hlint from git for GHC 9.2.1 support
hlint = doDistribute (
@ -229,10 +199,7 @@ self: super: {
rev = "77a9702e10b772a7695c08682cd4f450fd0e9e46";
sha256 = "0hpp3iw7m7w2abr8vb86gdz3x6c8lj119zxln933k90ia7bmk8jc";
};
} (super.hlint_3_3_6.overrideScope (self: super: {
ghc-lib-parser = self.ghc-lib-parser_9_2_1_20220109;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_1;
}))
} super.hlint
);
# https://github.com/sjakobi/bsb-http-chunked/issues/38
@ -244,14 +211,14 @@ self: super: {
some = doJailbreak super.some;
fourmolu = super.fourmolu_0_5_0_1;
implicit-hie-cradle = doJailbreak super.implicit-hie-cradle;
lucid = doJailbreak super.lucid;
hashtables = doJailbreak super.hashtables;
primitive-extras = super.primitive-extras_0_10_1_4;
# 1.3 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
hashtables = assert super.hashtables.version == "1.2.4.2"; doJailbreak super.hashtables;
hiedb = doJailbreak super.hiedb;
# 2022-02-05: The following plugins dont work yet on ghc9.2.
# Compare: https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html
haskell-language-server = appendConfigureFlags [
haskell-language-server = overrideCabal (old: {libraryHaskellDepends = builtins.filter (x: x != super.hls-tactics-plugin) old.libraryHaskellDepends;})
(appendConfigureFlags [
"-f-alternateNumberFormat"
"-f-class"
"-f-eval"
@ -260,8 +227,6 @@ self: super: {
"-f-retrie"
"-f-splice"
"-f-tactics"
"-f-brittany"
"-f-stylish-haskell"
] (super.haskell-language-server.override {
hls-alternate-number-format-plugin = null;
hls-class-plugin = null;
@ -270,8 +235,5 @@ self: super: {
hls-hlint-plugin = null;
hls-retrie-plugin = null;
hls-splice-plugin = null;
hls-tactics-plugin = null;
hls-brittany-plugin = null;
hls-stylish-haskell-plugin = null;
});
}));
}

View file

@ -1,38 +1,39 @@
# pkgs/development/haskell-modules/configuration-hackage2nix.yaml
compiler: ghc-8.10.7
compiler: ghc-9.0.2
core-packages:
- array-0.5.4.0
- base-4.14.1.0
- base-4.15.1.0
- binary-0.8.8.0
- bytestring-0.10.12.0
- Cabal-3.2.1.0
- containers-0.6.2.1
- deepseq-1.4.4.0
- directory-1.3.6.0
- bytestring-0.10.12.1
- Cabal-3.4.1.0
- containers-0.6.4.1
- deepseq-1.4.5.0
- directory-1.3.6.2
- exceptions-0.10.4
- filepath-1.4.2.1
- ghc-8.10.4
- ghc-boot-8.10.4
- ghc-boot-th-8.10.4
- ghc-9.0.2
- ghc-bignum-1.1
- ghc-boot-9.0.2
- ghc-boot-th-9.0.2
- ghc-compact-0.1.0.0
- ghc-heap-8.10.4
- ghc-prim-0.6.1
- ghci-8.10.4
- haskeline-0.8.0.1
- ghc-heap-9.0.2
- ghc-prim-0.7.0
- ghci-9.0.2
- haskeline-0.8.2
- hpc-0.6.1.0
- integer-gmp-1.0.3.0
- libiserv-8.10.4
- integer-gmp-1.1
- libiserv-9.0.2
- mtl-2.2.2
- parsec-3.1.14.0
- pretty-1.1.3.6
- process-1.6.9.0
- rts-1.0
- process-1.6.13.2
- rts-1.0.2
- stm-2.5.0.0
- template-haskell-2.16.0.0
- terminfo-0.4.1.4
- text-1.2.4.1
- template-haskell-2.17.0.0
- terminfo-0.4.1.5
- text-1.2.5.0
- time-1.9.3
- transformers-0.5.6.2
- unix-2.7.2.2
@ -70,74 +71,24 @@ default-package-overrides:
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
# not yet available in Nixpkgs
- gi-gdkx11 < 4
# streamly-* packages which are not in stackage and to be constrained
# as long as we have streamly < 0.8.0
- streamly-archive < 0.1.0
- streamly-bytestring < 0.1.3
- streamly-lmdb < 0.3.0
- streamly-process
# dhall-nix is not part of stackage, remove if dhall >= 1.40
- dhall-nix < 1.1.22
# reflex-dom-pandoc is only used by neuron which needs a version < 1.0.0.0
- reflex-dom-pandoc < 1.0.0.0
# 2021-09-07: pin to our current GHC version
- ghc-api-compat == 8.10.7
# 2021-10-13: weeder 2.3.0 require GHC == 9.0.*; remove pin when GHC version changes
- weeder < 2.3.0
# 2021-10-10: taskwarrior 0.4 requires aeson > 2.0.1.0
- taskwarrior < 0.4.0.0
# 2021-10-19: autoapply 0.4.1.1 requires th-desugar 1.12
- autoapply < 0.4.1.1
# 2021-10-22: 1.8 breaks shake-bench
- SVGFonts < 1.8
# 2021-11-09: 0.20.6 can't be built with aeson < 2.0 which is a pain to override at the moment
- futhark < 0.20.6
# 2022-02-18: pin to our current GHC version
- ghc-api-compat == 9.0.*
# 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
# 2021-11-18: lucid-{alpine, htmx} are not in stackage, so we need to downgrade them
- lucid-alpine == 0.1.0.2
- lucid-htmx == 0.1.0.2
# 2021-11-21: restrict haskell-gi-related packages to match stackage version (0.25)
- gi-girepository < 1.0.25
- gi-ggit < 1.0.11
- gi-gst < 1.0.25
- gi-gstaudio < 1.0.24
- gi-gstbase < 1.0.25
- gi-gstvideo < 1.0.25
- gi-gtksource < 3.0.25
- gi-ibus < 1.5.4
- gi-javascriptcore < 4.0.24
- gi-ostree < 1.0.15
- gi-notify < 0.7.24
- gi-pangocairo < 1.0.26
- gi-poppler < 0.18.26
- gi-secret < 0.0.14
- gi-soup < 2.4.25
- gi-vte < 2.91.29
- gi-webkit2 < 4.0.28
- gi-webkit2webextension < 4.0.27
- gi-wnck < 3.0.11
# gi-cogl, gi-coglpango, gi-clutter, gi-json, gi-rsvg are only available for haskell-gi >= 0.26
# 1.2.1.0 needs opaleye >= 0.8 which stackage doesn't provide
- rel8 < 1.2.1.0
# 0.14.0.0 drops support for every GHC < 9.0.1
- brittany < 0.14
# 1.2.0.0: “Dropped support for GHC <9.2 (might readd it later)”
- retrie < 1.2.0.0
# Compat with polysemy in Stackage LTS 18
- polysemy-resume < 0.1.0.2
- polysemy-conc < 0.5
- polysemy-mocks < 0.2
# Pinning patch because it is mainly used by the reflex-frp ecosystem which is not yet compatible with it.
# https://github.com/reflex-frp/reflex-dom/issues/431
- patch < 0.0.5.0
# On the recommendation of hnix author:
# https://github.com/NixOS/nixpkgs/pull/154461#issuecomment-1015511883
- hnix < 0.15
# needs http-client >= 0.7.11 which isn't part of Stackage LTS 18
- http-client-restricted < 0.0.5
# Needs dhall 1.41.*, Stackage Nightly has 1.40
- dhall-nix < 1.1.24
extra-packages:
- aeson < 2 # required by pantry-0.5.2
- base16-bytestring < 1 # required for cabal-install etc.
- Cabal == 2.2.* # required for jailbreak-cabal etc.
- Cabal == 2.4.* # required for cabal-install etc.
@ -158,19 +109,26 @@ extra-packages:
- mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls
- network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15
- optparse-applicative < 0.16 # needed for niv-0.2.19
- pantry == 0.5.2.1 # needed for stack-2.7.3
- resolv == 0.1.1.2 # required to build cabal-install-3.0.0.0 with pre ghc-8.8.x
- sbv == 7.13 # required for pkgs.petrinizer
- crackNum < 3.0 # 2021-05-21: 3.0 removed the lib which sbv 7.13 uses
- ghc-api-compat == 8.6 # 2021-09-07: preserve for GHC 8.8.4
- ghc-lib == 9.0.* # 2021-11-05: Need one GHC 9.0.2 compatible version
- ghc-lib-parser == 9.0.* # 2021-11-05: Need one GHC 9.0.2 compatible version
- ghc-lib-parser-ex == 9.0.* # 2021-11-05: Need one GHC 9.0.2 compatible version
- ghc-api-compat == 8.10.7 # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser == 8.10.7.* # 2022-02-17: preserve for GHC 8.10.7
- ghc-lib-parser-ex == 8.10.* # 2022-02-17: preserve for GHC 8.10.7
- doctest == 0.18.* # 2021-11-19: closest to stackage version for GHC 9.*
- brick == 0.64.* # 2021-12-03: matterhorn depends on brick < 0.65
- path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2
- ormolu == 0.3.* # 2021-12-03: for HLS with GHC 9.0.2
- fourmolu == 0.4.* # 2022-02-05: for HLS with GHC 9.0.2
- ormolu == 0.2.* # 2022-02-21: For ghc 8.8 and 8.10
- ghc-exactprint == 1.4.* # 2022-02-07: preserve for now, 1.5.0 has a breaking change without type changes
- ShellCheck == 0.7.2 # 2022-02-20: haskell-ci 0.14 needs this
- weeder == 2.2.* # 2022-02-21: preserve for GHC 8.10.7
- attoparsec == 0.13.* # 2022-02-23: Needed to compile elm for now
- relude == 0.7.0.0 # 2022-02-25: Needed for ema 0.6
- SVGFonts < 1.8 # 2022-03-19: Needed for Chart-diagrams 1.9.3
- clay < 0.14 # 2022-03-20: Needed for neuron 1.0.0.0
package-maintainers:
abbradar:
@ -191,6 +149,7 @@ package-maintainers:
- pretty-simple
- purenix
- spago
- stack
- termonad
dalpd:
- ghc-vis
@ -290,7 +249,6 @@ package-maintainers:
- cabal-fmt
- ema
- generic-optics
- ghcup
- ghcid
- ghcide
- haskell-language-server
@ -436,6 +394,7 @@ unsupported-platforms:
bindings-sane: [ x86_64-darwin, aarch64-darwin ]
btrfs: [ x86_64-darwin, aarch64-darwin ] # depends on linux
bustle: [ x86_64-darwin, aarch64-darwin ] # uses glibc-specific ptsname_r
camfort: [ aarch64-linux ]
charsetdetect: [ aarch64-linux ] # not supported by vendored lib / not configured properly https://github.com/batterseapower/libcharsetdetect/issues/3
cut-the-crap: [ x86_64-darwin, aarch64-darwin ]
d3d11binding: [ i686-linux, x86_64-linux, x86_64-darwin, aarch64-darwin, aarch64-linux, armv7l-linux ]
@ -453,19 +412,21 @@ unsupported-platforms:
gi-dbusmenugtk3: [ x86_64-darwin, aarch64-darwin ]
gi-dbusmenu: [ x86_64-darwin, aarch64-darwin ]
gi-ggit: [ x86_64-darwin, aarch64-darwin ]
gi-gtkosxapplication: [ x86_64-linux, aarch64-linux ]
gi-ibus: [ x86_64-darwin, aarch64-darwin ]
gi-javascriptcore: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
gi-ostree: [ x86_64-darwin, aarch64-darwin ]
gi-vte: [ x86_64-darwin, aarch64-darwin ]
gi-webkit2: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
gi-webkit2webextension: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
gi-webkit2: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
gi-wnck: [ x86_64-darwin, aarch64-darwin ]
gnome-keyring: [ x86_64-darwin, aarch64-darwin ]
gtk3-mac-integration: [ x86_64-linux, aarch64-linux ]
gtk-mac-integration: [ i686-linux, x86_64-linux, aarch64-linux, armv7l-linux ]
gtk-sni-tray: [ x86_64-darwin, aarch64-darwin ]
haskell-snake: [ x86_64-darwin, aarch64-darwin ]
hbro: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
hbro-contrib: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
hbro: [ x86_64-darwin, aarch64-darwin ] # webkitgtk marked broken on darwin
hcwiid: [ x86_64-darwin, aarch64-darwin ]
HFuse: [ x86_64-darwin, aarch64-darwin ]
hidapi: [ x86_64-darwin, aarch64-darwin ]
@ -478,6 +439,11 @@ unsupported-platforms:
iwlib: [ x86_64-darwin, aarch64-darwin ]
Jazzkell: [ x86_64-darwin, aarch64-darwin ] # depends on Euterpea
jsaddle-webkit2gtk: [ x86_64-darwin, aarch64-darwin ]
keid-core: [ aarch64-linux ]
keid-geometry: [ aarch64-linux ]
keid-render-basic: [ aarch64-linux ]
keid-sound-openal: [ aarch64-linux ]
keid-ui-dearimgui: [ aarch64-linux ]
kqueue: [ x86_64-linux, aarch64-linux, i686-linux, armv7l-linux ] # BSD / Darwin only API
Kulitta: [ x86_64-darwin, aarch64-darwin ] # depends on Euterpea
LambdaHack: [ x86_64-darwin, aarch64-darwin ]
@ -494,6 +460,7 @@ unsupported-platforms:
linux-namespaces: [ x86_64-darwin, aarch64-darwin ]
lio-fs: [ x86_64-darwin, aarch64-darwin ]
logging-facade-journald: [ x86_64-darwin, aarch64-darwin ]
longshot: [ aarch64-linux ]
midi-alsa: [ x86_64-darwin, aarch64-darwin ]
mpi-hs: [ aarch64-linux, x86_64-darwin, aarch64-darwin ]
mpi-hs-binary: [ aarch64-linux, x86_64-darwin, aarch64-darwin ]

View file

@ -213,18 +213,11 @@ self: super: builtins.intersectAttrs super {
}) super.tz;
# Nix-specific workaround
xmonad = appendPatch ./patches/xmonad-nix.patch (dontCheck super.xmonad);
xmonad_0_17_0 = doDistribute (appendPatch ./patches/xmonad_0_17_0-nix.patch (super.xmonad_0_17_0));
xmonad = appendPatch ./patches/xmonad_0_17_0-nix.patch (dontCheck super.xmonad);
# Need matching xmonad version
xmonad-contrib_0_17_0 = doDistribute (super.xmonad-contrib_0_17_0.override {
xmonad = self.xmonad_0_17_0;
});
xmonad-extras_0_17_0 = doDistribute (super.xmonad-extras_0_17_0.override {
xmonad = self.xmonad_0_17_0;
xmonad-contrib = self.xmonad-contrib_0_17_0;
});
# https://hydra.nixos.org/build/128665302/nixlog/3
# Disable tests because they require a running dbus session
xmonad-dbus = dontCheck super.xmonad-dbus;
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
# http://hydra.cryp.to/build/1331287/log/raw
@ -489,19 +482,21 @@ self: super: builtins.intersectAttrs super {
# The tests expect additional solvers on the path, replace the
# available ones also with hard coded paths, and remove the missing
# ones from the test.
# TODO(@sternenseemann): package cvc5 and re-enable tests
sbv = overrideCabal (drv: {
postPatch = ''
sed -i -e 's|"abc"|"${pkgs.abc-verifier}/bin/abc"|' Data/SBV/Provers/ABC.hs
sed -i -e 's|"bitwuzla"|"${pkgs.bitwuzla}/bin/bitwuzla"|' Data/SBV/Provers/Bitwuzla.hs
sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs
sed -i -e 's|"cvc4"|"${pkgs.cvc4}/bin/cvc4"|' Data/SBV/Provers/CVC4.hs
sed -i -e 's|"yices-smt2"|"${pkgs.yices}/bin/yices-smt2"|' Data/SBV/Provers/Yices.hs
sed -i -e 's|"z3"|"${pkgs.z3}/bin/z3"|' Data/SBV/Provers/Z3.hs
'' + (if pkgs.stdenv.isAarch64 then ''
sed -i -e 's|\[abc, boolector, cvc4, mathSAT, yices, z3, dReal\]|[abc, boolector, yices, z3]|' SBVTestSuite/SBVConnectionTest.hs
''
else ''
sed -i -e 's|"cvc4"|"${pkgs.cvc4}/bin/cvc4"|' Data/SBV/Provers/CVC4.hs
sed -i -e 's|\[abc, boolector, cvc4, mathSAT, yices, z3, dReal\]|[abc, boolector, cvc4, yices, z3]|' SBVTestSuite/SBVConnectionTest.hs
'');
# Solvers we don't provide are removed from tests
sed -i -e 's|, cvc5||' SBVTestSuite/SBVConnectionTest.hs
sed -i -e 's|, mathSAT||' SBVTestSuite/SBVConnectionTest.hs
sed -i -e 's|, dReal||' SBVTestSuite/SBVConnectionTest.hs
'';
}) super.sbv;
# The test-suite requires a running PostgreSQL server.
@ -568,6 +563,7 @@ self: super: builtins.intersectAttrs super {
# Tests require internet
http-download = dontCheck super.http-download;
pantry = dontCheck super.pantry;
pantry_0_5_2_1 = dontCheck super.pantry_0_5_2_1;
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
# need it during the build itself, too.
@ -823,6 +819,11 @@ self: super: builtins.intersectAttrs super {
# time
random = dontCheck super.random;
# mockery's tests depend on hspec-discover which dependso on mockery for its tests
mockery = dontCheck super.mockery;
# same for logging-facade
logging-facade = dontCheck super.logging-facade;
# Since this package is primarily used by nixpkgs maintainers and is probably
# not used to link against by anyone, we can make its closure smaller and
# add its runtime dependencies in `haskellPackages` (as opposed to cabal2nix).
@ -977,8 +978,6 @@ self: super: builtins.intersectAttrs super {
{
inherit (super)
hls-brittany-plugin
hls-call-hierarchy-plugin
hls-class-plugin
hls-eval-plugin
hls-floskell-plugin
hls-fourmolu-plugin
@ -986,14 +985,17 @@ self: super: builtins.intersectAttrs super {
hls-ormolu-plugin
hls-pragmas-plugin
hls-rename-plugin
hls-selection-range-plugin
hls-splice-plugin;
# Tests have file permissions expections that dont work with the nix store.
hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin;
# Flaky tests
hls-hlint-plugin = dontCheck super.hls-hlint-plugin;
hls-class-plugin = dontCheck super.hls-class-plugin;
hls-alternate-number-format-plugin = dontCheck super.hls-alternate-number-format-plugin;
hls-qualify-imported-names-plugin = dontCheck super.hls-qualify-imported-names-plugin;
hls-haddock-comments-plugin = dontCheck super.hls-haddock-comments-plugin;
hls-tactics-plugin = dontCheck super.hls-tactics-plugin;
hls-call-hierarchy-plugin = dontCheck super.hls-call-hierarchy-plugin;
hls-selection-range-plugin = dontCheck super.hls-selection-range-plugin;
}

View file

@ -55,7 +55,7 @@ in
, changelog ? null
, mainProgram ? null
, doCoverage ? false
, doHaddock ? !(ghc.isHaLVM or false)
, doHaddock ? !(ghc.isHaLVM or false) && (ghc.hasHaddock or true)
, doHaddockInterfaces ? doHaddock && lib.versionAtLeast ghc.version "9.0.1"
, passthru ? {}
, pkg-configDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? []

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,69 @@
diff --git a/Crypto/KDF/Argon2.hs b/Crypto/KDF/Argon2.hs
index 044ba00..31dc6f1 100644
--- a/Crypto/KDF/Argon2.hs
+++ b/Crypto/KDF/Argon2.hs
@@ -12,6 +12,7 @@
-- File started from Argon2.hs, from Oliver Charles
-- at https://github.com/ocharles/argon2
--
+{-# LANGUAGE DataKinds #-}
module Crypto.KDF.Argon2
(
Options(..)
@@ -32,6 +33,7 @@ import Control.Monad (when)
import Data.Word
import Foreign.C
import Foreign.Ptr
+import Data.Proxy
-- | Which variant of Argon2 to use. You should choose the variant that is most
-- applicable to your intention to hash inputs.
@@ -100,33 +102,12 @@ defaultOptions =
}
hash :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray out)
- => Options
+ => [Proxy "cryptonite:Crypto.KDF.Argon2.hash is known to be broken on this architecture. See https://github.com/haskell-crypto/cryptonite/issues/360"]
-> password
-> salt
-> Int
-> CryptoFailable out
-hash options password salt outLen
- | saltLen < saltMinLength = CryptoFailed CryptoError_SaltTooSmall
- | outLen < outputMinLength = CryptoFailed CryptoError_OutputLengthTooSmall
- | outLen > outputMaxLength = CryptoFailed CryptoError_OutputLengthTooBig
- | otherwise = CryptoPassed $ B.allocAndFreeze outLen $ \out -> do
- res <- B.withByteArray password $ \pPass ->
- B.withByteArray salt $ \pSalt ->
- argon2_hash (iterations options)
- (memory options)
- (parallelism options)
- pPass
- (csizeOfInt passwordLen)
- pSalt
- (csizeOfInt saltLen)
- out
- (csizeOfInt outLen)
- (cOfVariant $ variant options)
- (cOfVersion $ version options)
- when (res /= 0) $ error "argon2: hash: internal error"
- where
- saltLen = B.length salt
- passwordLen = B.length password
+hash options password salt outLen = error "cryptonite:Crypto.KDF.Argon2.hash is known to be broken on this architecture. See https://github.com/haskell-crypto/cryptonite/issues/360"
data Pass
data Salt
diff --git a/tests/KAT_Argon2.hs b/tests/KAT_Argon2.hs
index a347fc5..fdba079 100644
--- a/tests/KAT_Argon2.hs
+++ b/tests/KAT_Argon2.hs
@@ -32,7 +32,7 @@ kdfTests = zipWith toKDFTest is vectors
where
toKDFTest i v =
testCase (show i)
- (CryptoPassed (kdfResult v) @=? Argon2.hash (kdfOptions v) (kdfPass v) (kdfSalt v) (B.length $ kdfResult v))
+ (pure ())
is :: [Int]
is = [1..]

View file

@ -0,0 +1,95 @@
diff --git a/lambdabot-core.cabal b/lambdabot-core.cabal
index 861a28b..87175a3 100644
--- a/lambdabot-core.cabal
+++ b/lambdabot-core.cabal
@@ -19,7 +19,7 @@ homepage: https://wiki.haskell.org/Lambdabot
build-type: Simple
cabal-version: >= 1.10
-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4
+tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4, GHC == 9.0.2
extra-source-files: AUTHORS.md
COMMENTARY.md
@@ -89,9 +89,8 @@ library
network-bsd >= 2.7 && < 2.9,
parsec >= 3,
prim-uniq >= 0.2 && < 0.4,
- random >= 1,
- random-fu >= 0.2.6.2,
- random-source >= 0.3,
+ random >= 1.2,
+ random-fu >= 0.3.0.0,
regex-tdfa >= 1.1 && < 1.4,
SafeSemaphore >= 0.9,
split >= 0.2,
diff --git a/src/Lambdabot/Bot.hs b/src/Lambdabot/Bot.hs
index 1b0de2e..833fb4c 100644
--- a/src/Lambdabot/Bot.hs
+++ b/src/Lambdabot/Bot.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TemplateHaskell #-}
-- | The guts of lambdabot.
--
-- The LB/Lambdabot monad
@@ -37,7 +36,6 @@ import Control.Monad.Error
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.Map as M
-import Data.Random.Source
import qualified Data.Set as S
------------------------------------------------------------------------
@@ -136,17 +134,3 @@ ircPrivmsg who msg = do
ircPrivmsg' :: Nick -> String -> LB ()
ircPrivmsg' who "" = ircPrivmsg' who " "
ircPrivmsg' who msg = send $ privmsg who msg
-
-------------------------------------------------------------------------
-
-monadRandom [d|
-
- instance MonadRandom LB where
- getRandomWord8 = liftIO getRandomWord8
- getRandomWord16 = liftIO getRandomWord16
- getRandomWord32 = liftIO getRandomWord32
- getRandomWord64 = liftIO getRandomWord64
- getRandomDouble = liftIO getRandomDouble
- getRandomNByteInteger n = liftIO (getRandomNByteInteger n)
-
- |]
diff --git a/src/Lambdabot/Util.hs b/src/Lambdabot/Util.hs
index effdf71..259699b 100644
--- a/src/Lambdabot/Util.hs
+++ b/src/Lambdabot/Util.hs
@@ -23,14 +23,15 @@ module Lambdabot.Util (
randomSuccessMsg
) where
+import Control.Concurrent.Lifted
import Control.Monad.Trans
+import Control.Monad.Trans.Control
import Data.Char
import Data.List
import Data.Random
-import Control.Concurrent.Lifted
-import Control.Monad.Trans.Control
import Lambdabot.Config
import Lambdabot.Config.Core
+import System.Random.Stateful (newIOGenM, newStdGen)
------------------------------------------------------------------------
@@ -63,7 +64,9 @@ listToStr conj (item:items) =
-- | Pick a random element of the list.
random :: MonadIO m => [a] -> m a
-random = io . sample . randomElement
+random l = do
+ g <- newIOGenM =<< newStdGen
+ sampleFrom g (randomElement l)
------------------------------------------------------------------------

View file

@ -0,0 +1,58 @@
diff --git a/lambdabot-novelty-plugins.cabal b/lambdabot-novelty-plugins.cabal
index 69c8447..50a35f6 100644
--- a/lambdabot-novelty-plugins.cabal
+++ b/lambdabot-novelty-plugins.cabal
@@ -36,7 +36,7 @@ homepage: https://wiki.haskell.org/Lambdabot
build-type: Simple
cabal-version: >= 1.10
-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4
+tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4, GHC == 9.0.2
source-repository head
type: git
@@ -71,7 +71,8 @@ library
lambdabot-core >= 5.3 && < 5.4,
misfortune >= 0.1,
process >= 1.1,
- random-fu >= 0.2.6.2,
+ random >= 1.2,
+ random-fu >= 0.3.0.0,
regex-tdfa >= 1.1,
-- runtime dependencies
diff --git a/src/Lambdabot/Plugin/Novelty/Numberwang.hs b/src/Lambdabot/Plugin/Novelty/Numberwang.hs
index ae41eb4..8321a14 100644
--- a/src/Lambdabot/Plugin/Novelty/Numberwang.hs
+++ b/src/Lambdabot/Plugin/Novelty/Numberwang.hs
@@ -7,7 +7,9 @@ import Control.Monad
import Data.Random
import Data.Random.Distribution.Poisson
import Lambdabot.Plugin
+import Lambdabot.Util
import Numeric
+import System.Random.Stateful (newIOGenM, newStdGen)
data NumberwangState = State
@@ -23,7 +25,9 @@ conDist = poisson (32 :: Double)
numberwangPlugin :: Module NumberwangState
numberwangPlugin = newModule
- { moduleDefState = sample (State <$> cmdDist <*> conDist)
+ { moduleDefState = do
+ g <- newIOGenM =<< newStdGen
+ sampleFrom g (State <$> cmdDist <*> conDist)
, moduleCmds = return
[ (command "numberwang")
{ help = say "@numberwang <number>: Determines if it is Numberwang."
@@ -61,7 +65,8 @@ checkNumberwang :: (MonadLBState m, LBState m ~ NumberwangState) =>
checkNumberwang cmd l = withState cmd $ \ n setN nDist -> do
if n <= l
then do
- setN =<< lb (sample nDist)
+ g <- newIOGenM =<< newStdGen
+ setN =<< sampleFrom g nDist
return True
else do
setN (n - l)

View file

@ -0,0 +1,70 @@
diff --git a/misfortune.cabal b/misfortune.cabal
index f5d0dd3..faa5794 100644
--- a/misfortune.cabal
+++ b/misfortune.cabal
@@ -113,7 +113,8 @@ Library
directory,
filepath,
knob,
- random-fu >= 0.2.2,
+ random,
+ random-fu >= 0.3,
semigroups,
text,
utf8-string,
diff --git a/src/Data/Fortune.hs b/src/Data/Fortune.hs
index 16d221e..ffbc970 100644
--- a/src/Data/Fortune.hs
+++ b/src/Data/Fortune.hs
@@ -64,6 +64,7 @@ import Paths_misfortune
import System.Directory
import System.Environment
import System.FilePath
+import System.Random.Stateful (newIOGenM, newStdGen)
-- |The number of fortune strings in the index
numFortunes :: S.FortuneStats -> Int
@@ -233,9 +234,10 @@ randomFortune paths = withFortuneFiles '%' False paths $ \fs -> do
-- random fortune from that file (unformly).
randomFortuneFromRandomFile :: RVar FortuneFile -> IO String
randomFortuneFromRandomFile file = do
- f <- sample file
+ gen <- newStdGen >>= newIOGenM
+ f <- sampleFrom gen file
n <- getNumFortunes f
- i <- sample (uniform 0 (n-1))
+ i <- sampleFrom gen (uniform 0 (n-1))
T.unpack <$> getFortune f i
-- |Given a list of 'FortuneFile's, compute a distrubution over them weighted by the number
diff --git a/src/Fortune.hs b/src/Fortune.hs
index 5a27578..d6ffb74 100644
--- a/src/Fortune.hs
+++ b/src/Fortune.hs
@@ -21,6 +21,7 @@ import System.Environment
import System.Exit
import System.FilePath
import System.IO
+import System.Random.Stateful (newIOGenM, newStdGen)
import Text.Printf
import Text.Regex.Base
import Text.Regex.PCRE
@@ -200,6 +201,7 @@ main = do
fortunes <- filterM (filterFile args) (fortuneFiles args)
dist <- getDist args fortunes
+ gen <- newStdGen >>= newIOGenM
when (numEvents dist == 0) $ do
hPutStrLn stderr "No fortunes matched the filter criteria"
@@ -225,8 +227,8 @@ main = do
, let pctStr = printf "(%.2f%%)" (100 * weight / totalWeight dist) :: String
]
else do
- (file, fortuneDist) <- sample dist
- fortune <- sample fortuneDist
+ (file, fortuneDist) <- sampleFrom gen dist
+ fortune <- sampleFrom gen fortuneDist
putStrLn . T.unpack =<< getFortune file fortune
getDist :: Args -> [FortuneFile] -> IO (Categorical Float (FortuneFile, Categorical Float Int))

View file

@ -0,0 +1,19 @@
diff -rN -u old-regex-compat-tdfa/Text/Regex.hs new-regex-compat-tdfa/Text/Regex.hs
--- old-regex-compat-tdfa/Text/Regex.hs 2022-02-20 13:42:36.828752458 +0100
+++ new-regex-compat-tdfa/Text/Regex.hs 2022-02-20 13:42:36.828752458 +0100
@@ -139,7 +139,7 @@
splitRegex :: Regex -> String -> [String]
splitRegex _ [] = []
splitRegex delim strIn =
- let matches = map (!0) (matchAll delim strIn)
+ let matches = map (! 0) (matchAll delim strIn)
go _i str [] = str : []
go i str ((off,len):rest) =
let i' = off+len
@@ -194,4 +194,4 @@
then [firstline,""]
else firstline : loop remainder
--}
\ No newline at end of file
+-}

View file

@ -1,73 +0,0 @@
diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs
index 7810522..3262934 100644
--- a/src/XMonad/Core.hs
+++ b/src/XMonad/Core.hs
@@ -53,6 +53,7 @@ import System.Posix.Types (ProcessID)
import System.Process
import System.Directory
import System.Exit
+import System.Environment (lookupEnv)
import Graphics.X11.Xlib
import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
import Data.Typeable
@@ -601,6 +602,7 @@ recompile force = io $ do
lib = cfgdir </> "lib"
buildscript = cfgdir </> "build"
+ ghc <- fromMaybe "ghc" <$> liftIO (lookupEnv "NIX_GHC")
libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib
srcT <- getModTime src
binT <- getModTime bin
@@ -643,7 +645,7 @@ recompile force = io $ do
status <- bracket (openFile err WriteMode) hClose $ \errHandle ->
waitForProcess =<< if useBuildscript
then compileScript bin cfgdir buildscript errHandle
- else compileGHC bin cfgdir errHandle
+ else compileGHC ghc bin cfgdir errHandle
-- re-enable SIGCHLD:
installSignalHandlers
@@ -653,6 +655,7 @@ recompile force = io $ do
then trace "XMonad recompilation process exited with success!"
else do
ghcErr <- readFile err
+ xmessage <- fromMaybe "xmessage" <$> liftIO (lookupEnv "XMONAD_XMESSAGE")
let msg = unlines $
["Error detected while loading xmonad configuration file: " ++ src]
++ lines (if null ghcErr then show status else ghcErr)
@@ -660,7 +663,7 @@ recompile force = io $ do
-- nb, the ordering of printing, then forking, is crucial due to
-- lazy evaluation
hPutStrLn stderr msg
- forkProcess $ executeFile "xmessage" True ["-default", "okay", replaceUnicode msg] Nothing
+ forkProcess $ executeFile xmessage True ["-default", "okay", replaceUnicode msg] Nothing
return ()
return (status == ExitSuccess)
else return True
@@ -678,16 +681,16 @@ recompile force = io $ do
'\8216' -> '`' --
'\8217' -> '`' --
_ -> c
- compileGHC bin dir errHandle =
- runProcess "ghc" ["--make"
- , "xmonad.hs"
- , "-i"
- , "-ilib"
- , "-fforce-recomp"
- , "-main-is", "main"
- , "-v0"
- , "-o", bin
- ] (Just dir) Nothing Nothing Nothing (Just errHandle)
+ compileGHC ghc bin dir errHandle =
+ runProcess ghc ["--make"
+ , "xmonad.hs"
+ , "-i"
+ , "-ilib"
+ , "-fforce-recomp"
+ , "-main-is", "main"
+ , "-v0"
+ , "-o", bin
+ ] (Just dir) Nothing Nothing Nothing (Just errHandle)
compileScript bin dir script errHandle =
runProcess script [bin] (Just dir) Nothing Nothing Nothing (Just errHandle)

View file

@ -21,13 +21,13 @@
mkDerivation rec {
pname = "nix-linter";
version = "0.2.0.3";
version = "0.2.0.4";
src = fetchFromGitHub {
owner = "Synthetica9";
repo = "nix-linter";
rev = "38c4a14681cf3a1e6f098d8b723db503910a28d8";
sha256 = "16igk4xnm4mg9mw0zg2zk6s44axia3fs6334fasvjy0c7cjwk4c7";
rev = "ecdd50750fd3ffaff83c0637474b884a0c38f8b9";
sha256 = "0hm6iaamh1wlvqk8z4yfh4idgbclbsimxhlgflwz2hnv9mm12sf1";
};
isLibrary = false;

View file

@ -1,7 +1,6 @@
{ lib
, stdenv
, supportedGhcVersions ? [ "884" "8107" "902" ]
++ lib.optionals (!stdenv.hostPlatform.isAarch64) [ "921" ]
, supportedGhcVersions ? [ "884" "8107" "902" "922" ]
, dynamic ? false
, haskellPackages
, haskell

View file

@ -8,24 +8,7 @@ in
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed];
buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];
patches = (drv.patches or []) ++ [
# Support citerefentry DocBook element.
# https://github.com/jgm/pandoc/pull/7437
(fetchpatch {
url = "https://github.com/jgm/pandoc/commit/06408d08e5ccf06a6a04c9b77470e6a67d98e52c.patch";
sha256 = "gOtrWVylzwgu0YLD4SztqlXxtaXXGOf8nTqLwUBS7qs=";
})
];
}) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate
# a `Paths_*` module for figuring out their version.
# The `Paths_*` module is generated by Cabal, and contains the
# version, but also paths to e.g. the data directories, which
# 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.HTTP ];
postInstall = drv.postInstall or "" + ''
remove-references-to \
-t ${haskellPackages.pandoc-types} \
@ -34,4 +17,13 @@ in
-t ${haskellPackages.HTTP} \
$out/bin/pandoc
'';
}) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate
# a `Paths_*` module for figuring out their version.
# The `Paths_*` module is generated by Cabal, and contains the
# version, but also paths to e.g. the data directories, which
# 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.HTTP ];
})

View file

@ -253,6 +253,7 @@ mapAliases ({
demjson = with python3Packages; toPythonApplication demjson; # Added 2022-01-18
desktop_file_utils = throw "'desktop_file_utils' has been renamed to/replaced by 'desktop-file-utils'"; # Converted to throw 2022-02-22
devicemapper = throw "'devicemapper' has been renamed to/replaced by 'lvm2'"; # Converted to throw 2022-02-22
dhall-text = throw "'dhall-text' has been deprecated in favor of the 'dhall text' command from 'dhall'"; # Added 2022-03-26
digikam5 = throw "'digikam5' has been renamed to/replaced by 'digikam'"; # Converted to throw 2022-02-22
displaycal = throw "displaycal has been removed from nixpkgs, as it hasn't migrated to python3"; # Added 2022-01-12
dmtx = throw "'dmtx' has been renamed to/replaced by 'dmtx-utils'"; # Converted to throw 2022-02-22

View file

@ -8850,7 +8850,11 @@ with pkgs;
pagmo2 = callPackage ../development/libraries/pagmo2 { };
pakcs = callPackage ../development/compilers/pakcs { };
pakcs = callPackage ../development/compilers/pakcs {
# Doesn't compile with GHC 9.0 due to whitespace syntax changes
# see also https://github.com/NixOS/nixpkgs/issues/166108
haskellPackages = haskell.packages.ghc8107;
};
pal = callPackage ../tools/misc/pal { };
@ -11601,7 +11605,9 @@ with pkgs;
yggdrasil = callPackage ../tools/networking/yggdrasil { };
# To expose more packages for Yi, override the extraPackages arg.
yi = callPackage ../applications/editors/yi/wrapper.nix { };
yi = callPackage ../applications/editors/yi/wrapper.nix {
haskellPackages = haskell.packages.ghc8107;
};
yj = callPackage ../development/tools/yj { };
@ -12640,7 +12646,11 @@ with pkgs;
# Please update doc/languages-frameworks/haskell.section.md, “Our
# current default compiler is”, if you bump this:
haskellPackages = dontRecurseIntoAttrs haskell.packages.ghc8107;
haskellPackages = dontRecurseIntoAttrs
# Prefer native-bignum to avoid linking issues with gmp
(if stdenv.hostPlatform.isStatic
then haskell.packages.native-bignum.ghc902
else haskell.packages.ghc902);
# haskellPackages.ghc is build->host (it exposes the compiler used to build the
# set, similarly to stdenv.cc), but pkgs.ghc should be host->target to be more
@ -12650,11 +12660,16 @@ with pkgs;
# the withPackages wrapper available. In the final cross-compiled package set
# however, targetPackages won't be populated, so we need to fall back to the
# plain, cross-compiled compiler (which is only theoretical at the moment).
ghc = targetPackages.haskellPackages.ghc or haskell.compiler.ghc8107;
ghc = targetPackages.haskellPackages.ghc or
# Prefer native-bignum to avoid linking issues with gmp
(if stdenv.targetPlatform.isStatic
then haskell.compiler.native-bignum.ghc902
else haskell.compiler.ghc902);
cabal-install = haskell.lib.compose.justStaticExecutables haskellPackages.cabal-install;
stack = haskell.lib.compose.justStaticExecutables haskellPackages.stack;
hlint = haskell.lib.compose.justStaticExecutables haskellPackages.hlint;
krank = haskell.lib.compose.justStaticExecutables haskellPackages.krank;
@ -13838,8 +13853,6 @@ with pkgs;
dhall-nixpkgs = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-nixpkgs;
dhall-text = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-text;
dhallPackages = recurseIntoAttrs (callPackage ./dhall-packages.nix { });
duktape = callPackage ../development/interpreters/duktape { };
@ -13902,7 +13915,7 @@ with pkgs;
stdenv = clangStdenv;
};
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc921.jacinda;
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc922.jacinda;
janet = callPackage ../development/interpreters/janet {};
@ -15826,7 +15839,7 @@ with pkgs;
shards;
shellcheck = callPackage ../development/tools/shellcheck {
ShellCheck = haskellPackages.ShellCheck_0_8_0;
inherit (haskellPackages) ShellCheck;
};
shellharden = callPackage ../development/tools/shellharden {};
@ -29437,8 +29450,10 @@ with pkgs;
# customConfig = builtins.readFile ./tabbed.config.h;
};
taffybar = callPackage ../applications/window-managers/taffybar {
inherit (haskellPackages) ghcWithPackages taffybar;
# Use GHC 9.0 when this asserts starts to fire
taffybar = assert haskellPackages.taffybar.version == "3.3.0";
callPackage ../applications/window-managers/taffybar {
inherit (haskell.packages.ghc8107) ghcWithPackages taffybar;
};
tagainijisho = callPackage ../applications/office/tagainijisho {};

View file

@ -13,13 +13,13 @@ let
"integer-simple"
"native-bignum"
"ghc902"
"ghc921"
"ghc922"
"ghcHEAD"
];
nativeBignumIncludes = [
"ghc902"
"ghc921"
"ghc922"
"ghcHEAD"
];
@ -118,7 +118,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc921 = callPackage ../development/compilers/ghc/9.2.1.nix {
ghc922 = callPackage ../development/compilers/ghc/9.2.2.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.isAarch64 || stdenv.isAarch32 then
@ -224,9 +224,9 @@ in {
ghc = bh.compiler.ghc902;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
ghc921 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc921;
ghc = bh.compiler.ghc921;
ghc922 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc922;
ghc = bh.compiler.ghc922;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghcHEAD = callPackage ../development/haskell-modules {

View file

@ -52,7 +52,7 @@ let
ghc884
ghc8107
ghc902
ghc921
ghc922
];
# packagePlatforms applied to `haskell.packages.*`
@ -157,7 +157,6 @@ let
dhall-lsp-server
dhall-json
dhall-nix
dhall-text
diagrams-builder
elm2nix
fffuu
@ -285,18 +284,29 @@ let
# Test some statically linked packages to catch regressions
# and get some cache going for static compilation with GHC.
# Use integer-simple to avoid GMP linking problems (LGPL)
pkgsStatic.haskell.packages.integer-simple.ghc8107 =
pkgsStatic.haskell.packages =
removePlatforms
[
"aarch64-linux" # times out on Hydra
"x86_64-darwin" # TODO: reenable when static libiconv works on darwin
]
{
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.integer-simple.ghc8107)
hello
lens
random
] {
integer-simple.ghc8107 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.integer-simple.ghc8107)
hello
lens
random
QuickCheck
;
};
native-bignum.ghc902 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc902)
hello
lens
random
QuickCheck
;
};
};
})
(versionedCompilerJobs {
@ -307,7 +317,7 @@ let
# package sets (like Cabal, jailbreak-cabal) are
# working as expected.
cabal-install = released;
Cabal_3_6_2_0 = released;
Cabal_3_6_3_0 = released;
cabal2nix = released;
cabal2nix-unstable = released;
funcmp = released;
@ -324,6 +334,13 @@ let
compilerNames.ghc8107
compilerNames.ghc902
];
ghc-bignum = [
compilerNames.ghc884
compilerNames.ghc8107
];
ghc-lib = released;
ghc-lib-parser = released;
ghc-lib-parser-ex = released;
})
{
mergeable = pkgs.releaseTools.aggregate {
@ -355,7 +372,6 @@ let
jobs.haskellPackages.cabal-plan
jobs.haskellPackages.distribution-nixpkgs
jobs.haskellPackages.hackage-db
jobs.haskellPackages.policeman
jobs.haskellPackages.xmonad
jobs.haskellPackages.xmonad-contrib
# haskell packages maintained by @peti
@ -391,11 +407,11 @@ let
jobs.pkgsMusl.haskell.compiler.ghc884
jobs.pkgsMusl.haskell.compiler.ghc8107
jobs.pkgsMusl.haskell.compiler.ghc902
jobs.pkgsMusl.haskell.compiler.ghc921
jobs.pkgsMusl.haskell.compiler.ghc922
jobs.pkgsMusl.haskell.compiler.ghcHEAD
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc921
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc922
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};
@ -413,6 +429,9 @@ let
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8107.hello
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8107.lens
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8107.random
jobs.pkgsStatic.haskell.packages.native-bignum.ghc902.hello
jobs.pkgsStatic.haskell.packages.native-bignum.ghc902.lens
jobs.pkgsStatic.haskell.packages.native-bignum.ghc902.random
];
};
}