diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-05-31 10:42:26 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-05-31 11:54:36 +0200 |
commit | 8d3fdb08672c89d8657dcd4475acfea56a66b906 (patch) | |
tree | df46aaf7c8e9e3331b19fd79f074f0fdc471f931 /default.nix | |
parent | ec0ea18486ed2569808f2e511ecac52f812300b0 (diff) |
add frontend (boilerplate)
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/default.nix b/default.nix index 060a4c7..b2c6d83 100644 --- a/default.nix +++ b/default.nix @@ -2,22 +2,40 @@ , sources ? import ./nix/sources.nix }: let - haskellPackages = pkgs.haskellPackages.override { + haskellPackages = pkgs.haskell.packages.ghc98.override { overrides = self: super: { - acms = self.callCabal2nix "acms" ./. { }; astore = self.callCabal2nix "astore" sources.json2sql { }; autotypes = self.callCabal2nix "autotypes" ./autotypes { }; - json2sql = self.callCabal2nix "json2sql" sources.json2sql { }; + backend = self.callCabal2nix "backend" ./backend { }; + frontend = self.callCabal2nix "frontend" ./frontend { }; + websockets = pkgs.haskell.lib.doJailbreak super.websockets; + }; + }; + + jsHaskellPackages = pkgs.pkgsCross.ghcjs.haskell.packages.ghc98.override { + overrides = self: super: { + frontend = self.callCabal2nix "frontend" ./frontend { }; }; }; in rec { - inherit (haskellPackages) acms; + inherit (haskellPackages) backend; + inherit (jsHaskellPackages) frontend; shell = haskellPackages.shellFor { - packages = _: [ acms haskellPackages.autotypes ]; + packages = _: [ + haskellPackages.autotypes + haskellPackages.backend + haskellPackages.frontend + ]; buildInputs = [ haskellPackages.cabal-install haskellPackages.ormolu + (pkgs.writeScriptBin "reload" '' + set -efu + ${haskellPackages.ghcid.bin}/bin/ghcid -c \ + '${haskellPackages.cabal-install}/bin/cabal new-repl' \ + -T ':run Main.main' + '') ]; withHoogle = true; withHaddock = true; |