summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-02-15 23:03:40 -0800
committerBen Sima <ben@bsima.me>2020-02-16 00:37:52 -0800
commitd480cce48d04d5e4353281f014f66fd61301c393 (patch)
tree395e1ed88036a9511f2197cce885c1a8a2256d64 /default.nix
parent9c01b1fc7dac01b5d2a53ffc710c24811a773904 (diff)
Split buildHaskellApp into buildGhc and buildGhcjs
Two functions makes it simpler to reason about what is being built and when, even if it is a bit more explicit. I also removed the dumb Apex/Aero naming thing because Server/Client is just easier to remember.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix55
1 files changed, 37 insertions, 18 deletions
diff --git a/default.nix b/default.nix
index a05d370..4d2fbd2 100644
--- a/default.nix
+++ b/default.nix
@@ -5,7 +5,8 @@ let
# TODO(bsima): buildNixOS should be split into multiple functions that each
# return one thing, instead of a single function that returns multiple things
buildOS = import ./Com/Simatime/buildOS.nix nixos;
- buildHaskellApp = import ./Com/Simatime/buildHaskellApp.nix nixpkgs;
+ buildGhc = import ./Com/Simatime/buildGhc.nix nixpkgs;
+ buildGhcjs = import ./Com/Simatime/buildGhcjs.nix nixpkgs;
nixos-mailserver = let ver = "v2.3.0"; in builtins.fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${ver}/nixos-mailserver-${ver}.tar.gz";
sha256 = "0lpz08qviccvpfws2nm83n7m2r8add2wvfg9bljx9yxx8107r919";
@@ -69,18 +70,16 @@ in {
boot.isContainer = true;
networking.useDHCP = false;
};
- } // (buildHaskellApp {
- name = "Com.InfluencedByBooks";
- nick = "ibb";
- deps = {
- both = [
+ } // {
+ Server = buildGhc {
+ name = "Com.InfluencedByBooks.Server";
+ nick = "ibb";
+ deps = [
"clay"
"miso"
"protolude"
"servant"
"text"
- ];
- apex = [
"MonadRandom"
"acid-state"
"blaze-html"
@@ -93,18 +92,27 @@ in {
"servant-server"
"text"
];
- aero = [
+ };
+ Client = buildGhcjs {
+ name = "Com.InfluencedByBooks.Client";
+ nick = "ibb";
+ deps = [
+ "clay"
+ "miso"
+ "protolude"
+ "servant"
+ "text"
"aeson"
"containers"
"ghcjs-base"
];
};
- });
- Com.MusicMeetsComics = buildHaskellApp {
- name = "Com.MusicMeetsComics";
- nick = "mmc";
- deps = {
- both = [
+ };
+ Com.MusicMeetsComics = {
+ Server = buildGhc {
+ name = "Com.MusicMeetsComics.Server";
+ nick = "mmc";
+ deps = [
"aeson"
"clay"
"containers"
@@ -114,8 +122,6 @@ in {
"split"
"string-quote"
"text"
- ];
- apex = [
"dhall"
"ekg"
"fast-logger"
@@ -136,7 +142,20 @@ in {
"wai-middleware-metrics"
"warp"
];
- aero = [
+ };
+ Client = buildGhcjs {
+ name = "Com.MusicMeetsComics.Client";
+ nick = "mmc";
+ deps = [
+ "aeson"
+ "clay"
+ "containers"
+ "miso"
+ "protolude"
+ "servant"
+ "split"
+ "string-quote"
+ "text"
"ghcjs-base"
];
};