haskell.nix icon indicating copy to clipboard operation
haskell.nix copied to clipboard

The option `shell.buildInputs' does not exist.

Open dhess opened this issue 3 years ago • 4 comments

As of about a week ago, master now generates the following error for us during nix develop evaluation:

 nix develop
trace: No index state specified for cabal-edit, using the latest index state that we know about (2022-08-11T00:00:00Z)!
trace: No index state specified for cabal-fmt, using the latest index state that we know about (2022-08-11T00:00:00Z)!
error: The option `shell.buildInputs' does not exist. Definition values:
       - In `<unknown-file>':
           [
             <derivation /nix/store/rg3rxjildky7y0x0fbbw3x3zm1lfpxvp-haskell-language-server-exe-haskell-language-server-1.7.0.0.drv>
             <derivation /nix/store/arycbrbvp8kcr8zfjwmmpp0gq9l6j3zd-nixpkgs-fmt-1.3.0.drv>
             <derivation /nix/store/61i337ib4n4rjw7bc3v30f979jc4hb0n-postgresql-14.4.drv>
             <derivation /nix/store/vz82d0vwgvldj0q36gp3knaxnj20r1v1-openapi-generator-cli-5.4.0.drv>
           ...
(use '--show-trace' to show detailed location information)

Our project is run from a flake and contains a shell attribute:

shell = {
  exactDeps = true;
  withHoogle = true;
  ...
  buildInputs = (with final; [
    # Temporary workaround for HLS issues until the next release.
    hls

    nixpkgs-fmt
    ...

I don't see any changes to the documentation that indicate buildInputs is no longer supported, so I'm assuming it's a bug?

dhess avatar Aug 11 '22 22:08 dhess

Also getting this

locallycompact avatar Aug 12 '22 08:08 locallycompact

I broke this when I added the shell arguments as a submodule of the project arguments. I forgot that anything we can pass to pkgs.mkShell can also be included (they are passed on here).

I think we need to add the following to the module in shell.nix:

hamishmack avatar Aug 15 '22 09:08 hamishmack

Is there any documentation that should be updated regarding this?

yvan-sraka avatar Aug 16 '22 11:08 yvan-sraka

I'm lost, how do I include packages from nixpkgs in my dev shell then?

billksun avatar Aug 17 '22 04:08 billksun