Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
429923f
Switch CI eval to `aarch64-darwin`
hamishmack Sep 5, 2025
44db6a3
Disable TH tests for Windows and Android
hamishmack Sep 7, 2025
d17f385
Just test a small subset of the full CI
hamishmack Sep 9, 2025
d5d9aaf
Disable hydraJobs.nix-tools
hamishmack Sep 9, 2025
2b8464c
Trigger some IFDs
hamishmack Sep 9, 2025
20c49db
Trigger some IFDs
hamishmack Sep 9, 2025
068d175
Trigger some IFDs
hamishmack Sep 9, 2025
7a6e746
Trigger some IFDs
hamishmack Sep 9, 2025
4f7c67e
Trigger some IFDs
hamishmack Sep 10, 2025
2d3109e
Turn all the CI back on
hamishmack Sep 11, 2025
583c8a0
Disable test broken on current CI
hamishmack Sep 12, 2025
c3fcb9c
Disable tests broken on current CI
hamishmack Sep 12, 2025
f8f8a0d
Merge remote-tracking branch 'origin/master' into hkm/aarch64-darwin-…
hamishmack Sep 12, 2025
b5f9ede
Merge remote-tracking branch 'origin/master' into hkm/aarch64-darwin-…
hamishmack Sep 15, 2025
e5b2890
Bump nixpkgs
hamishmack Sep 15, 2025
45ddb1e
Remove dependencies on old nixpkgs ghc versions
hamishmack Sep 15, 2025
085e4ec
Fix for macOS
hamishmack Sep 15, 2025
9f4610b
Fix for android tests
hamishmack Sep 15, 2025
7f896f5
Possible fix for wasm issue
hamishmack Sep 22, 2025
6e429c3
Update wasm to llvm 21
hamishmack Sep 23, 2025
c35b07f
Ignore test broken by upgrading warning to error
hamishmack Sep 23, 2025
90f3cbe
Expect error not warning for llvm test
hamishmack Sep 23, 2025
23ed82d
Expect error not warning for llvm test
hamishmack Sep 23, 2025
f414232
Bump nixpkgs
hamishmack Sep 23, 2025
ae9b6cf
Use latest llvm
hamishmack Sep 25, 2025
b870359
Use llvm <21 for now
hamishmack Sep 25, 2025
1d79db0
Use nixpkgs 25.05 for older llvm versions
hamishmack Sep 25, 2025
a01cff7
Use pkgsBuildBuild.nodejs (not buildPackages.nodejs)
hamishmack Sep 25, 2025
2ccce0a
Merge remote-tracking branch 'origin/master' into hkm/aarch64-darwin-…
hamishmack Sep 25, 2025
cb1f6f3
Use llvm <20 for now
hamishmack Sep 25, 2025
eaa6894
nix flake update nixpkgs-unstable
hamishmack Sep 29, 2025
e208bf3
Disable broken tests
hamishmack Sep 30, 2025
72585af
Use $out/build for GHC builds
hamishmack Oct 7, 2025
e9ffed7
Merge remote-tracking branch 'origin/master' into hkm/aarch64-darwin-…
hamishmack Oct 10, 2025
3ea28b1
Disable broken tests
hamishmack Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/comp-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ let
nativeBuildInputs =
[ghc buildPackages.removeReferencesTo]
++ executableToolDepends
++ (lib.optional stdenv.hostPlatform.isGhcjs buildPackages.nodejs)
++ (lib.optional stdenv.hostPlatform.isGhcjs pkgsBuildBuild.nodejs)
++ (lib.optional (ghc.useLdLld or false) llvmPackages.bintools);

