blob: ae21808d1489f586607de97a17de497af9f74ba7 (
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
45
46
47
48
49
50
51
|
{ pkgs ? import <nixpkgs> {
overlays = [ (import ./pkgs) ];
}
}:
let
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
anissue = (super.callCabal2nix "anissue" ./. { }).overrideAttrs (oldAttrs: {
nativeBuildInputs = [ pkgs.installShellFiles ];
buildInputs = oldAttrs.buildInputs or [] ++ [ pkgs.makeWrapper ];
postInstall = ''
exe=${oldAttrs.pname}
installShellCompletion --cmd $exe \
--bash <($out/bin/$exe --bash-completion-script $exe) \
--fish <($out/bin/$exe --fish-completion-script $exe) \
--zsh <($out/bin/$exe --zsh-completion-script $exe)
wrapProgram $out/bin/$exe --prefix PATH : ${pkgs.lib.makeBinPath [
pkgs.git
pkgs.mdcat
pkgs.tree-grepper
]}
'';
});
};
};
in
rec {
inherit (haskellPackages) anissue;
shell = haskellPackages.shellFor {
packages = _: [ anissue ];
buildInputs = [
haskellPackages.cabal-install
haskellPackages.ormolu
pkgs.tree-grepper
pkgs.ghcid
pkgs.git
pkgs.haskell-language-server
pkgs.mdcat
];
withHoogle = true;
shellHook = ''
HISTFILE=${pkgs.lib.escapeShellArg ./.}/.history; export HISTFILE
'';
};
}
|