luc-tielen / llvm-codegen

LLVM code generation in Haskell
BSD 3-Clause "New" or "Revised" License
51 stars 6 forks source link

Tests are broken inside Nix devshell #7

Open luc-tielen opened 2 years ago

luc-tielen commented 2 years ago
  1. nix build works
  2. cabal configure --enable-tests && cabal test fails inside devshell
  3. nix develop and then running the above command also fails

Cabal seems to want to build ghc first, which is weird? It's not specified anywhere in the cabal file..

Could this be because we updated nixpkgs and are now using Cabal 3.8 instead of 3.6? Looking at the issue list, seems like 3.8 is still kind of buggy?

Need to find a proper solution this so that it avoids building GHC. Plan B is to use Cabal 3.6 for now (but will become a problem again in the future so better to fix it now).

smunix commented 2 years ago
  1. cabal configure --enable-tests && cabal test fails inside devshell
  2. nix develop and then running the above command also fails

Packages pulled with nix develop can conflict with those defined by cabal.project and cause issues. We should find a way to make cabal.project load whatever packages that have been loaded by nix devshell (package-db is probably what you want).

luc-tielen commented 2 years ago

Yes, that's why right now they need to align (manually for now).

For now the cabal.project (in eclair) only lists packages that are not on hackage and are only on github.