forked from input-output-hk/stack2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
29 lines (24 loc) · 1.01 KB
/
default.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
{ pkgs ? import (import ./fetch-nixpkgs.nix) {} }:
with pkgs.haskell.lib;
((import ./stack2nix.nix { inherit pkgs; }).override {
overrides = self: super: {
# TODO: separate out output
stack2nix = justStaticExecutables (overrideCabal super.stack2nix (old: {
src = builtins.path {
name = "stack2nix";
path = ./.;
# Filter hidden dirs (.), e.g. .git and .stack-work
# TODO Remove once https://github.com/input-output-hk/stack2nix/issues/119 is done
filter = path: type:
!(pkgs.lib.hasPrefix "." (baseNameOf path))
&& baseNameOf path != "stack.yaml";
};
}));
# https://github.com/commercialhaskell/lts-haskell/issues/149
stack = doJailbreak super.stack;
# needed until we upgrade to 18.09
yaml = disableCabalFlag super.yaml "system-libyaml";
# https://github.com/NixOS/cabal2nix/issues/146
hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify;
};
}).stack2nix