From 52255a4158af8dfbd8f7a4dfbe14b4d46df2c601 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 21 Dec 2023 05:37:07 +0100 Subject: chore: only process scans --- default.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 default.nix (limited to 'default.nix') 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 + ''; + }; +} + -- cgit v1.2.3