blob: 16d73b0b6a68832589ee07ba6fba9bc21279a32e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
'';
};
}
|