aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.envrc1
-rw-r--r--.gitignore4
-rw-r--r--.tmuxinator.yml8
-rw-r--r--Makefile35
-rw-r--r--README.md18
-rw-r--r--package.json7
-rw-r--r--shell.nix27
-rw-r--r--stack.yaml11
8 files changed, 21 insertions, 90 deletions
diff --git a/.envrc b/.envrc
deleted file mode 100644
index 051d09d..0000000
--- a/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-eval "$(lorri direnv)"
diff --git a/.gitignore b/.gitignore
index da83f62..ebb916c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README.md b/README.md
index ca0390d..97520ce 100644
--- a/README.md
+++ b/README.md
@@ -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"
-}
diff --git a/shell.nix b/shell.nix
index afe339f..997bd76 100644
--- a/shell.nix
+++ b/shell.nix
@@ -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