octopod/default.nix

39 lines
1.0 KiB
Nix
Raw Normal View History

2020-12-09 16:20:24 +03:00
{ sources ? import ./nix/sources.nix
, reflex-platform ? sources.reflex-platform
, hls ? false
2020-12-09 16:20:24 +03:00
}:
(import reflex-platform { }).project ({ pkgs, ... }:
let foldOs = pkgs.lib.foldl' pkgs.lib.composeExtensions (self: super: { });
in
{
useWarp = true;
2020-12-09 16:20:24 +03:00
packages = {
octopod-common = ./octopod-common;
octopod-frontend = ./octopod-frontend;
octopod-backend = ./octopod-backend;
octo-cli = ./octo-cli;
octopod-api = ./octopod-api;
};
2020-12-09 16:20:24 +03:00
overrides = foldOs [
(import ./nix/haskell-language-server-overrides.nix {
inherit (pkgs.haskell) lib;
inherit sources;
}
)
(import ./nix/octopod-overrides.nix {
inherit (pkgs.haskell) lib;
inherit sources;
}
)
];
shellToolOverrides = ghc: super:
if hls then { inherit (ghc) haskell-language-server; }
else { };
shells = {
ghc = [ "octopod-common" "octopod-backend" "octopod-frontend" "octopod-api" "octo-cli" ];
ghcjs = [ "octopod-common" "octopod-frontend" ];
};
})