summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-21 05:37:07 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-21 05:37:07 +0100
commit52255a4158af8dfbd8f7a4dfbe14b4d46df2c601 (patch)
tree5588132e732b54b623d619eb48aed0172da6c74d /default.nix
parent1b574f472e6ca052db3ab5041e2fc1ab9923f163 (diff)
chore: only process scans
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..16d73b0
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,44 @@
+{ sources ? import ./nix/sources.nix
+, pkgs ? import sources.nixpkgs {
+ overlays = [
+ (self: super: {
+ apaperless = pkgs.writers.writeDashBin "apaperless" ''
+ set -efu
+ exec cabal run apaperless -- "$@"
+ '';
+ })
+ ];
+ }
+}:
+let
+ haskellPackages = pkgs.haskellPackages.override {
+ overrides = self: super: {
+ apaperless = super.callCabal2nix "apaperless" ./. { };
+ };
+ };
+in
+rec {
+ inherit (haskellPackages) apaperless;
+ shell = haskellPackages.shellFor {
+ packages = _: [ apaperless ];
+ buildInputs = [
+ haskellPackages.cabal-install
+ haskellPackages.hlint
+ haskellPackages.ormolu
+ haskellPackages.pointfree
+ pkgs.apaperless
+ pkgs.ghcid
+ pkgs.haskell-language-server
+ pkgs.niv
+ pkgs.tesseract
+ pkgs.pdfsandwich
+ pkgs.unpaper
+ ];
+ withHoogle = true;
+ withHaddock = true;
+ shellHook = ''
+ HISTFILE=${pkgs.lib.escapeShellArg ./.}/.history; export HISTFILE
+ '';
+ };
+}
+