Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into hkm/embed-file
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Jul 4, 2024
2 parents 7449816 + cbd75e3 commit cbcb640
Show file tree
Hide file tree
Showing 157 changed files with 4,794 additions and 717 deletions.
6 changes: 3 additions & 3 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ in rec {
inherit evalPackages;
src = pkgs.haskell-nix.sources."hls-2.2";
};
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.9") {
"hls-28" = tool compiler-nix-name "haskell-language-server" {
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.11") {
"hls-29" = tool compiler-nix-name "haskell-language-server" {
inherit evalPackages;
src = pkgs.haskell-nix.sources."hls-2.8";
src = pkgs.haskell-nix.sources."hls-2.9";
};
})
);
Expand Down
4 changes: 2 additions & 2 deletions builder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# tl;dr: the builder must not re-introduce any reference to the build plan.

{ pkgs, buildPackages, evalPackages, stdenv, lib, haskellLib, ghc, compiler-nix-name, fetchurl, nonReinstallablePkgs, hsPkgs, compiler }:
{ pkgs, buildPackages, pkgsBuildBuild, evalPackages, stdenv, lib, haskellLib, ghc, compiler-nix-name, fetchurl, nonReinstallablePkgs, hsPkgs, compiler }:

let
# Builds a single component of a package.
Expand Down Expand Up @@ -85,7 +85,7 @@ let

# Same as haskellPackages.shellFor in nixpkgs.
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib buildPackages evalPackages compiler;
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib pkgsBuildBuild evalPackages compiler;
inherit (buildPackages) glibcLocales;
};

Expand Down
8 changes: 4 additions & 4 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, mkShell, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, evalPackages, compiler }:
{ lib, stdenv, mkShell, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, pkgsBuildBuild, evalPackages, compiler }:

