haskell.compiler.ghcjs: Fix Linux build (#151699)

Before this change the GHCJS build fails on Linux with:

```
Setup: Missing dependency on a foreign library:
* Missing (or bad) header file: ghc/utils/unlit/fs.h
```

The root cause is that the `./ghc/configure.ac` script is
responsible for copying `./ghc/utils/fs/fs.h` to
`./ghc/utils/unlit/fs.h`, but the script exits early if a C
compiler is not present.

This fixes that by ensuring that the C compiler is present
on all platforms (not just Darwin), so that the build now
works on Linux, too.
This commit is contained in:
Gabriella Gonzalez 2021-12-22 08:43:38 -08:00 committed by GitHub
parent 01506119b5
commit 0796ca8425
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,8 +26,7 @@ runCommand "configured-ghcjs-src" {
happy
alex
cabal-install
] ++ lib.optionals stdenv.isDarwin [
gcc # https://github.com/ghcjs/ghcjs/issues/663
gcc
];
inherit ghcjsSrc;
} ''