-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When cross-compiling to JS a hackage dependency which involves actual template haskell splicing and not just declaration of template haskell functions you get an error:
JS interpreter: couldn't find "ghci" package
Obvious solution does not fix it:
if arch(javascript)
extra-packages: ghci
- Build system:
x86_64-linux
- GHC version: 9.12.2
- Haskell.nix version (or commit) used: e567ebc (tag: 2025.08.03)
Steps To Reproduce
- Add
th-orphans
tobuild-depends
of https://github.com/input-output-hk/haskell.nix/blob/master/test/js-template-haskell/js-template-haskell.cabal - Run the build:
nix-build -A allJobs.x86_64-linux.unstable.ghc9122.ghcjs.tests.js-template-haskell.build
Expected behavior
Successful compilation.
Additional context
- This is a regression, as last I tried using
extra-packages: ghci
on ghc910 it solved the problem. Now it doesn't. I assume this PR might be related to this Fix cabal install in the presence of extra-packages (backport #9719) haskell/cabal#9875. - My second assumption was that it maybe somehow related to this Fix
-inplace
issue with ghc 9.8.1 boot packages #2161. I.e. whenghc
tries to pickghci
, while it should have pickedghci-inplace
. Honestly doubt that's the case, but still leaving it here for the full picture.
Hotfix:
modules = [
({ config, ... }: {
configureFlags = [ "--package-db ${config.ghc.package.outPath}/${config.ghc.package.libDir}/package.conf.d" ];
})
];
This places all installed
ghc
libraries, ghci
in particular, in scope of all packages. Might be an overkill, but at least it works.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working