Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with ghc(js) 9.8.2 + 9.10.1 #56

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

ymeister
Copy link
Contributor

@ymeister ymeister commented Aug 3, 2024

For haskell.nix:
default.nix:

let deps = {
      "haskell.nix" = builtins.fetchTarball {
        url = "https://github.com/input-output-hk/haskell.nix/archive/d8c50dcaf3d3d589829ee9be9d5dba8279b8cc59.tar.gz";
        sha256 = "0a5hgryz6nszmy67yf1aks399h2aw0nj845518c4prs5c6ns1z7p";
      };
    };

    haskellNix = import deps."haskell.nix" {};

    # Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
    pkgs = import
      # haskell.nix provides access to the nixpkgs pins which are used by our CI,
      # hence you will be more likely to get cache hits when using these.
      # But you can also just use your own, e.g. '<nixpkgs>'.
      haskellNix.sources.nixpkgs-unstable
      # These arguments passed to nixpkgs, include some patches and also
      # the haskell.nix functionality itself as an overlay.
      haskellNix.nixpkgsArgs;

    project = pkgs: pkgs.haskell-nix.project {
      src = ./.;

      shell.withHaddock = if pkgs.stdenv.hostPlatform.isGhcjs then false else true;

      # Specify the GHC version to use.
      compiler-nix-name = "ghc910"; # Not required for `stack.yaml` based projects.
    };

in {
  ghc = project pkgs;
  ghc-js = project pkgs.pkgsCross.ghcjs;
}

shell.nix:

let projects = import ./default.nix;
    project = projects.ghc;
in project.shellFor {
  tools = {
    cabal = "latest";
  };

  buildInputs = with project.pkgs; [
    nodejs-slim_latest
  ];

  # Sellect cross compilers to include.
  crossPlatforms = ps: with ps; [
    ghcjs # Adds support for `javascript-unknown-ghcjs-cabal build` in the shell
  ];
}

For nixpkgs:
When building on ghc js, requires single-core building (https://gitlab.haskell.org/ghc/ghc/-/issues/25083#note_578275).

patch = haskellLib.overrideCabal (drv: { enableParallelBuilding = false; }) super.patch;

cabal.project Show resolved Hide resolved
patch.cabal Outdated Show resolved Hide resolved
@ymeister ymeister changed the title Build with ghc(js)-9.10 Build with ghc(js) 9.8.2 + 9.10.1 Aug 7, 2024
@ymeister ymeister requested review from alexfmpe, ryantrinkle and ali-abrar and removed request for alexfmpe August 7, 2024 03:44
systems = ["x86_64-linux" "x86_64-darwin"];
systems = ["x86_64-linux"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bummer, but I think it is fine for now because https://ci.obsidian.systems/ is in maintenance mode, and other things (like reflex itself) will get this.

@Ericson2314 Ericson2314 merged commit 9ec61a1 into reflex-frp:develop Sep 12, 2024
21 checks passed
This was referenced Sep 12, 2024
Ericson2314 added a commit that referenced this pull request Sep 12, 2024
1. Restore a `Data.Semigroup.Commutative` reexport accidentally removed
   in #56. (I accidentally forgot to notice during review.)

2. Replace partial `Map.lookup` with proper custom error for internal
   error. (This would make debugging a bug in the implementation
   easier.) This was part of #55.

Co-Authoredy-By: Dmitry Olshansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants