reflex-frp / reflex-platform

A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
722 stars 164 forks source link

Missing dependency when using nix-build: servant-reflex #719

Open rubenmoor opened 3 years ago

rubenmoor commented 3 years ago

I have a weird inconsistency where I encounter the following error only when using nix-build -A ghcjs.frontend:

Setup: Encountered missing dependencies:
servant-reflex -any

Building with cabal works fine:

nix-shell -A shells.ghcjs --run "cabal new-build all"

This is my slightly modified default.nix where I added servant-reflex as haskell-package-override:

# default.nix
{ system ? builtins.currentSystem, unstable ? import <nixos-unstable> {} } :
(import ./reflex-platform { inherit system; }).project ({pkgs, ...}: {
  useWarp = true;
  packages = {
    common = ./common;
    backend = ./backend;
    frontend = ./frontend;
  };

  shells = {
    ghc = ["common" "backend" "frontend"];
    ghcjs = ["common" "frontend"];
  };
  shellToolOverrides = ghc: super: {
    haskell-language-server = unstable.haskell-language-server;
  };
  overrides = self: super: {
    gerippe = self.callPackage ./gerippe {};
    mmorph = self.callHackage "mmorph" "1.1.3" {};
    servant-reflex = pkgs.fetchFromGitHub {
      owner = "imalsogreg";
      repo = "servant-reflex";
      rev = "master";
      sha256 = "0issnp95rnji3v9qifr0brypxsvmjkzanfq5lscj68lynnjv37g0";
    };
  };
})
rubenmoor commented 3 years ago

As a workaround, I added servant-reflex as a local package (next to common) via git submodule.

I have no idea, though, what's going on. My other override-dependency, gerippe, does not cause any problem either.