Skip to content
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

Fix toolchain libraries creation when using ghcWithPackages #2098

Merged
merged 7 commits into from
Feb 2, 2024

Conversation

avdv
Copy link
Member

@avdv avdv commented Jan 3, 2024

Fixes #2097

When using ghcWithPackages package db config files are symlinked into the package database
directory referencing the real ghc store path.

We assume the real ghc file is also accessible from the toplevel ghc-with-packages store path,
which is symlinked into the toolchain repository.

@iphydf
Copy link

iphydf commented Jan 31, 2024

I can confirm this fixes the bug. toktok-stack builds completely and all tests pass with this PR.

avdv and others added 4 commits February 1, 2024 08:03
When using `ghcWithPackages` package db config files are symlinked into the package database
directory referencing the real ghc store path.

We assume the real ghc file is also accessible from the toplevel ghc-with-packages store path,
which is symlinked into the toolchain repository.
Also expand files directly instead of generating glob calls, which is needed for ncurses from nixpkgs
since it includes self-referencing symlinks which Bazel does not support (see [33]).

[33]: bazelbuild/bazel#133
@ylecornec ylecornec marked this pull request as ready for review February 1, 2024 08:23
Copy link
Member

@ylecornec ylecornec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me as well.

(The added test reproduces #2097 if we revert the other changes).

@avdv avdv added the merge-queue merge on green CI label Feb 1, 2024
@avdv
Copy link
Member Author

avdv commented Feb 1, 2024

Thank you @ylecornec for adding the test and pushing this through!

@mergify mergify bot merged commit 9ebc5dd into master Feb 2, 2024
51 checks passed
@mergify mergify bot deleted the cb/fix-2097 branch February 2, 2024 08:16
@mergify mergify bot removed the merge-queue merge on green CI label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rts dependency in cc_library no longer works (can't find HsFFI.h)
3 participants