Gabriella439 / haskell-nix

Nix and Haskell in production
1.14k stars 117 forks source link

running in to "error: attribute 'lib' missing" while trying to nix-build release0.nix #95

Closed CatspersCoffee closed 2 years ago

CatspersCoffee commented 2 years ago

Following instructions on Project0,

$ nix-build release0.nix

then get hit with:

$ nix-build release0.nix
error: attribute 'lib' missing

       at /home/user/haskell-nix/project0/project0.nix:9:13:

            8|   executableHaskellDepends = [ base ];
            9|   license = stdenv.lib.licenses.bsd3;
             |             ^
           10| }
(use '--show-trace' to show detailed location information)

Could anyone suggest a solution?

could it be that "stdenv.lib has recently been removed (in favor of just lib)" ?

rcannon commented 2 years ago

Running cabal2nix . > project0.nix before nix-build release0.nix fixes the problem for me. From what I can tell, it does just replace stdenv.lib with just lib.

Gabriella439 commented 2 years ago

Fixed by 2c624fa680ef16150195066e891ac3f54d27d558