Skip to content

cannot work with ghc 8.10 #103

@7c78

Description

@7c78

Hi. I use your template https://github.com/srid/haskell-multi-nix and get an error

Here is my flake.nix

{
    inputs = {
        nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
        flake-parts.url = "github:hercules-ci/flake-parts";
        haskell-flake.url = "github:srid/haskell-flake";
        systems.url = "github:nix-systems/default";
        flake-root.url = "github:srid/flake-root";
        mission-control.url = "github:Platonic-Systems/mission-control";
    };

    outputs = inputs:
        inputs.flake-parts.lib.mkFlake { inherit inputs; } {
            systems = import inputs.systems;
            imports = [
                inputs.haskell-flake.flakeModule
                inputs.flake-root.flakeModule
                inputs.mission-control.flakeModule
            ];
            perSystem = { self', inputs', system, lib, config, pkgs, ... }: {

                haskellProjects.hello1 = {
                    basePackages = pkgs.haskell.packages.ghc8107;
                };
                haskellProjects.hello2 = {
                };

                devShells.default = pkgs.mkShell {
                    inputsFrom = [
                        config.flake-root.devShell
                        config.mission-control.devShell
                    ];
                };
            };
        };
}

If I run nix develop .#hello2, the shell is built OK and the ghc version is 9.2.7. But if I run nix develop .#hello1, it runs very long and eventually I get the following error

error: builder for '/nix/store/fw26751xhsn8x6891pa6rl6fqd6kal8r-pretty-simple-4.1.2.0.drv' failed with exit code 1;
       last 10 log lines:
       > running tests
       > Running 1 test suites...
       > Test suite pretty-simple-doctest: RUNNING...
       > ghc: mmap 4096 bytes at (nil): Cannot allocate memory
       > ghc: Try specifying an address with +RTS -xm<addr> -RTS
       > pretty-simple-doctest: fd:15: hGetLine: end of file
       > Test suite pretty-simple-doctest: FAIL
       > Test suite logged to:
       > dist/test/pretty-simple-4.1.2.0-pretty-simple-doctest.log
       > 0 of 1 test suites (0 of 1 test cases) passed.
       For full logs, run 'nix-store -l /nix/store/fw26751xhsn8x6891pa6rl6fqd6kal8r-pretty-simple-4.1.2.0.drv'.
error: 1 dependencies of derivation '/nix/store/cjyx9cagbh0cr9asldwynsbh7nclak7l-hls-eval-plugin-1.5.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7c83fg5fl4r375zy5qj4l9knrk2qbs4c-haskell-language-server-1.10.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j6sc290qhdrwyvwpifgz2z3p1dybf43v-ghc-shell-for-packages-0-env.drv' failed to build

How can I fix that? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions