simmsb / calamity

A library for writing discord bots in haskell
https://hackage.haskell.org/package/calamity
MIT License
112 stars 14 forks source link

Websocket Version Problem #70

Closed IsaacTheKind closed 5 months ago

IsaacTheKind commented 5 months ago

I tried to set up Calamity on Nix and couldn't. I got an error like this:

error:
       … while calling the 'derivationStrict' builtin

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

       … while evaluating derivation 'ghc-shell-for-example-0.1.0.0-0'
         whose name attribute is located at /nix/store/63lvc59rjz075kb1f11xww2x2xqpw1pn-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'NIX_GHC' of derivation 'ghc-shell-for-example-0.1.0.0-0'

         at /nix/store/63lvc59rjz075kb1f11xww2x2xqpw1pn-source/pkgs/development/haskell-modules/generic-builder.nix:817:9:

          816|         LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
          817|         "NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
             |         ^
          818|         "NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";

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

       error: Package ‘calamity-0.11.0.0’ in /nix/store/63lvc59rjz075kb1f11xww2x2xqpw1pn-source/pkgs/development/haskell-modules/hackage-packages.nix:60187 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.

I asked in the Haskell Discord server and they told me the fix is to submit a PR to you all to fix the versioning on websockets. I don't know how accurate any of that is, I'm just a noob. But it would be awesome if this were resolved so I could work on a Calamity project in NixOS.