-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstack-shell.nix_
25 lines (21 loc) · 977 Bytes
/
stack-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
let
hsPkgs = (import ./default.nix);
src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz;
pkgs = import (src + "/nixpkgs") (import src);
mypkgs = import <nixpkgs> {};
# nixpkgsUnstable =
# let
# # sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# nixpkgs-unstable-src = fetchTarball https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz;
# # nixpkgs-unstable-src = <nixpkgs-unstable>;
# in import nixpkgs-unstable-src { config = { allowUnfree = true; }; };
in
hsPkgs.shellFor {
# Shell will provide the dependencies, but not packages themselves.
packages = ps: with ps; [ generate-all-tests ];
# This adds cabal-install to the shell, which helps tests because
# they use a nix-shell --pure. Normally you would BYO cabal-install.
buildInputs = with pkgs; [ mypkgs.cabal-install nix zlib ];
exactDeps = true;
STACK_IN_NIX_SHELL = true;
}