{ # `packages` function selects packages that will be worked on in the shell itself.
# These packages will not be built by `shellFor`, but their
Expand Down Expand Up @@ -149,7 +149,7 @@ let
# inherit (hsPkgs) hoogle;
} // (
lib.optionalAttrs (args ? tools && args.tools ? hoogle) {
hoogle = buildPackages.haskell-nix.hackage-tool (
hoogle = pkgsBuildBuild.haskell-nix.hackage-tool (
haskellLib.versionOrModToMods args.tools.hoogle ++ [{
name = "hoogle";
compiler-nix-name = compiler.nix-name;
Expand All @@ -168,12 +168,12 @@ in
nativeBuildInputs = [ ghcEnv.drv ]
++ nativeBuildInputs
++ mkDrvArgs.nativeBuildInputs or []
++ lib.attrValues (buildPackages.haskell-nix.tools' evalPackages compiler.nix-name tools)
++ lib.attrValues (pkgsBuildBuild.haskell-nix.tools' evalPackages compiler.nix-name tools)
# If this shell is a cross compilation shell include
# wrapper script for running cabal build with appropriate args.
# Includes `--with-compiler` in case the `cabal.project` file has `with-compiler:` in it.
++ lib.optional (ghcEnv.targetPrefix != "") (
buildPackages.writeShellScriptBin "${ghcEnv.targetPrefix}cabal" ''
pkgsBuildBuild.writeShellScriptBin "${ghcEnv.targetPrefix}cabal" ''
exec cabal \
--with-ghc=${ghcEnv.targetPrefix}ghc \
--with-compiler=${ghcEnv.targetPrefix}ghc \
Expand Down
2 changes: 1 addition & 1 deletion ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (
(__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884"])
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc91120240620"]) # Including GHC HEAD here because the patches for rts/RtsSymbols.c no longer apply and mingwW64 GHC build fails without them
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (nixpkgsName == "unstable"
Expand Down
69 changes: 24 additions & 45 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
# And later it breaks in th-dll due to some change in the windows libs. We should probably
# drop unsable.
nixpkgs-unstable = { url = "github:NixOS/nixpkgs?rev=47585496bcb13fb72e4a90daeea2f434e2501998"; }; # nixpkgs-unstable };
ghc910X = {
flake = false;
url = "git+https://gitlab.haskell.org/ghc/ghc?ref=ghc-9.10&submodules=1";
};
ghc911 = {
flake = false;
url = "git+https://gitlab.haskell.org/ghc/ghc?submodules=1";
};
flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; };
"hls-1.10" = { url = "github:haskell/haskell-language-server/1.10.0.0"; flake = false; };
"hls-2.0" = { url = "github:haskell/haskell-language-server/2.0.0.1"; flake = false; };
Expand All @@ -32,6 +24,7 @@
"hls-2.6" = { url = "github:haskell/haskell-language-server/2.6.0.0"; flake = false; };
"hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; };
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
"hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.0"; flake = false; };
hydra.url = "hydra";
hackage = {
url = "github:input-output-hk/hackage.nix";
Expand Down
37 changes: 37 additions & 0 deletions lazy-inputs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
final: prev:
let
callFlake = import prev.haskell-nix.sources.flake-compat;
in {
haskell-nix = prev.haskell-nix // {
sources = prev.haskell-nix.sources // {
inherit ((callFlake { pkgs = final; src = ./ghc8107; }).defaultNix) ghc8107;
inherit ((callFlake { pkgs = final; src = ./ghc901; }).defaultNix) ghc901;
inherit ((callFlake { pkgs = final; src = ./ghc902; }).defaultNix) ghc902;
inherit ((callFlake { pkgs = final; src = ./ghc921; }).defaultNix) ghc921;
inherit ((callFlake { pkgs = final; src = ./ghc922; }).defaultNix) ghc922;
inherit ((callFlake { pkgs = final; src = ./ghc923; }).defaultNix) ghc923;
inherit ((callFlake { pkgs = final; src = ./ghc924; }).defaultNix) ghc924;
inherit ((callFlake { pkgs = final; src = ./ghc925; }).defaultNix) ghc925;
inherit ((callFlake { pkgs = final; src = ./ghc926; }).defaultNix) ghc926;
inherit ((callFlake { pkgs = final; src = ./ghc927; }).defaultNix) ghc927;
inherit ((callFlake { pkgs = final; src = ./ghc928; }).defaultNix) ghc928;
inherit ((callFlake { pkgs = final; src = ./ghc941; }).defaultNix) ghc941;
inherit ((callFlake { pkgs = final; src = ./ghc942; }).defaultNix) ghc942;
inherit ((callFlake { pkgs = final; src = ./ghc943; }).defaultNix) ghc943;
inherit ((callFlake { pkgs = final; src = ./ghc944; }).defaultNix) ghc944;
inherit ((callFlake { pkgs = final; src = ./ghc945; }).defaultNix) ghc945;
inherit ((callFlake { pkgs = final; src = ./ghc946; }).defaultNix) ghc946;
inherit ((callFlake { pkgs = final; src = ./ghc947; }).defaultNix) ghc947;
inherit ((callFlake { pkgs = final; src = ./ghc948; }).defaultNix) ghc948;
inherit ((callFlake { pkgs = final; src = ./ghc961; }).defaultNix) ghc961;
inherit ((callFlake { pkgs = final; src = ./ghc962; }).defaultNix) ghc962;
inherit ((callFlake { pkgs = final; src = ./ghc963; }).defaultNix) ghc963;
inherit ((callFlake { pkgs = final; src = ./ghc964; }).defaultNix) ghc964;
inherit ((callFlake { pkgs = final; src = ./ghc965; }).defaultNix) ghc965;
inherit ((callFlake { pkgs = final; src = ./ghc966; }).defaultNix) ghc966;
inherit ((callFlake { pkgs = final; src = ./ghc981; }).defaultNix) ghc981;
inherit ((callFlake { pkgs = final; src = ./ghc982; }).defaultNix) ghc982;
inherit ((callFlake { pkgs = final; src = ./ghc9101; }).defaultNix) ghc9101;
};
};
}
30 changes: 30 additions & 0 deletions lazy-inputs/ghc8107/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions lazy-inputs/ghc8107/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
description = "Lazy Input for Haskell.nix";

inputs = {
ghc8107 = {
flake = false;
url = "git+https://github.com/stable-haskell/ghc?ref=ghc-8.10.7-iog&submodules=1";
};
};

outputs = inputs: inputs;
}
30 changes: 30 additions & 0 deletions lazy-inputs/ghc901/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions lazy-inputs/ghc901/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
description = "Lazy Input for Haskell.nix";

inputs = {
ghc901 = {
flake = false;
url = "git+https://github.com/stable-haskell/ghc?ref=ghc-9.0.1-iog&submodules=1";
};
};

outputs = inputs: inputs;
}
30 changes: 30 additions & 0 deletions lazy-inputs/ghc902/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions lazy-inputs/ghc902/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
description = "Lazy Input for Haskell.nix";

inputs = {
ghc902 = {
flake = false;
url = "git+https://github.com/stable-haskell/ghc?ref=ghc-9.0.2-iog&submodules=1";
};
};

outputs = inputs: inputs;
}
Loading

0 comments on commit cbcb640

Please sign in to comment.