reflex-platform icon indicating copy to clipboard operation
reflex-platform copied to clipboard

Missing dependency when using nix-build: servant-reflex

Open rubenmoor opened this issue 4 years ago • 1 comments

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 avatar Jan 22 '21 05:01 rubenmoor

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.

rubenmoor avatar Jan 22 '21 18:01 rubenmoor