josephsumabat / static-ls

Other
97 stars 11 forks source link

`nix develop` fails on a fresh clone #103

Closed rockboynton closed 1 month ago

rockboynton commented 1 month ago
❯ nix develop                                                                                                                                                                                                                                                                                                          10:22
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/lw7il8z0f23ydcw9174zhpj2ri3zwhgb-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/lw7il8z0f23ydcw9174zhpj2ri3zwhgb-source/pkgs/stdenv/generic/make-derivation.nix:395:7:

          394|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          395|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          396|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       error: function 'anonymous lambda' called without required argument 'haskell-ast'

       at /nix/store/zj7b8fpsz1fzj25f72ihcxm394dsknyd-cabal2nix-static-ls/default.nix:1:1:

            1| { mkDerivation, aeson, array, async, base, bytestring, co-log-core
             | ^
            2| , containers, cryptohash-md5, Diff, directory, errors, exceptions
rockboynton commented 1 month ago

the package also fails to build in from nixpkgs:

❯ nix shell nixpkgs#haskellPackages.static-ls                                                                                                                                                                                                                                                                          10:25
error:
       … in the condition of the assert statement

         at /nix/store/iqxdbcjlg9wx8gdc8bdhy9nsd5imcbjp-source/lib/customisation.nix:365:17:

          364|     in commonAttrs // {
          365|       drvPath = assert condition; drv.drvPath;
             |                 ^
          366|       outPath = assert condition; drv.outPath;

       … while evaluating the attribute 'handled'

         at /nix/store/iqxdbcjlg9wx8gdc8bdhy9nsd5imcbjp-source/pkgs/stdenv/generic/check-meta.nix:507:7:

          506|       # or, alternatively, just output a warning message.
          507|       handled =
             |       ^
          508|         (

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Package ‘static-ls-0.1.2’ in /nix/store/iqxdbcjlg9wx8gdc8bdhy9nsd5imcbjp-source/pkgs/development/haskell-modules/hackage-packages.nix:288669 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix
josephsumabat commented 1 month ago

Thanks for reporting, we added some new git dependencies in our cabal.project which broke this - will look into a fix!

josephsumabat commented 1 month ago

Should be fixed by https://github.com/josephsumabat/static-ls/pull/105