-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdefault.nix
More file actions
29 lines (26 loc) · 959 Bytes
/
default.nix
File metadata and controls
29 lines (26 loc) · 959 Bytes
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
{ nixpkgs ? import ./nix/nixpkgs.nix
}:
let
overlay = self: super: {
haskellPackages = super.haskellPackages.override (old: {
overrides = self.lib.composeExtensions (old.overrides or (_: _: {})) (hself: hsuper: {
ghc = hsuper.ghc // { withPackages = hsuper.ghc.withHoogle; };
ghcWithPackages = hself.ghc.withPackages;
# Any overrides or snowflake packages can be placed here
});
});
};
pkgs = import nixpkgs {
# Yay, overlays!
overlays = [overlay];
};
# The course, yey.
drv = pkgs.haskellPackages.callPackage ./state-machine-testing-course.nix {};
drvWithTools = pkgs.haskell.lib.addBuildTools drv
[ # A development tool for great justice
(pkgs.haskell.lib.justStaticExecutables pkgs.haskellPackages.ghcid)
(pkgs.haskell.lib.justStaticExecutables pkgs.haskellPackages.cabal-install)
];
in
# Remove the need for 'shell.nix'.
pkgs.haskell.lib.shellAware drvWithTools