haskell.{compiler,packages}: Add aliases without minor versions

maralorn fae2ff5c 161a30b7

Changed files
+78 -50
nixos
doc
manual
modules
services
x11
window-managers
pkgs
development
compilers
tools
haskell
haskell-language-server
top-level
+2 -2
nixos/doc/manual/development/option-declarations.section.md
···
```nix
lib.mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
-
example = "pkgs.haskell.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])";
+
example = "pkgs.haskell.packages.ghc92.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.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])";
+
example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
description = "The GHC package to use.";
}
```
+2 -2
nixos/doc/manual/from_md/development/option-declarations.section.xml
···
<programlisting language="bash">
lib.mkPackageOption pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ];
-
example = &quot;pkgs.haskell.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
+
example = &quot;pkgs.haskell.packages.ghc92.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.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
+
example = lib.literalExpression &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
description = &quot;The GHC package to use.&quot;;
}
</programlisting>
+12
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
···
<literal>java-packages.compiler</literal>.
</para>
</listitem>
+
<listitem>
+
<para>
+
The sets <literal>haskell.packages</literal> and
+
<literal>haskell.compiler</literal> now contain for every ghc
+
version an attribute with the minor version dropped. E.g. for
+
<literal>ghc8107</literal> there also now exists
+
<literal>ghc810</literal>. Those attributes point to the same
+
compilers and packagesets but have the advantage that e.g.
+
<literal>ghc92</literal> stays stable when we update from
+
<literal>ghc924</literal> to <literal>ghc925</literal>.
+
</para>
+
</listitem>
</itemizedlist>
</section>
</section>
+2
nixos/doc/manual/release-notes/rl-2111.section.md
···
- hydrus has been upgraded from version `438` to `463`. Since upgrading between releases this old is advised against, be sure to have a backup of your data before upgrading. For details, see [the hydrus manual](https://hydrusnetwork.github.io/hydrus/help/getting_started_installing.html#big_updates).
- More jdk and jre versions are now exposed via `java-packages.compiler`.
+
+
- The sets `haskell.packages` and `haskell.compiler` now contain for every ghc version an attribute with the minor version dropped. E.g. for `ghc8107` there also now exists `ghc810`. Those attributes point to the same compilers and packagesets but have the advantage that e.g. `ghc92` stays stable when we update from `ghc924` to `ghc925`.
+1 -1
nixos/modules/services/x11/window-managers/xmonad.nix
···
haskellPackages = mkOption {
default = pkgs.haskellPackages;
defaultText = literalExpression "pkgs.haskellPackages";
-
example = literalExpression "pkgs.haskell.packages.ghc8107";
+
example = literalExpression "pkgs.haskell.packages.ghc810";
type = types.attrs;
description = lib.mdDoc ''
haskellPackages used to build Xmonad and other packages.
+1 -1
pkgs/development/compilers/elm/default.nix
···
fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
-
hsPkgs = self: pkgs.haskell.packages.ghc8107.override {
+
hsPkgs = self: pkgs.haskell.packages.ghc810.override {
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
let elmPkgs = rec {
elm = overrideCabal (drv: {
+2 -2
pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix
···
{ lib
, stdenv
-
, supportedGhcVersions ? [ "884" "8107" "902" "924" ]
+
, supportedGhcVersions ? [ "88" "810" "90" "92" ]
, dynamic ? false
, haskellPackages
, haskell
···
#
# The recommended way to override this package is
#
-
# pkgs.haskell-language-server.override { supportedGhcVersions = [ "902" ]; }
+
# pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" ]; }
#
# for example. Read more about this in the haskell-language-server section of the nixpkgs manual.
#
+9 -9
pkgs/top-level/all-packages.nix
···
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;
+
haskellPackages = haskell.packages.ghc810;
};
pal = callPackage ../tools/misc/pal { };
···
# To expose more packages for Yi, override the extraPackages arg.
yi = callPackage ../applications/editors/yi/wrapper.nix {
-
haskellPackages = haskell.packages.ghc8107;
+
haskellPackages = haskell.packages.ghc810;
yj = callPackage ../development/tools/yj { };
···
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);
+
then haskell.packages.native-bignum.ghc90
+
else haskell.packages.ghc90);
# 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
···
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);
+
then haskell.compiler.native-bignum.ghc90
+
else haskell.compiler.ghc90);
cabal-install = haskell.lib.compose.justStaticExecutables haskellPackages.cabal-install;
···
stdenv = clangStdenv;
-
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc924.jacinda;
+
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc92.jacinda;
janet = callPackage ../development/interpreters/janet {};
···
hashi-ui = callPackage ../servers/hashi-ui {};
-
hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc8107.graphql-engine;
+
hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc810.graphql-engine;
hasura-cli = callPackage ../servers/hasura/cli.nix { };
···
# 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;
+
inherit (haskell.packages.ghc810) ghcWithPackages taffybar;
tagainijisho = libsForQt5.callPackage ../applications/office/tagainijisho {};
+21 -8
pkgs/top-level/haskell-packages.nix
···
"integer-simple"
"native-bignum"
"ghc902"
+
"ghc90"
"ghc924"
+
"ghc92"
"ghc942"
+
"ghc94"
"ghcHEAD"
];
nativeBignumIncludes = [
-
"ghc902"
-
"ghc924"
-
"ghc942"
+
"ghc90"
+
"ghc92"
+
"ghc94"
"ghcHEAD"
];
···
package-list = callPackage ../development/haskell-modules/package-list.nix {};
-
compiler = {
+
compiler = rec {
ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix {
llvmPackages = pkgs.llvmPackages_6;
···
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_7;
llvmPackages = pkgs.llvmPackages_7;
};
+
ghc88 = ghc884;
ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
bootPkgs =
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
···
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
+
ghc810 = ghc8107;
ghc902 = callPackage ../development/compilers/ghc/9.0.2.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
···
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
-
packages.ghc8107
+
packages.ghc810
else
packages.ghc8107Binary;
inherit (buildPackages.python3Packages) sphinx;
···
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
+
ghc90 = ghc902;
ghc924 = callPackage ../development/compilers/ghc/9.2.4.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.hostPlatform.isAarch then
packages.ghc8107BinaryMinimal
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
-
packages.ghc8107
+
packages.ghc810
else
packages.ghc8107Binary;
inherit (buildPackages.python3Packages) sphinx;
···
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
+
ghc92 = ghc924;
ghc942 = callPackage ../development/compilers/ghc/9.4.2.nix {
bootPkgs =
# Building with 9.2 is broken due to
···
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
+
ghc94 = ghc942;
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs =
if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
···
ghcjs = compiler.ghcjs810;
ghcjs810 = callPackage ../development/compilers/ghcjs/8.10 {
-
bootPkgs = packages.ghc8107;
+
bootPkgs = packages.ghc810;
ghcjsSrcJson = ../development/compilers/ghcjs/8.10/git.json;
stage0 = ../development/compilers/ghcjs/8.10/stage0.nix;
};
···
packageOverrides = self : super : {};
# Always get compilers from `buildPackages`
-
packages = let bh = buildPackages.haskell; in {
+
packages = let bh = buildPackages.haskell; in rec {
ghc865Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc865Binary;
···
ghc = bh.compiler.ghc884;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { };
};
+
ghc88 = ghc884;
ghc8107 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8107;
ghc = bh.compiler.ghc8107;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
};
+
ghc810 = ghc8107;
ghc902 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc902;
ghc = bh.compiler.ghc902;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
+
ghc90 = ghc902;
ghc924 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924;
ghc = bh.compiler.ghc924;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
+
ghc92 = ghc924;
ghc942 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc942;
ghc = bh.compiler.ghc942;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
+
ghc94= ghc942;
ghcHEAD = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghcHEAD;
ghc = bh.compiler.ghcHEAD;
+26 -25
pkgs/top-level/release-haskell.nix
···
# list of all compilers to test specific packages on
released = with compilerNames; [
-
ghc884
-
ghc8107
-
ghc902
-
ghc924
+
ghc88
+
ghc810
+
ghc90
+
ghc92
];
# packagePlatforms applied to `haskell.packages.*`
···
# Can't be built with musl, see meta.broken comment in the drv
integer-simple.ghc884 = {};
+
integer-simple.ghc88 = {};
};
# Get some cache going for MUSL-enabled GHC.
···
;
};
-
haskell.packages.native-bignum.ghc924 = {
-
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc924)
+
haskell.packages.native-bignum.ghc92 = {
+
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc92)
hello
lens
random
···
nix-paths = released;
titlecase = released;
ghc-api-compat = [
-
compilerNames.ghc884
-
compilerNames.ghc8107
-
compilerNames.ghc902
+
compilerNames.ghc88
+
compilerNames.ghc810
+
compilerNames.ghc90
];
ghc-bignum = [
-
compilerNames.ghc884
-
compilerNames.ghc8107
+
compilerNames.ghc88
+
compilerNames.ghc810
];
ghc-lib = released;
ghc-lib-parser = released;
ghc-lib-parser-ex = released;
spectacle = [
-
compilerNames.ghc8107
+
compilerNames.ghc810
];
weeder = [
-
compilerNames.ghc8107
-
compilerNames.ghc902
-
compilerNames.ghc924
+
compilerNames.ghc810
+
compilerNames.ghc90
+
compilerNames.ghc92
];
purescript-cst = [
-
compilerNames.ghc8107
+
compilerNames.ghc810
];
purescript-ast = [
-
compilerNames.ghc8107
+
compilerNames.ghc810
];
})
{
···
constituents = accumulateDerivations [
jobs.pkgsMusl.haskell.compiler.ghc8102Binary
jobs.pkgsMusl.haskell.compiler.ghc8107Binary
-
jobs.pkgsMusl.haskell.compiler.ghc884
-
jobs.pkgsMusl.haskell.compiler.ghc8107
-
jobs.pkgsMusl.haskell.compiler.ghc902
-
jobs.pkgsMusl.haskell.compiler.ghc924
+
jobs.pkgsMusl.haskell.compiler.ghc88
+
jobs.pkgsMusl.haskell.compiler.ghc810
+
jobs.pkgsMusl.haskell.compiler.ghc90
+
jobs.pkgsMusl.haskell.compiler.ghc92
jobs.pkgsMusl.haskell.compiler.ghcHEAD
-
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
-
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
-
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc924
+
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc810
+
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc90
+
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc92
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};
···
};
constituents = accumulateDerivations [
jobs.pkgsStatic.haskellPackages
-
jobs.pkgsStatic.haskell.packages.native-bignum.ghc924
+
jobs.pkgsStatic.haskell.packages.native-bignum.ghc92
];
};
}