outputs = ["out"]
Expand Down
13 changes: 8 additions & 5 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ ifdLevel # This is passed in from flake.nix
, checkMaterialization ? false
, system ? builtins.currentSystem
, evalSystem ? builtins.currentSystem or "x86_64-linux"
, evalSystem ? "aarch64-darwin"
# NOTE: we apply checkMaterialization when defining nixpkgsArgs
, haskellNix ? import ./default.nix { inherit system ; }
}:
Expand Down Expand Up @@ -41,6 +41,8 @@
"dwarfdump-20181024"
];
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"platform-tools"
"ndk"
"android-sdk-ndk"
"android-sdk-platform-tools"
"aarch64-unknown-linux-android-ndk-toolchain-wrapper"
Expand All @@ -65,14 +67,14 @@
nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) {
ghc96 = false;
ghc98 = false;
ghc98llvm = false;
ghc910 = false;
ghc910llvm = false;
ghc912 = false;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc96 = true;
ghc98 = true;
ghc98llvm = false;
ghc910 = true;
ghc910llvm = false;
ghc912 = true;
ghc912llvm = true;
ghc913 = true;
Expand All @@ -91,7 +93,8 @@
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& !builtins.elem compiler-nix-name ["ghc967" "ghc984" "ghc9102"]) {
&& !builtins.elem compiler-nix-name ["ghc967" "ghc984" "ghc9102"]
&& system != "x86_64-darwin") {
inherit (lib.systems.examples) wasi32;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
Expand All @@ -112,7 +115,7 @@
inherit (lib.systems.examples) musl32;
} // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
inherit (lib.systems.examples) aarch64-android-prebuilt;
} // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) {
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName != "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) {
inherit (lib.systems.examples) armv7a-android-prebuilt;
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) {
# TODO fix this for the compilers we build with hadrian (ghc >=9.4)
Expand Down
47 changes: 26 additions & 21 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let self =
# build-tools
, bootPkgs
, buildPackages
, pkgsBuildBuild
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, numactl, elfutils, libcxx, libcxxabi ? throw "No libcxxabi"
, autoreconfHook
, bash
Expand Down Expand Up @@ -95,7 +96,7 @@ let self =
#
# We use this instead of `buildPackages` so that plan evaluation
# can work on platforms other than the `buildPlatform`.
, ghcEvalPackages ? buildPackages
, ghcEvalPackages ? pkgsBuildBuild
}@args:

assert !(enableIntegerSimple || enableNativeBignum) -> gmp != null;
Expand Down Expand Up @@ -128,23 +129,23 @@ let
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
'';

nodejs = buildPackages.nodejs_24;
nodejs = pkgsBuildBuild.nodejs_24;

