diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 44 |
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 + ''; + }; +} + |