johari / minicell

(wip) A rich visicalc dialect with new datatypes inside cells. Recalc or die. 🏴‍☠️
1 stars 0 forks source link

Nix #20

Closed johari closed 5 years ago

johari commented 5 years ago
nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [fgl generic-random QuickCheck brick fgl-arbitrary hspec diagrams palette mysql-simple  hslogger wai warp aeson wai-websockets wai-extra wai-cors fgl-visualize graphviz wreq stache temporary pureMD5 time hxt tagsoup hoauth2 pandoc probability cborg serialise haxl fb http-conduit http-client-tls async hashable resourcet cabal2nix extra dhall heterocephalus csound-expression hint gitlib libgit2 hlibgit2 gitlib-libgit2 hlint])"

I use Nix for development, mainly because a one-liner in Nix properly drops me in a shell that just works. I add packages to the one-liner once in a while, but as of now, it looks like this:

nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [fgl generic-random QuickCheck brick fgl-arbitrary hspec diagrams palette z3 mysql-simple logict HFuse hslogger aeson scotty])"

Since scotty doesn't work with Nix on Mac, I wrote SimpleServer.hs which uses wai and warp. My one-liner looks like this on mac:

nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [fgl generic-random QuickCheck brick fgl-arbitrary hspec diagrams palette z3 mysql-simple logict hslogger wai warp aeson wai-websockets wai-extra])"

I tried to setup stack mainly because Haskero [1] and Intero [2] depend on it. I had success on Linux, but Mac failed me with esoteric link errors.

[1]: https://marketplace.visualstudio.com/items?itemName=Vans.haskero
[2]: https://github.com/commercialhaskell/intero
johari commented 5 years ago

As of today, the instructions in INSTALL.md are enough to run the backend on my Linux machine, as well as my mac.