Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
58cfeb9
Update Hackage and Stackage
Jul 1, 2025
04fa591
Fix building of GHC 9.4 (#2400)
hamishmack Jul 1, 2025
68cca80
Update Hackage and Stackage
Jul 2, 2025
4b2a8d5
Update Default Setup (#2402)
hamishmack Jul 2, 2025
5c890c8
Update Hackage and Stackage
Jul 3, 2025
71a34a6
Update shellFor documentation (#2406)
hamishmack Jul 3, 2025
bc80f13
Add ghc9122llvm to ci (#2407)
hamishmack Jul 3, 2025
d5fba23
Update Hackage and Stackage
Jul 4, 2025
85f2f27
Update Hackage and Stackage
Jul 5, 2025
985b5fc
Update Hackage and Stackage
Jul 6, 2025
56c4312
Update Hackage and Stackage
Jul 7, 2025
78a2916
Update Hackage and Stackage
Jul 8, 2025
ba99ace
Update Hackage and Stackage
Jul 9, 2025
f71605f
Bump head.hackage (#2409)
hamishmack Jul 9, 2025
fa7fea8
Check other locations for extra-compilation-artifacts (#2410)
hamishmack Jul 9, 2025
1af1e0d
Update Hackage and Stackage
Jul 10, 2025
14d2c1a
Update Hackage and Stackage
Jul 11, 2025
045e3e9
Update Hackage and Stackage
Jul 12, 2025
9e635db
Update Hackage and Stackage
Jul 13, 2025
3614f09
Fix aarch64 musl TH code that uses C++ (#2412)
hamishmack Jul 13, 2025
19ff56a
Update Hackage and Stackage
Jul 14, 2025
5229625
Improve `hix flake check` (#2413)
hamishmack Jul 14, 2025
f9cadec
Update Hackage and Stackage
Jul 15, 2025
35121df
Fix TH code in checks for android cross compilation (#2414)
hamishmack Jul 15, 2025
0ff8947
Update Hackage and Stackage
Jul 16, 2025
d719035
Update Hackage and Stackage
Jul 17, 2025
abcb466
Numactl dont clobber configureflags (#2417)
JackKelly-Bellroy Jul 17, 2025
deaee9a
Update Hackage and Stackage
Jul 19, 2025
76bbec8
Fix markdown on docs (#2418)
ludat Jul 19, 2025
aeceb4d
chore: fix some minor issues in comments (#2419)
jishudashen Jul 20, 2025
ee943bd
Update Hackage and Stackage
Jul 20, 2025
b6bd03d
Update Hackage and Stackage
Jul 21, 2025
e774cf6
Update Hackage and Stackage
Jul 22, 2025
1590e5c
Fix cross compilation TH in devShells (#2415)
hamishmack Jul 23, 2025
b9c7ad5
Update Hackage and Stackage
Jul 24, 2025
915a0eb
Update Hackage and Stackage
Jul 25, 2025
810d033
Update Hackage and Stackage
Jul 26, 2025
a4a27c4
Update Hackage and Stackage
Jul 27, 2025
3c9bde2
Update Hackage and Stackage
Jul 28, 2025
606626c
Fix GHC 9.12 stackage projects (#2422)
hamishmack Jul 28, 2025
f7b3cfe
Update Hackage and Stackage
Jul 29, 2025
fb04d42
Update Hackage and Stackage
Jul 30, 2025
758d34c
Update Hackage and Stackage
Jul 31, 2025
3a2bf48
Update Hackage and Stackage
Aug 1, 2025
e567ebc
Update Hackage and Stackage
Aug 2, 2025
3c44147
Update Hackage and Stackage
Aug 3, 2025
8164414
Update Hackage and Stackage
Aug 4, 2025
b96104b
Update Hackage and Stackage
Aug 5, 2025
75bffff
Update Hackage and Stackage
Aug 6, 2025
9152618
Fix support for pkgsStatic (#2424)
hamishmack Aug 7, 2025
7fdfec7
Update Hackage and Stackage
Aug 7, 2025
4a3aea3
Update Hackage and Stackage
Aug 8, 2025
df56988
Update Hackage and Stackage
Aug 9, 2025
9306745
Update Hackage and Stackage
Aug 10, 2025
a052991
Update Hackage and Stackage
Aug 11, 2025
ffc3f68
Patch ghcjs >= 9.12: Add 'HEAP8' to EMCC:EXPORTED_RUNTIME_METHODS (#2…
ymeister Aug 12, 2025
6dd3b06
Update Hackage and Stackage
Aug 12, 2025
0edca29
Update Hackage and Stackage
Aug 13, 2025
a8741b1
Add upper bound on iserv-proxy:network (#2429)
hamishmack Aug 13, 2025
1000d92
Update Hackage and Stackage
Aug 14, 2025
4d49344
Update Hackage and Stackage
Aug 15, 2025
6eec4d2
Update Hackage and Stackage
Aug 16, 2025
802a58f
Update Hackage and Stackage
Aug 17, 2025
50cdda4
Update Hackage and Stackage
Aug 18, 2025
594a283
Update Hackage and Stackage
Aug 19, 2025
70e0572
Update Hackage and Stackage
Aug 20, 2025
71fcc9f
Enable macOS builds on CI again (#2430)
hamishmack Aug 20, 2025
a808cbd
Update Hackage and Stackage
Aug 21, 2025
4cf0366
Update Hackage and Stackage
Aug 22, 2025
3d182e3
Update Hackage and Stackage
Aug 23, 2025
990d2c9
Update Hackage and Stackage
Aug 24, 2025
098f9df
Update Hackage and Stackage
Aug 25, 2025
6a8eaba
Update Hackage and Stackage
Aug 26, 2025
340eecb
Update Hackage and Stackage
Aug 27, 2025
7d6abbf
Update Hackage and Stackage
Aug 28, 2025
a090a2f
Update Hackage and Stackage
Aug 29, 2025
d41e23c
Update Hackage and Stackage
Aug 30, 2025
f104621
Add support for WASM backend (#2351)
hamishmack Aug 30, 2025
c3380cc
Update Hackage and Stackage
Aug 31, 2025
5c0c2f1
Update Hackage and Stackage
Sep 1, 2025
ac987ef
Update Hackage and Stackage
Sep 2, 2025
81ac972
Update Hackage and Stackage
Sep 3, 2025
2a60817
Update Hackage and Stackage
Sep 4, 2025
6720a76
Update Hackage and Stackage
Sep 5, 2025
da7b325
Update Hackage and Stackage
Sep 6, 2025
7b64b0d
Update Hackage and Stackage
Sep 7, 2025
735a3d7
Update Hackage and Stackage
Sep 8, 2025
2ceda19
Update Hackage and Stackage
Sep 9, 2025
7ea2024
Update Hackage and Stackage
Sep 10, 2025
8e96840
Update Hackage and Stackage
Sep 11, 2025
865e6a8
Update Hackage and Stackage
Sep 12, 2025
62ef01b
Update Hackage and Stackage
Sep 13, 2025
35e930a
Update Hackage and Stackage
Sep 14, 2025
a7b9eea
Update Hackage and Stackage
Sep 15, 2025
4cf8086
Update Hackage and Stackage
Sep 16, 2025
8792aa1
Update Hackage and Stackage
Sep 17, 2025
9bfdabc
Update Hackage and Stackage
Sep 18, 2025
ff80c12
Update Hackage and Stackage
Sep 19, 2025
a827dfb
Update Hackage and Stackage
Sep 20, 2025
917716f
Update Hackage and Stackage
Sep 21, 2025
ac8ccf4
Update Hackage and Stackage
Sep 22, 2025
c045439
Update Hackage and Stackage
Sep 23, 2025
e742479
Update Hackage and Stackage
Sep 24, 2025
ce9ac7a
wasm: disable tail-call flag for now (#2440)
TerrorJack Sep 24, 2025
e5ee170
Update Hackage and Stackage
Sep 25, 2025
46abef9
Update Hackage and Stackage
Sep 26, 2025
751e156
Update Hackage and Stackage
Sep 27, 2025
7ceff53
Update Hackage and Stackage
Sep 28, 2025
a8d8033
Update Hackage and Stackage
Sep 29, 2025
53f4b4e
Update Hackage and Stackage
Sep 30, 2025
753543a
Update Hackage and Stackage
Oct 1, 2025
b2249f7
Update Hackage and Stackage
Oct 2, 2025
4ca781b
Update Hackage and Stackage
Oct 3, 2025
3269049
Update Hackage and Stackage
Oct 4, 2025
65c2da2
Update Hackage and Stackage
Oct 5, 2025
078aef9
Update Hackage and Stackage
Oct 6, 2025
17cc2e9
Update Hackage and Stackage
Oct 7, 2025
2ec165b
Update Hackage and Stackage
Oct 8, 2025
8e43b5c
Update Hackage and Stackage
Oct 9, 2025
ce5a92e
Update Hackage and Stackage
Oct 10, 2025
2fe6868
Update Hackage and Stackage
Oct 11, 2025
2a4bcf6
Update Hackage and Stackage
Oct 12, 2025
f68833b
Update Hackage and Stackage
Oct 13, 2025
8244bb2
Update Hackage and Stackage
Oct 14, 2025
6e69e73
Update Hackage and Stackage
Oct 15, 2025
aa6638e
Update Hackage and Stackage
Oct 16, 2025
e76b790
Update Hackage and Stackage
Oct 17, 2025
cad6441
Switch CI eval to `aarch64-darwin` (#2436)
hamishmack Oct 17, 2025
f51d0b4
Update Hackage and Stackage
Oct 18, 2025
05a2def
Update Hackage and Stackage
Oct 19, 2025
9968459
Update Hackage and Stackage
Oct 20, 2025
b0424ab
Update Hackage and Stackage
Oct 21, 2025
d3e91db
Update Hackage and Stackage
Oct 22, 2025
1969ed2
Update Hackage and Stackage
Oct 23, 2025
08e2000
Update Hackage and Stackage
Oct 24, 2025
5d9e764
Update Hackage and Stackage
Oct 25, 2025
09e2152
Update Hackage and Stackage
Oct 26, 2025
d0b2d45
Fix building with more recent android sdk/ndks (#2443)
angerman Oct 26, 2025
e4526cc
Update Hackage and Stackage
Oct 27, 2025
e34dc32
Update Hackage and Stackage
Oct 28, 2025
0a0a39a
Update Hackage and Stackage
Oct 29, 2025
76ec593
Update Hackage and Stackage
Oct 30, 2025
d7e420f
Update Hackage and Stackage
Oct 31, 2025
1b34bc0
Update Hackage and Stackage
Nov 1, 2025
bcbeaf6
Update Hackage and Stackage
Nov 2, 2025
db10732
Update Hackage and Stackage
Nov 3, 2025
6895055
Update Hackage and Stackage
Nov 4, 2025
e84057c
Update Hackage and Stackage
Nov 5, 2025
ef52c36
Add upper bound to streaming-commons patch (#2448)
hamishmack Nov 5, 2025
8cd2014
Update Hackage and Stackage
Nov 6, 2025
b688622
Update Hackage and Stackage
Nov 7, 2025
7a65248
Update Hackage and Stackage
Nov 8, 2025
1a3f1e8
Update Hackage and Stackage
Nov 9, 2025
3eca489
Update Hackage and Stackage
Nov 10, 2025
b27c372
Update Hackage and Stackage
Nov 11, 2025
f29b6a4
Update Hackage and Stackage
Nov 12, 2025
3c9e83a
Update Hackage and Stackage
Nov 13, 2025
7631ffa
Update Hackage and Stackage
Nov 14, 2025
a9aed48
Update Hackage and Stackage
Nov 15, 2025
2659950
Update Hackage and Stackage
Nov 16, 2025
8d11cba
Update Hackage and Stackage
Nov 17, 2025
6cfb52a
Update Hackage and Stackage
Nov 18, 2025
3491214
Update Hackage and Stackage
Nov 19, 2025
9c59566
Update Hackage and Stackage
Nov 20, 2025
eb5f43c
Update nixpkgs pins (#2449)
hamishmack Nov 20, 2025
86e113d
Update Hackage and Stackage
Nov 21, 2025
adb6e0b
Add GHC 9.10.3 (#2454)
hamishmack Nov 21, 2025
9561102
Update Hackage and Stackage
Nov 22, 2025
dcb672f
Update Hackage and Stackage
Nov 23, 2025
f5f4e8c
Update Hackage and Stackage
Nov 24, 2025
3450513
Update Hackage and Stackage
Nov 25, 2025
c3b521f
Update Hackage and Stackage
Nov 26, 2025
e4e2b4d
Update Hackage and Stackage
Nov 27, 2025
7216d77
Add fixes for profiling (#2455)
hamishmack Nov 27, 2025
0938ee0
Update Hackage and Stackage
Nov 28, 2025
559dbfa
Update Hackage and Stackage
Nov 29, 2025
63291be
Update Hackage and Stackage
Nov 30, 2025
c82d4d9
Update Hackage and Stackage
Dec 1, 2025
91c9a62
Update Hackage and Stackage
Dec 2, 2025
4bda32f
Update Hackage and Stackage
Dec 3, 2025
df3e681
Fix nixpkgs warnings (#2457)
hamishmack Dec 3, 2025
1727938
Update Hackage and Stackage
Dec 4, 2025
79eb591
Update Hackage and Stackage
Dec 5, 2025
bc7a401
Add nixpkgs-2511 (#2456)
hamishmack Dec 5, 2025
a62c9d8
Update Hackage and Stackage
Dec 6, 2025
ce4ab11
Update Hackage and Stackage
Dec 7, 2025
99ee6c1
Add enableIPE and extraFlavourTransformers options to GHC derivation …
thomasjm Dec 7, 2025
268ef52
Update Hackage and Stackage
Dec 8, 2025
1b33665
Update Hackage and Stackage
Dec 9, 2025
7e7550c
chore: fix some minor issues in the comments (#2452)
tinyfoolish Dec 9, 2025
f605254
Fix using lld in shell-for (#2408)
TeofilC Dec 9, 2025
bb5ee1a
Update Hackage and Stackage
Dec 10, 2025
4725218
Update Hackage and Stackage
Dec 11, 2025
8af055d
Update Hackage and Stackage
Dec 12, 2025
0928a5c
Add prebuilt-depends for proprietary dependencies. (#2444)
shlevy Dec 12, 2025
6e04ce5
Update Hackage and Stackage
Dec 13, 2025
63f4d57
Update Hackage and Stackage
Dec 14, 2025
643d58f
Update Hackage and Stackage
Dec 15, 2025
5f566a1
Update Hackage and Stackage
Dec 16, 2025
2e832ed
Merge remote-tracking branch 'upstream/master' into circuithub
TeofilC Dec 16, 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
8 changes: 6 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 9.6.7"
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc967-native --show-trace --builders ''
run: |
sed -i 's/runningHydraEvalTest = true;/runningHydraEvalTest = false;/' flake.nix
nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc967-native --show-trace --builders ''

hydra-without-remote-builders-ghc9102:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 9.10.2"
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc9102-native --show-trace --builders ''
run: |
sed -i 's/runningHydraEvalTest = true;/runningHydraEvalTest = false;/' flake.nix
nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc9102-native --show-trace --builders ''

hix-cabal:
runs-on: [self-hosted, linux]
Expand Down
6 changes: 3 additions & 3 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in rec {
tests = import ./test/default.nix { inherit pkgs evalPackages ifdLevel compiler-nix-name; };

tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
pkgs.recurseIntoAttrs ({
pkgs.lib.recurseIntoAttrs ({
cabal-latest = tool compiler-nix-name "cabal" ({
inherit evalPackages;
} // pkgs.lib.optionalAttrs (ghcFromTo "9.13" "9.14") {
Expand Down Expand Up @@ -100,8 +100,8 @@ in rec {

# These are pure parts of maintainer-script so they can be built by hydra
# and added to the cache to speed up buildkite.
maintainer-script-cache = pkgs.recurseIntoAttrs (
(pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") {
maintainer-script-cache = pkgs.lib.recurseIntoAttrs (
(pkgs.lib.optionalAttrs (pkgs.stdenv.hostPlatform.system == "x86_64-linux") {
inherit (maintainer-scripts) check-hydra;
})
// (pkgs.lib.optionalAttrs (ifdLevel > 2) {
Expand Down
219 changes: 209 additions & 10 deletions builder/comp-builder.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{ pkgs, stdenv, buildPackages, pkgsBuildBuild, ghc, llvmPackages, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, windows, zlib, ncurses, nodejs, nonReinstallablePkgs }@defaults:
lib.makeOverridable (
let self =
{ componentId
, component
, package
Expand Down Expand Up @@ -44,7 +42,7 @@ let self =
, hardeningDisable ? component.hardeningDisable

, enableStatic ? component.enableStatic
, enableShared ? ghc.enableShared && component.enableShared && !haskellLib.isCrossHost
, enableShared ? ghc.enableShared && component.enableShared && (!haskellLib.isCrossHost || stdenv.hostPlatform.isWasm)
, enableExecutableDynamic ? component.enableExecutableDynamic && !stdenv.hostPlatform.isMusl
, enableDeadCodeElimination ? component.enableDeadCodeElimination
, writeHieFiles ? component.writeHieFiles
Expand Down Expand Up @@ -94,6 +92,135 @@ let self =
, useLLVM ? ghc.useLLVM or false
, smallAddressSpace ? false

# Note [prebuilt dependencies]
#
# Typical cabal project planning starts with the libraries that come with
# the compiler and then plans to build every other needed dependency from
# source (fetched through hackage repositories or source-repository
# dependencies). In cases where some library that isn't part of the compiler
# is only available as a pre-built shared object file (such as for some
# closed-source module from a vendor, or in principle a component whose
# compilation is extremely expensive), we need to be able to tell cabal
# about additional prebuilt dependencies to include in its plan and link to
# as needed at build time.
#
# This can be done by passing the needed libraries in prebuilt-depends. During
# cabal planning and builds, these libraries (and their dependencies) will be
# present in the ghc-pkg database that cabal will draw from for its dependency
# resolution, thereby skipping lookup from hackage or building from source.
#
# The entries in the prebuilt dependencies list may have dependencies that are
# part of the compiler-provided package set, or may have overlap with each other.
# GHC can actually handle this use case fine, since types from different packages
# (even of the same name) will not unify, so at worst you will get a compile error,
# but cabal will need to choose one for the packages you are building. The entries
# in the list are given priority over the compiler-provided ones, with the later
# entries having greater priority than the earlier ones.
#
# For your build to succeed, your prebuilt-dependencies must meet the following:
#
# 1. They are built with the same compiler version and RTS way.
# 2. They have all of their dependencies within the package db directory or
# included as propagatedBuildInputs
# 3. They must include the `envDep` and `exactDep` files that make-config.files.nix
# expects for configuring cabal precisely.
#
# The recommended way to meet this requirement is to build the relevant libraries
# with haskell.nix too, since it sets up the dependencies appropriately. An example
# workflow would be:
#
# 1. Build libraries foo and bar with haskell.nix (the same plan)
# 2. Note down the store paths for foo and bar library outputs
# 3. Make a full nix export of those store paths (using e.g. `nix-store --export $(nix-store --query --requisites $barPath $fooPath) > foobar.closure`
# 4. On the consumer machine, import the store paths (e.g. `nix-store --import foobar.closure` and then add gc roots)
# 5. In the consumer haskell.nix build, add the imported store paths to your prebuilt-depends. E.g.:
#
# prebuilt-depends = let foo = {
# # We need to make this look like a call to derivation for stdenv to do the right thing
# name = "foo-lib-foo-0.1.0.0";
# type = "derivation";
# outputs = [ "out" ];
# out = foo;
# all = [ foo ];
# # $fooPath is already in the store due to the import, so we use the storePath
# # builtin to add it as a source dependency to the build. Note that this does
# # not work in pure evaluation mode, you must use --impure with flakes. An
# # alternative would be to bundle up all of the needed libraries into tarballs that
# # are fetched and unpacked as proper fixed-output derivations.
# outPath = builtins.storePath $fooPath;
# }; in [ foo ]; # Could also do the same for bar of course
, prebuilt-depends ? []
}:
# makeOverridable is called here after all the `? DEFAULT` arguments
# will have been applied. This makes sure that `c.override (oldAttrs: {...})`
# includes these `DEFAULT` values in `oldAttrs`. This is important
# so that overrides can modify the existing values instead of replacing them.
lib.makeOverridable (
let self =
{ componentId
, component
, package
, name
, setup
, src
, flags
, cabalFile
, cabal-generator
, patches
, preUnpack
, configureFlags
, prePatch
, postPatch
, preConfigure
, postConfigure
, setupBuildFlags
, preBuild
, postBuild
, preCheck
, postCheck
, setupInstallFlags
, preInstall
, postInstall
, preHaddock
, postHaddock
, shellHook
, configureAllComponents
, allComponent
, build-tools
, pkgconfig
, platforms
, frameworks
, dontPatchELF
, dontStrip
, dontUpdateAutotoolsGnuConfigScripts
, hardeningDisable
, enableStatic
, enableShared
, enableExecutableDynamic
, enableDeadCodeElimination
, writeHieFiles
, ghcOptions
, contentAddressed
, doHaddock
, doHoogle
, hyperlinkSource
, quickjump
, keepConfigFiles
, keepGhc
, keepSource
, setupHaddockFlags
, enableLibraryProfiling
, enableProfiling
, profilingDetail
, doCoverage
, enableSeparateDataOutput
, enableLibraryForGhci
, enableDebugRTS
, enableDWARF
, enableTSanRTS
, useLLVM
, smallAddressSpace
, prebuilt-depends
}@drvArgs:

let
Expand Down Expand Up @@ -147,7 +274,7 @@ let
configFiles = makeConfigFiles {
component = componentForSetup;
inherit (package) identifier;
inherit fullName flags needsProfiling enableDWARF;
inherit fullName flags needsProfiling enableDWARF prebuilt-depends;
};

enableFeature = enable: feature:
Expand Down Expand Up @@ -218,7 +345,7 @@ let
# lld -r --whole-archive ... will _not_ drop lazy symbols. However the
# --whole-archive flag needs to come _before_ the objects, it's applied in
# sequence. The proper fix is thusly to add --while-archive to Cabal.
(enableFeature (enableLibraryForGhci && !stdenv.hostPlatform.isGhcjs && !stdenv.hostPlatform.isAndroid) "library-for-ghci")
(enableFeature (enableLibraryForGhci && !stdenv.hostPlatform.isGhcjs && !stdenv.hostPlatform.isWasm && !stdenv.hostPlatform.isAndroid) "library-for-ghci")
] ++ lib.optionals (stdenv.hostPlatform.isMusl && (haskellLib.isExecutableType componentId)) [
# These flags will make sure the resulting executable is statically linked.
# If it uses other libraries it may be necessary for to add more
Expand Down Expand Up @@ -282,8 +409,11 @@ let
if builtins.isFunction shellHook then shellHook { inherit package shellWrappers; }
else abort "shellHook should be a string or a function";

exeExt = if stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" < 0
then ".jsexe/all.js"
exeExt =
if stdenv.hostPlatform.isWasm
then ".wasm"
else if stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" < 0
then ".jsexe/all.js"
else stdenv.hostPlatform.extensions.executable;
exeName = componentId.cname + exeExt;
testExecutable = "dist/build/${componentId.cname}/${exeName}";
Expand Down Expand Up @@ -339,7 +469,7 @@ let
}
// lib.optionalAttrs stdenv.hostPlatform.isMusl {
# This fixes musl compilation of TH code that depends on C++ (for instance TH code that uses the double-conversion package)
LD_LIBRARY_PATH="${pkgs.buildPackages.gcc-unwrapped.lib}/x86_64-unknown-linux-musl/lib";
LD_LIBRARY_PATH="${pkgs.buildPackages.gcc-unwrapped.lib}/${stdenv.hostPlatform.config}/lib";
}
// lib.optionalAttrs dontUpdateAutotoolsGnuConfigScripts {
inherit dontUpdateAutotoolsGnuConfigScripts;
Expand Down Expand Up @@ -430,7 +560,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 Expand Up @@ -653,6 +783,10 @@ let
mkdir -p $out/share
if [ -d dist/build/extra-compilation-artifacts ]; then
cp -r dist/build/extra-compilation-artifacts/hpc $out/share
elif [ -d ${testExecutable}-tmp/extra-compilation-artifacts ]; then
cp -r ${testExecutable}-tmp/extra-compilation-artifacts/hpc $out/share
elif [ -d dist/build/${componentId.cname}/extra-compilation-artifacts ]; then
cp -r dist/build/${componentId.cname}/extra-compilation-artifacts/hpc $out/share
else
cp -r dist/hpc $out/share
fi
Expand Down Expand Up @@ -716,4 +850,69 @@ let
// lib.optionalAttrs (hardeningDisable != [] || stdenv.hostPlatform.isMusl) {
hardeningDisable = hardeningDisable ++ lib.optional stdenv.hostPlatform.isMusl "pie";
});
in drv; in self)
in drv; in self) {
inherit componentId
component
package
name
setup
src
flags
cabalFile
cabal-generator
patches
preUnpack
configureFlags
prePatch
postPatch
preConfigure
postConfigure
setupBuildFlags
preBuild
postBuild
preCheck
postCheck
setupInstallFlags
preInstall
postInstall
preHaddock
postHaddock
shellHook
configureAllComponents
allComponent
build-tools
pkgconfig
platforms
frameworks
dontPatchELF
dontStrip
dontUpdateAutotoolsGnuConfigScripts
hardeningDisable
enableStatic
enableShared
enableExecutableDynamic
enableDeadCodeElimination
writeHieFiles
ghcOptions
contentAddressed
doHaddock
doHoogle
hyperlinkSource
quickjump
keepConfigFiles
keepGhc
keepSource
setupHaddockFlags
enableLibraryProfiling
enableProfiling
profilingDetail
doCoverage
enableSeparateDataOutput
enableLibraryForGhci
enableDebugRTS
enableDWARF
enableTSanRTS
useLLVM
smallAddressSpace
prebuilt-depends;
}
8 changes: 4 additions & 4 deletions builder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let
};

setup-builder = haskellLib.weakCallPackage pkgs ./setup-builder.nix {
ghc = (ghc.passthru.buildGHC or ghc);
ghc = (ghc.buildGHC or ghc);
hsPkgs = hsPkgs.buildPackages;
# We need to use the buildPackages stdenv to build the setup-builder.
# in the native case, it would be the same in the cross case however
Expand All @@ -41,7 +41,7 @@ let
# component builder and for nix-shells.
ghcForComponent = import ./ghc-for-component-wrapper.nix {
inherit lib ghc haskellLib;
inherit (buildPackages) stdenv;
inherit (pkgs) stdenv;
inherit (buildPackages.buildPackages) runCommand makeWrapper;
inherit (buildPackages.buildPackages.xorg) lndir;
};
Expand All @@ -54,7 +54,7 @@ let
# When building setup depends we need to use the build systems GHC and Packages
makeSetupConfigFiles = haskellLib.weakCallPackage buildPackages ./make-config-files.nix {
inherit haskellLib nonReinstallablePkgs;
ghc = (ghc.passthru.buildGHC or ghc);
ghc = (ghc.buildGHC or ghc);
};


Expand All @@ -76,7 +76,7 @@ let
# Same as haskellPackages.shellFor in nixpkgs.
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib pkgsBuildBuild evalPackages compiler ghc;
inherit (buildPackages) glibcLocales;
inherit (buildPackages) glibcLocales llvmPackages;
};

# Same as haskellPackages.ghcWithPackages and ghcWithHoogle in nixpkgs.
Expand Down
Loading
Loading