diff options
author | Joris | 2016-10-30 20:27:16 +0100 |
---|---|---|
committer | Joris | 2016-10-30 20:27:16 +0100 |
commit | a0ee1260e7efaf6248df9445d4d7165e2fc16cae (patch) | |
tree | ea9250ca96459041a45aea619f9a8741643ff7ee | |
parent | e899cecde7fb10b5e7ae1b6130922437297f5cb0 (diff) |
Simplify build
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | build | 2 | ||||
-rw-r--r-- | default.nix | 14 | ||||
-rw-r--r-- | shell.nix | 46 |
6 files changed, 52 insertions, 25 deletions
@@ -5,6 +5,4 @@ database-wal elm-stuff/ public/javascripts/*.js sessionKey -node_modules local.conf -sharedCost.nix @@ -3,13 +3,9 @@ all: build clean: @cabal clean > /dev/null @rm -r elm-stuff >/dev/null 2>&1 || true - @rm -r node_modules >/dev/null 2>&1 || true install: - @cabal2nix --shell . > sharedCost.nix - @nix-shell sharedCost.nix -I ~ --command 'cabal configure' @elm package install - @npm install # Watch # ----- @@ -17,13 +13,13 @@ install: watch: watch-server watch-elm watch-js watch-server: - @./node_modules/nodemon/bin/nodemon.js -e hs,conf --exec 'clear && make build-and-launch-server --silent' & + @nodemon -e hs,conf --exec 'clear && make build-and-launch-server --silent' & watch-elm: - @./node_modules/nodemon/bin/nodemon.js -e elm --exec 'clear && make build-elm --silent' & + @nodemon -e elm --exec 'clear && make build-elm --silent' & watch-js: - @./node_modules/nodemon/bin/nodemon.js --watch src/client/js --exec 'make build-js --silent' + @nodemon --watch src/client/js --exec 'make build-js --silent' # Build and launch # ---------------- @@ -39,6 +35,7 @@ kill-server: # Build # ----- +.PHONY: build build: build-server build-elm build-js build-server: @@ -41,5 +41,5 @@ See [application.conf](application.conf). TODO ---- -- CRUD animation (loading, created-updated-deleted element) +- CRUD animations (loading, created-updated-deleted element) - Weekly notifications about added, modified, deleted payments and incomes @@ -1,2 +1,2 @@ -#!/bin-sh +#!/bin/sh nix-shell --command "make clean install build" diff --git a/default.nix b/default.nix deleted file mode 100644 index 3db9b27..0000000 --- a/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -with import <nixpkgs> {}; { - env = stdenv.mkDerivation { - name = "env"; - buildInputs = with pkgs; [ - elmPackages.elm - cabal-install - cabal2nix - nodejs - sqlite - tmux - tmuxinator - ]; - }; -} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..83ba9fb --- /dev/null +++ b/shell.nix @@ -0,0 +1,46 @@ +with import <nixpkgs> {}; { + env = stdenv.mkDerivation { + name = "env"; + buildInputs = with pkgs; [ + elmPackages.elm + cabal-install + cabal2nix + nodejs + sqlite + tmux + tmuxinator + nodePackages.nodemon + (haskellPackages.ghcWithPackages (p: with p; [ + scotty + wai + wai-middleware-static + http-types + http-conduit + time + text + blaze-builder + cookie + bytestring + persistent + persistent-sqlite + persistent-template + monad-logger + resourcet + transformers + blaze-html + clay + aeson + clientsession + uuid + mime-mail + mtl + lens + parsec + unordered-containers + containers + email-validate + config-manager + ])) + ]; + }; +} |