-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
37 lines (32 loc) · 976 Bytes
/
shell.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
let
# Default set of pinned packages
bootstrap = import <nixpkgs> {};
defaultPkgs = import (
bootstrap.fetchFromGitHub
(builtins.fromJSON (builtins.readFile ./nixpkgs.json))
) {};
# Extra packages to be available in the shell environment
extraBuildInputs = pkgs: [
# Necessary for the `cabal` utility
pkgs.cabal-install
# Necessary to rebuild the library and run
# tests each time the source files change
pkgs.ghcid
# Necessary for the `make` utility
pkgs.gnumake
# Used to watch the source files and re-run the
# Haddock docs build each time they change
pkgs.entr
];
mkPackage = pkgs: (
pkgs.haskellPackages.developPackage
{ root = ./.;
overrides = self: super: { };
source-overrides = { };
}
).overrideAttrs(attrs: {
buildInputs = attrs.buildInputs ++ (extraBuildInputs pkgs);
});
in
{ pkgs ? defaultPkgs }:
mkPackage pkgs