From e899cecde7fb10b5e7ae1b6130922437297f5cb0 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 5 Oct 2016 09:59:43 +0200 Subject: Add the build command --- README.md | 14 ++++++++++---- build | 2 ++ build.nix | 13 ------------- default.nix | 14 ++++++++++++++ dev | 2 ++ package.json | 3 +-- shell.nix | 18 ------------------ 7 files changed, 29 insertions(+), 37 deletions(-) create mode 100755 build delete mode 100644 build.nix create mode 100644 default.nix create mode 100755 dev delete mode 100644 shell.nix diff --git a/README.md b/README.md index e7d9cfe..d1544aa 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ Install nix: curl https://nixos.org/nix/install | sh ``` -Inside the project directory, open a nix shell: +Then: ``` -nix-shell +./dev ``` -Inside tmux, add some users with sqlite after the migration is done: +Inside the tmux session, add some users with sqlite after the migration is done: ``` sqlite3 database @@ -26,6 +26,13 @@ insert into user(creation, email, name) values (datetime('now'), 'john@mail.com' insert into user(creation, email, name) values (datetime('now'), 'lisa@mail.com', 'Lisa'); ``` +Simple build +------------ + +``` +./build +``` + Configuration ------------- @@ -35,5 +42,4 @@ TODO ---- - CRUD animation (loading, created-updated-deleted element) -- Dates after today must be forbidden - Weekly notifications about added, modified, deleted payments and incomes diff --git a/build b/build new file mode 100755 index 0000000..38bfe40 --- /dev/null +++ b/build @@ -0,0 +1,2 @@ +#!/bin-sh +nix-shell --command "make clean install build" diff --git a/build.nix b/build.nix deleted file mode 100644 index 66e7e04..0000000 --- a/build.nix +++ /dev/null @@ -1,13 +0,0 @@ -with import {}; { - env = stdenv.mkDerivation { - name = "env"; - buildInputs = [ - elmPackages.elm - cabal-install - cabal2nix - nodejs - sqlite - tmux - ]; - }; -} diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..3db9b27 --- /dev/null +++ b/default.nix @@ -0,0 +1,14 @@ +with import {}; { + env = stdenv.mkDerivation { + name = "env"; + buildInputs = with pkgs; [ + elmPackages.elm + cabal-install + cabal2nix + nodejs + sqlite + tmux + tmuxinator + ]; + }; +} diff --git a/dev b/dev new file mode 100755 index 0000000..ddd2ada --- /dev/null +++ b/dev @@ -0,0 +1,2 @@ +#!/bin/sh +nix-shell --command "tmuxinator local" diff --git a/package.json b/package.json index 56b0d09..6d7467e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "dependencies": { - "nodemon": "1.9.2", - "elm": "0.17.1" + "nodemon": "1.9.2" }, "repository": "guyonvarch/sharedCost", "license": "GPL-3.0" diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 04290b8..0000000 --- a/shell.nix +++ /dev/null @@ -1,18 +0,0 @@ -with import {}; { - env = stdenv.mkDerivation { - name = "env"; - buildInputs = [ - elmPackages.elm - cabal-install - cabal2nix - nodejs - sqlite - tmux - tmuxinator - ]; - shellHook = '' - tmux kill-session -t sharedCost >/dev/null 2>&1 - tmuxinator local - ''; - }; -} -- cgit v1.2.3