libffi-wasm = buildPackages.runCommand "libffi-wasm" {
libffi-wasm = pkgsBuildBuild.runCommand "libffi-wasm" {
nativeBuildInputs = [
(buildPackages.haskell-nix.tool "ghc912" "libffi-wasm" {
src = buildPackages.haskell-nix.sources.libffi-wasm;
(pkgsBuildBuild.haskell-nix.tool "ghc912" "libffi-wasm" {
src = pkgsBuildBuild.haskell-nix.sources.libffi-wasm;
evalPackages = ghcEvalPackages;
})
targetPackages.buildPackages.llvmPackages.clang
targetPackages.buildPackages.llvmPackages.llvm
targetPackages.buildPackages.binaryen
pkgsBuildBuild.binaryen
];
outputs = ["out" "dev"];
NIX_NO_SELF_RPATH = true;
} ''
mkdir cbits
cp ${buildPackages.haskell-nix.sources.libffi-wasm}/cbits/* cbits/
cp ${pkgsBuildBuild.haskell-nix.sources.libffi-wasm}/cbits/* cbits/
libffi-wasm
wasm32-unknown-wasi-clang -Wall -Wextra -mcpu=mvp -Oz -DNDEBUG -Icbits -c cbits/ffi.c -o cbits/ffi.o
wasm32-unknown-wasi-clang -Wall -Wextra -mcpu=mvp -Oz -DNDEBUG -Icbits -c cbits/ffi_call.c -o cbits/ffi_call.o
Expand All @@ -159,7 +160,7 @@ let
wasm-opt --low-memory-unused --converge --debuginfo --flatten --rereloop --gufa -O4 -Oz libffi.so -o $out/lib/libffi.so
'';

lib-wasm = buildPackages.symlinkJoin {
lib-wasm = pkgsBuildBuild.symlinkJoin {
name = "lib-wasm";
paths = [ targetPackages.wasilibc libffi-wasm ];
};
Expand Down Expand Up @@ -315,13 +316,15 @@ let
compiler-nix-name =
if builtins.compareVersions ghc-version "9.4.7" < 0
then "ghc928"
else if buildPackages.haskell.compiler ? ghc966
else if pkgsBuildBuild.haskell.compiler ? ghc967
then "ghc967"
else if pkgsBuildBuild.haskell.compiler ? ghc966
then "ghc966"
else if buildPackages.haskell.compiler ? ghc964
else if pkgsBuildBuild.haskell.compiler ? ghc964
then "ghc964"
else "ghc962";
in
buildPackages.haskell-nix.cabalProject' ({
pkgsBuildBuild.haskell-nix.cabalProject' ({
inherit compiler-nix-name;
name = "hadrian";
compilerSelection = p: p.haskell.compiler;
Expand All @@ -343,8 +346,8 @@ let
cabalProjectFreeze = null;
src = haskell-nix.haskellLib.cleanSourceWith {
src = {
outPath = buildPackages.srcOnly {
stdenv = buildPackages.stdenvNoCC;
outPath = pkgsBuildBuild.srcOnly {
stdenv = pkgsBuildBuild.stdenvNoCC;
name = "hadrian";
inherit src;
};
Expand All @@ -354,7 +357,7 @@ let
includeSiblings = true;
};
# When building the plan we do not need a patched version
# of the source and `buildPackages.srcOnly` requires introduces
# of the source and `pkgsBuildBuild.srcOnly` requires introduces
# a dependency on a build machine.
evalSrc = haskell-nix.haskellLib.cleanSourceWith {
src = {
Expand Down Expand Up @@ -615,7 +618,7 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
if builtins.compareVersions ghc-version "9.13" < 0
then "--experimental-wasm-type-reflection"
else "--max-old-space-size=65536"} --no-turbo-fast-api-calls --wasm-lazy-validation" \
"${buildPackages.writeShellScriptBin "node" ''
"${pkgsBuildBuild.writeShellScriptBin "node" ''
SCRIPT=$1
shift
LIB_WASM=$1
Expand Down Expand Up @@ -853,11 +856,6 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
for a in libraries/*/*.cabal.in utils/*/*.cabal.in compiler/ghc.cabal.in; do
${hadrian}/bin/hadrian ${hadrianArgs} "''${a%.*}"
done
'' + lib.optionalString (ghc-version == "9.8.20230704") ''
for a in bytearray-access-ops.txt.pp addr-access-ops.txt.pp primops.txt; do
${hadrian}/bin/hadrian ${hadrianArgs} _build/stage0/compiler/build/$a
cp _build/stage0/compiler/build/$a compiler/GHC/Builtin/$a
done
'' + lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) ''
substituteInPlace mk/system-cxx-std-lib-1.0.conf \
--replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib'
Expand Down Expand Up @@ -950,6 +948,10 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
export XATTR=$(mktemp -d)/nothing
'';
} // lib.optionalAttrs useHadrian {
preUnpack = ''
mkdir -p $out/build
cd $out/build
'';
postConfigure = lib.optionalString (stdenv.isDarwin && (__tryEval libcxxabi).success) ''
substituteInPlace mk/system-cxx-std-lib-1.0.conf \
--replace 'dynamic-library-dirs:' 'dynamic-library-dirs: ${libcxx}/lib ${libcxxabi}/lib'
Expand Down Expand Up @@ -992,7 +994,6 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
installPhase =
if installStage1
then ''
mkdir $out
cp -r _build/stage1/bin $out
# let's assume that if we find a non-prefixed genprimop,
# we also find a non-prefixed deriveConstants
Expand All @@ -1009,6 +1010,8 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
mkdir $doc
cp -r _build/stage1/share $doc
runHook postInstall
cd $out
rm -rf $out/build
''
# there appears to be a bug in GHCs configure script not properly passing dllwrap, and windres to the
# generated settings file. Hence we patch it back in here.
Expand Down Expand Up @@ -1039,6 +1042,8 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
make install
cd ../../..
runHook postInstall
cd $out
rm -rf $out/build
'';
}));
in self
12 changes: 6 additions & 6 deletions flake.lock

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

6 changes: 3 additions & 3 deletions lib/check.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, haskellLib, buildPackages }:
{ stdenv, lib, haskellLib, pkgsBuildBuild }:
let self = drvOrig:

let
Expand Down Expand Up @@ -39,8 +39,8 @@ in stdenv.mkDerivation ((
meta = builtins.removeAttrs drv.meta ["mainProgram"];

nativeBuildInputs = drv.nativeBuildInputs
++ [buildPackages.xorg.lndir]
++ lib.optional (stdenv.hostPlatform.isGhcjs) buildPackages.nodejs;
++ [pkgsBuildBuild.xorg.lndir]
++ lib.optional (stdenv.hostPlatform.isGhcjs) pkgsBuildBuild.nodejs;

inherit (component) doCheck doCrossCheck;

Expand Down
2 changes: 1 addition & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ in {
# Check a test component
check = import ./check.nix {
inherit stdenv lib haskellLib;
inherit (pkgs) buildPackages;
inherit (pkgs) pkgsBuildBuild;
};

# Do coverage of a package
Expand Down
1 change: 1 addition & 0 deletions lib/system-nixpkgs-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ in
# In future versions of `nixpkgs` these will be removed
# so make sure they are there.
&& darwin ? apple_sdk
&& (builtins.tryEval (darwin.apple_sdk ? frameworks)).success
&& darwin.apple_sdk ? frameworks
&& darwin.apple_sdk.frameworks ? ${n}
&& !(darwin.apple_sdk.frameworks.${n}.passthru.isDarwinCompatStub or false)
Expand Down
57 changes: 57 additions & 0 deletions materialized/alex-3.2.7.1/ghc967/cabal-files/alex.nix

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

Loading
Loading