-
Notifications
You must be signed in to change notification settings - Fork 0
/
nixpkgs.nix
41 lines (35 loc) · 1.09 KB
/
nixpkgs.nix
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
{ sources ? import ./nix/sources.nix
}:
let
np = sources.nixpkgs;
pkgs = import np { overlays = [ overlay ]; };
gitignoreSrc =
(import sources."gitignore.nix" {}).gitignoreSource;
localSrc = dir: gitignoreSrc (pkgs.lib.cleanSource dir);
overlay = self: super: {
myHaskellPackages = super.haskellPackages.override {
overrides = hsOverlay self;
};
myShell = self.myHaskellPackages.shellFor {
packages = pkgs: [ pkgs.usort-lib pkgs.usort-console ];
buildInputs = [ pkgs.cabal-install pkgs.haskell-language-server ];
};
};
hsOverlay = pkgs: self: super:
let
h = pkgs.haskell.lib;
unmarkBroken = drv: h.overrideCabal drv (drv: { broken = false; });
in {
termbox-banana = unmarkBroken super.termbox-banana;
usort-lib =
self.callCabal2nix
"usort-lib"
(localSrc ./usort-lib)
{};
usort-console =
h.dontHaddock (self.callCabal2nix
"usort-console"
(localSrc ./usort-console)
{});
};
in pkgs