Skip to content

Commit 0a0021d

Browse files
committed
Merge branch 'master' of github.com:input-output-hk/haskell.nix into circuithub
2 parents bcb20c5 + 5bc6f74 commit 0a0021d

File tree

1,898 files changed

+210
-679930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,898 files changed

+210
-679930
lines changed

build.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ in rec {
2626

2727
tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
2828
pkgs.recurseIntoAttrs ({
29-
cabal-latest = tool compiler-nix-name "cabal" { inherit evalPackages; };
29+
cabal-latest = tool compiler-nix-name "cabal" ({
30+
inherit evalPackages;
31+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.10" "9.12") {
32+
cabalProjectLocal = builtins.readFile ./test/cabal.project.local;
33+
});
3034
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) {
3135
hlint-latest = tool compiler-nix-name "hlint" {
3236
inherit evalPackages;
@@ -58,10 +62,10 @@ in rec {
5862
inherit evalPackages;
5963
src = pkgs.haskell-nix.sources."hls-2.2";
6064
};
61-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.10") {
62-
"hls-27" = tool compiler-nix-name "haskell-language-server" {
65+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.9") {
66+
"hls-28" = tool compiler-nix-name "haskell-language-server" {
6367
inherit evalPackages;
64-
src = pkgs.haskell-nix.sources."hls-2.7";
68+
src = pkgs.haskell-nix.sources."hls-2.8";
6569
};
6670
})
6771
);

builder/comp-builder.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ let
419419

420420
nativeBuildInputs =
421421
[ghc buildPackages.removeReferencesTo]
422-
++ executableToolDepends;
422+
++ executableToolDepends
423+
++ (lib.optional stdenv.hostPlatform.isGhcjs buildPackages.nodejs);
423424

424425
outputs = ["out"]
425426
++ (lib.optional keepConfigFiles "configFiles")

builder/hspkg-builder.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ let
3131

3232
cabalFile = if package-description-override == null || bundledSrc != null then null else package-description-override;
3333

34-
defaultSetupSrc = if stdenv.hostPlatform.isGhcjs then ./Setup.ghcjs.hs else ./Setup.hs;
34+
# New GHC JS backend run emcc itself without the need for custom Setup.hs
35+
oldGhcjs = stdenv.hostPlatform.isGhcjs && builtins.compareVersions ghc.version "9.10" < 0;
36+
defaultSetupSrc = if oldGhcjs then ./Setup.ghcjs.hs else ./Setup.hs;
3537

3638
setup = if package.buildType == "Simple"
3739
then
38-
if stdenv.targetPlatform.isGhcjs # TODO probably should be hostPlatform, but only HsColour used to build ghc will change (updating will require rebuilding all the ghcjs versions)
40+
if oldGhcjs
3941
then
4042
buildPackages.haskell-nix.nix-tools-unchecked.exes.default-setup-ghcjs // { exeName = "default-setup-ghcjs"; }
4143
else

ci.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
ghc96llvm = true;
7474
ghc98 = true;
7575
ghc98llvm = true;
76-
ghc910X = true;
76+
ghc910 = true;
7777
ghc911 = true;
7878
})));
7979
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name:

flake.lock

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"hls-2.5" = { url = "github:haskell/haskell-language-server/2.5.0.0"; flake = false; };
3232
"hls-2.6" = { url = "github:haskell/haskell-language-server/2.6.0.0"; flake = false; };
3333
"hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; };
34+
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
3435
hydra.url = "hydra";
3536
hackage = {
3637
url = "github:input-output-hk/hackage.nix";

lib/call-cabal-project-to-nix.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ let
290290

291291
ghcSrc = ghc.raw-src or ghc.buildGHC.raw-src;
292292

293-
fixPlatformString = x: builtins.replaceStrings ["-linux-gnu"] ["-linux"] x;
293+
platformString = p: with p.parsed; "${cpu.name}-${vendor.name}-${kernel.name}";
294294

295295
# Dummy `ghc` that uses the captured output
296296
dummy-ghc = evalPackages.writeTextFile {
@@ -341,10 +341,10 @@ let
341341
then "ArchJavaScript"
342342
else throw "Unknown target arch ${pkgs.stdenv.targetPlatform.config}"
343343
}")'
344-
echo ',("target platform string","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
345-
echo ',("Build platform","${fixPlatformString pkgs.stdenv.buildPlatform.config}")'
346-
echo ',("Host platform","${fixPlatformString pkgs.stdenv.hostPlatform.config}")'
347-
echo ',("Target platform","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
344+
echo ',("target platform string","${platformString pkgs.stdenv.targetPlatform}")'
345+
echo ',("Build platform","${platformString pkgs.stdenv.buildPlatform}")'
346+
echo ',("Host platform","${platformString pkgs.stdenv.hostPlatform}")'
347+
echo ',("Target platform","${platformString pkgs.stdenv.targetPlatform}")'
348348
echo ']'
349349
;;
350350
--print-libdir*)

lib/check.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ stdenv, lib, haskellLib, buildPackages }:
2-
drv:
2+
let self = drv:
33

44
let
55
component = drv.config;
@@ -28,6 +28,8 @@ in stdenv.mkDerivation ((
2828

2929
passthru = {
3030
inherit (drv) identifier config configFiles executableToolDepends cleanSrc env exeName;
31+
profiled = self drv.profiled;
32+
dwarf = self drv.dwarf;
3133
};
3234

3335
inherit (drv) meta LANG LC_ALL buildInputs;
@@ -62,4 +64,5 @@ in stdenv.mkDerivation ((
6264
inherit (component) preCheck postCheck;
6365
}
6466
// lib.optionalAttrs (drv ? LOCALE_ARCHIVE) { inherit (drv) LOCALE_ARCHIVE; }
65-
)
67+
);
68+
in self

0 commit comments

Comments
 (0)