Skip to content

Update Default Setup #2402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions nix-tools-static-for-default-setup.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.2.1/"; in {
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.3.8/"; in {
aarch64-darwin = pkgs.fetchurl {
name = "aarch64-darwin-nix-tools-static";
url = "${baseurl}aarch64-darwin-nix-tools-static.zip";
sha256 = "sha256-/N2CiakRQHIjLtBbdYfkDyhlHFss9ezWc9WW+HIUOwc=";
sha256 = "sha256-v3lxSxCDjQWtCSwx9T5lzcufByvFErKGLm8374KYsOs=";
};
x86_64-darwin = pkgs.fetchurl {
name = "x86_64-darwin-nix-tools-static";
url = "${baseurl}x86_64-darwin-nix-tools-static.zip";
sha256 = "sha256-1Xbxhw7LR6EooiagmRrHg7+UdxddD0RaKjvM75hwsJo=";
sha256 = "sha256-Ltze09JIiUpMuy+jfoSghejmZ3L4NCpgr32LyX5bckU=";
};
aarch64-linux = pkgs.fetchurl {
name = "aarch64-linux-nix-tools-static";
url = "${baseurl}aarch64-linux-nix-tools-static.zip";
sha256 = "sha256-1OarDAiwYbet6ol3q2dZdnsWMHcniK4zznbGiDPMrO4=";
sha256 = "sha256-bpjuragBvzuki4CVleXyqTrQfRJshdoTeD3v6xl9sio=";
};
x86_64-linux = pkgs.fetchurl {
name = "x86_64-linux-nix-tools-static";
url = "${baseurl}x86_64-linux-nix-tools-static.zip";
sha256 = "sha256-7xckkH+T9uu3fhtTOzqHZ1udNvPJAgkcrvDXEF16qJQ=";
sha256 = "sha256-aZOmrhp+AdCXcBaNVAeJHDobBaGzJDvEhY90mWjGadc=";
};
}
2 changes: 2 additions & 0 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ in {

# Fix for `fatal error: 'rts/Types.h' file not found` when building `primitive`
++ onGhcjs (from "9.13" ./patches/ghc/ghc-9.13-ghcjs-rts-types.patch)

++ onGhcjs (fromUntil "9.6.7" "9.7" ./patches/ghc/ghc-9.6-js-support-this-unit-id-10819.patch)
;
in ({
ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc {
Expand Down
4 changes: 4 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ let
tarball // { exes = final.lib.genAttrs nix-tools-provided-exes (_: tarball); };

static-nix-tools = static-nix-tools' ../nix-tools-static.nix;
# Any change to default-setup requires rebuilding everthing.
# Having a dedicated file for `default-setup` allows us to update
# the other `nix-tools` (like `make-install-plan`), without a
# full rebuild.
static-nix-tools-for-default-setup = static-nix-tools' ../nix-tools-static-for-default-setup.nix;

# Version of nix-tools built with a pinned version of haskell.nix.
Expand Down
36 changes: 36 additions & 0 deletions overlays/patches/ghc/ghc-9.6-js-support-this-unit-id-10819.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 168af9c24581bb550e6f352ebb3dd86c8784cea9 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <[email protected]>
Date: Thu, 6 Jul 2023 15:59:38 +0200
Subject: [PATCH] JS: support -this-unit-id for programs in the linker (#23613)

---
compiler/GHC/StgToJS/Linker/Linker.hs | 2 +-
testsuite/tests/driver/T23613.hs | 4 ++++
testsuite/tests/driver/all.T | 7 ++++---
3 files changed, 9 insertions(+), 4 deletions(-)
create mode 100644 testsuite/tests/driver/T23613.hs

diff --git a/compiler/GHC/StgToJS/Linker/Linker.hs b/compiler/GHC/StgToJS/Linker/Linker.hs
index 58bcdf2de90..530f8730c6b 100644
--- a/compiler/GHC/StgToJS/Linker/Linker.hs
+++ b/compiler/GHC/StgToJS/Linker/Linker.hs
@@ -327,7 +327,7 @@ computeLinkDependencies cfg unit_env link_spec finder_opts finder_cache = do
let (rts_wired_units, rts_wired_functions) = rtsDeps units

-- all the units we want to link together, without their dependencies
- let root_units = filter (/= mainUnitId)
+ let root_units = filter (/= ue_currentUnit unit_env)
$ filter (/= interactiveUnitId)
$ nub
$ rts_wired_units ++ reverse obj_units ++ reverse units
diff --git a/testsuite/tests/driver/T23613.hs b/testsuite/tests/driver/T23613.hs
new file mode 100644
index 00000000000..d82a4bd93b7
--- /dev/null
+++ b/testsuite/tests/driver/T23613.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = return ()

2 changes: 1 addition & 1 deletion test/sublib-docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ in recurseIntoAttrs {

printf "check that it looks like we have docs..." >& 2
test -f "${packages.sublib-docs.components.library.doc}/share/doc/sublib-docs/html/Lib.html"
test -f "${packages.sublib-docs.components.sublibs.slib.doc}/share/doc/sublib-docs/html/Slib.html"
test -f "${packages.sublib-docs.components.sublibs.slib.doc}/share/doc/sublib-docs/html/slib/Slib.html"

touch $out
'';
Expand Down
Loading