@@ -10,10 +10,10 @@ With [nix-tools](https://github.com/input-output-hk/nix-tools) in
10
10
` PATH ` , we can simply run the following command on a stack project:
11
11
12
12
``` bash
13
- stack-to-nix -o nix stack. yaml > nix/. stack-pkgs.nix
13
+ stack-to-nix -o nix -- stack- yaml stack.yaml
14
14
```
15
15
16
- This will produce a ` nix/.stack- pkgs.nix ` file that looks like the following:
16
+ This will produce a ` nix/pkgs.nix ` file that looks like the following:
17
17
``` nix
18
18
{
19
19
resolver = "lts-12.17";
@@ -23,7 +23,7 @@ This will produce a `nix/.stack-pkgs.nix` file that looks like the following:
23
23
"o-clock" = hackage.o-clock."0.1.1".revisions.default;
24
24
...
25
25
} // {
26
- my-package = ./.stack.nix/ my-package.nix;
26
+ my-package = ./my-package.nix;
27
27
...
28
28
};
29
29
};
@@ -35,15 +35,26 @@ packages. The overlay specifies which `extra-deps` (here: clock-0.1.1)
35
35
we wanted to overlay over the stackage snapshot, and what local
36
36
packages we want (here: my-package).
37
37
38
- We will then create the following ` nix/pkgs .nix ` file:
38
+ We will then create the following ` nix/default .nix ` file:
39
39
40
40
``` nix
41
- let stack-pkgs = import ./.stack-pkgs.nix; in
42
- { stackage, ... }:
43
- { pkg-def = stackage.${stack-pkgs.resolver};
44
- inherit (stack-pkgs) overlay;
45
- }
41
+ { pkgs ? import <nixpkgs> {} }:
42
+
43
+ let
44
+ haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) { inherit pkgs; };
45
+
46
+ pkgSet = haskell.mkStackPkgSet {
47
+ stack-pkgs = import ./pkgs.nix;
48
+ pkg-def-overlays = [];
49
+ modules = [];
50
+ };
51
+
52
+ in
53
+ pkgSet.config.hsPkgs
46
54
```
47
55
56
+ This generated file is a template, so you can customize it as
57
+ necessary.
58
+
48
59
* If you came here from the [ User Guide] ( /user-guide ) , go back and
49
60
complete the setup.*
0 commit comments