input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
556 stars 240 forks source link

`tool`s consistently failing to build on macOS #1113

Closed dhess closed 3 years ago

dhess commented 3 years ago

Since sometime after e7961eee7bbaaa195b3255258f40d5536574eb74, every haskell-nix.tool we try to build fails on macOS 11.3.1 (latest Big Sur at time of writing). This does not appear to be happening on macOS Catalina.

Here's a simple overlay and convenience function we're using to build shells for our haskell.nix projects:

https://github.com/hackworthltd/haskell-hacknix/blob/55bbbbf13874c0270cde26b381136b0c9c991536/nix/overlays/haskell.nix#L8

Whenever we try to enter that shell, either with nix-shell or nix develop (we build our haskell.nix projects as flakes), we get something like this for every tool in the shell (cabal, hlint, ormolu, cabal-edit, cabal-fmt, ghcid, and haskell-langauge-server):

error: builder for '/nix/store/bx38a9y4lvwgrcyamqc8y4gg0v0fzpza-ormolu-lib-ormolu-0.1.4.1.drv' failed with exit code 1;
       last 3 log lines:
       > unpacking sources
       > unpacking source archive /private/tmp/nix-build-ormolu-plan-to-nix-pkgs.drv-0/tmp.nzBriuBjrW
       > do not know how to unpack source archive /private/tmp/nix-build-ormolu-plan-to-nix-pkgs.drv-0/tmp.nzBriuBjrW
       For full logs, run 'nix log /nix/store/bx38a9y4lvwgrcyamqc8y4gg0v0fzpza-ormolu-lib-ormolu-0.1.4.1.drv'.
error: 1 dependencies of derivation '/nix/store/2y6wkklvgj4sqhwkd3y3kh198nwq27f3-ormolu-exe-ormolu-0.1.4.1-config.drv' failed to build
error: 1 dependencies of derivation '/nix/store/74hgz7cgr5fyhfx2d42w0ib1f1l6g6vr-ormolu-exe-ormolu-0.1.4.1-ghc-8.8.4-env.drv' failed to build
error: 3 dependencies of derivation '/nix/store/66byfj4ijc0dj7j37wqd3hib1vhpf1pq-ormolu-exe-ormolu-0.1.4.1.drv' failed to build

Does anyone have any ideas what might be going on?

dhess commented 3 years ago

A git bisect seems to indicate it's 0d7df72bbad23479f215dc6069ad458ab0fe63a2, which is strange, as I expected it to be some internal haskell.nix change.

dhess commented 3 years ago

Please disregard. I think this is down to a really bad mix of a recent update to nix, flakes, and cleanGit.