diff options
-rw-r--r-- | .envrc | 1 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .tmuxinator.yml | 8 | ||||
-rw-r--r-- | Makefile | 35 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | package.json | 7 | ||||
-rw-r--r-- | shell.nix | 27 | ||||
-rw-r--r-- | stack.yaml | 11 |
8 files changed, 21 insertions, 90 deletions
@@ -1 +0,0 @@ -eval "$(lorri direnv)" @@ -1,4 +1,2 @@ -ad-listener.nix local.conf -.ghc.environment.* -.stack-work/ +dist-newstyle diff --git a/.tmuxinator.yml b/.tmuxinator.yml deleted file mode 100644 index 0d7363f..0000000 --- a/.tmuxinator.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: ad-listener -startup_window: app - -windows: - - console: - - # Empty - - app: - - make clean install watch diff --git a/Makefile b/Makefile deleted file mode 100644 index 339ea3e..0000000 --- a/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -all: build - -# Dev commands - -start: - @nix-shell --command "tmuxinator local" - -stop: - @nix-shell --command "tmuxinator stop ad-listener" - -# Other commands - -clean: - @stack clean > /dev/null - -install: - @stack setup - -watch: build - @nodemon --watch src --delay 0.2 -e hs,conf --exec 'clear && make build-and-launch' - -build-and-launch: - @(pkill ad-listener || true) && (stack build && make run || true) - -run: - @stack exec ad-listener - -build: - @stack build - -repl: - @stack repl - -test: - @stack test @@ -6,25 +6,15 @@ Ad-listener listen for changes at given URLs on: - [ouestFrance](https://www.ouestfrance-immo.com/), - [seLoger](https://www.seloger.com/). -Then, it send a mail whenever a new ad come up. +Then, it send a mail whenever a new ad comes up. ## Getting started -1. Install [nix](https://nixos.org/nix/), -2. launch `make start`, -3. later, stop the project with `make stop`. +In `nix-shell`, run `cabal run ad-listener`. -## Build executable +## Tests -```bash -make build -``` - -## Run tests - -```bash -make test -``` +In a `nix-shell`, run `cabal test` ## Configuration diff --git a/package.json b/package.json deleted file mode 100644 index e591786..0000000 --- a/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": { - "nodemon": "1.9.2" - }, - "repository": "guyonvarch/ad-listener", - "license": "GPL-3.0" -} @@ -1,12 +1,17 @@ -with import <nixpkgs> {}; { - env = stdenv.mkDerivation { - name = "env"; - buildInputs = with nodePackages; with haskellPackages; [ - stack - nodemon - stylish-haskell - tmux - tmuxinator - ]; - }; +with (import (builtins.fetchGit { + name = "nixos-21.05-2021-08-02"; + url = "https://github.com/nixos/nixpkgs/"; + ref = "refs/heads/nixos-21.05"; + rev = "d4590d21006387dcb190c516724cb1e41c0f8fdf"; +}){}); + +mkShell { + + buildInputs = with haskellPackages; [ + cabal-install + stylish-haskell + tmux + (ghc.withPackages (hp: [ hp.zlib ])) + ]; + } diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index b953365..0000000 --- a/stack.yaml +++ /dev/null @@ -1,11 +0,0 @@ -resolver: lts-14.4 - -packages: -- . -- location: - git: https://gitlab.com/guyonvarch/config-manager - commit: c0f5e9c5ad8ac88b05ecff9b035c59480829aff1 - extra-dep: true - -extra-deps: -- logging-3.0.5@sha256:88096d3124fce9a19af3720f751e1a354d866ed5030d2e5197238d2277cdb2f2 |