From a0ee1260e7efaf6248df9445d4d7165e2fc16cae Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 30 Oct 2016 20:27:16 +0100 Subject: Simplify build --- .gitignore | 2 -- Makefile | 11 ++++------- README.md | 2 +- build | 2 +- default.nix | 14 -------------- shell.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 52 insertions(+), 25 deletions(-) delete mode 100644 default.nix create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index d03e751..d5d3465 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,4 @@ database-wal elm-stuff/ public/javascripts/*.js sessionKey -node_modules local.conf -sharedCost.nix diff --git a/Makefile b/Makefile index e432c86..efbf48b 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/README.md b/README.md index d1544aa..dbe30b7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build b/build index 38bfe40..9e5cca5 100755 --- a/build +++ b/build @@ -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 {}; { - 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 {}; { + 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 + ])) + ]; + }; +} -- cgit v1.2.3