about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2023-01-02T02·02+0100
committerProfpatsch <mail@profpatsch.de>2023-01-02T02·14+0000
commit1b003db7250949e2589336220ce162bf0b7b6fe3 (patch)
tree7077bb71bc08227cd98c6e93f3450d0b2c4ab885 /users/Profpatsch/my-prelude/default.nix
parent545f9384b568ef41efa28779e4cf0222d2b0ee94 (diff)
feat(users/Profpatsch/mailbox-org): list & update filters r/5562
One step closer towards a declarative description of filters.
In the end, the filters should be updated by their `rulename` field.

This implements a simple scheme where we list all filters, parse some
of their fields, use those fields to determine whether we want to
change the filters, and then only update the filters where we changed
something.

Unfortunately, we can only update the filters one-by-one (a common
mistake in APIs).

Pulls in some modules for Json parsing that I like to use, and an
`ErrorTree` abstraction over `Error` and `Data.Tree`.

Change-Id: Iea45d5aa0a3fee7ec570f06d3e77009769091274
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7720
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/my-prelude/default.nix')
-rw-r--r--users/Profpatsch/my-prelude/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/users/Profpatsch/my-prelude/default.nix b/users/Profpatsch/my-prelude/default.nix
index 87731394fc..8ff36a93d4 100644
--- a/users/Profpatsch/my-prelude/default.nix
+++ b/users/Profpatsch/my-prelude/default.nix
@@ -9,11 +9,15 @@ pkgs.haskellPackages.mkDerivation {
     ./MyPrelude.hs
     ./Label.hs
     ./Pretty.hs
+    ./Data/Error/Tree.hs
+    ./Aeson.hs
   ];
 
   isLibrary = true;
 
   libraryHaskellDepends = [
+    pkgs.haskellPackages.aeson
+    pkgs.haskellPackages.aeson-better-errors
     pkgs.haskellPackages.PyF
     pkgs.haskellPackages.errors
     pkgs.haskellPackages.profunctors
@@ -21,10 +25,12 @@ pkgs.haskellPackages.mkDerivation {
     pkgs.haskellPackages.these
     pkgs.haskellPackages.validation-selective
     pkgs.haskellPackages.error
-
+    pkgs.haskellPackages.hspec
+    pkgs.haskellPackages.hspec-expectations-pretty-diff
     pkgs.haskellPackages.hscolour
     pkgs.haskellPackages.nicify-lib
     pkgs.haskellPackages.ansi-terminal
+    pkgs.haskellPackages.vector
   ];
 
   license = lib.licenses.mit;