Skip to content

Instantly share code, notes, and snippets.

@asheshambasta
Created July 13, 2021 08:07
Show Gist options
  • Save asheshambasta/82aadfce4c782ae49757e39d2bd4bf8d to your computer and use it in GitHub Desktop.
Save asheshambasta/82aadfce4c782ae49757e39d2bd4bf8d to your computer and use it in GitHub Desktop.
{ system ? builtins.currentSystem }:
let
sources = import ./nix/sources.nix;
custom-nixutils = import sources.custom-nixutils;
nixpkgsOverlays = with custom-nixutils.overlays;
[ utils db ] ++ (with sources; [ (import "${custom-prelude}/overlay.nix") ]);
rp = import sources.reflex-platform { inherit system nixpkgsOverlays; };
in rp.project ({ pkgs, ... }: {
useWarp = true;
withHoogle = false;
packages = {
fht-frontend = ./fht-frontend;
fht-data = ./fht-data;
fht-base = ./fht-base;
fht-api = ./fht-api;
fht-backend = ./fht-backend;
};
shells = {
ghc = [
"fht-frontend"
"fht-backend"
"fht-data"
"fht-base"
"fht-api"
] # ++ ( with pkgs; [ inotify-tools ])
;
ghcjs = [ "fht-frontend" ];
};
overrides = self: super:
let
lib = super.lib;
haskellOverrides = selfh: superh:
with sources; {
inherit bulmex reflex-dom-helpers;
# composite-opaleye needs composite-base, which needs vinyl.
# These packages are included as overrides since they're either marked broken
# or aren't present.
composite-opaleye = self.callCabal2nix "composite-opaleye"
"${composite}/composite-opaleye" { };
composite-base =
self.callCabal2nix "composite-base" "${composite}/composite-base"
{ };
vinyl = self.callCabal2nix "vinyl" vinyl { };
# custom-prelude = import sources.custom-prelude;
};
in {
haskellPackages = super.haskellPackages.override (old: {
overrides =
lib.composeExtensions (old.overrides or (_: _: { })) haskellOverrides;
});
};
shellToolOverrides = self: super: {
brittany = self.callCabal2nix "brittany" sources.brittany { };
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment