File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,26 @@ sudo systemctl restart nix-daemon.service
140140
1411415 . Run ` nix-build ` from the project root
142142
143+ ### Incremental Builds
144+
145+ Building with ` nix-build ` does a full rebuild every time, which is usually not
146+ what you want when developing. To do incremental builds, you need to enter a nix
147+ shell. To do that use the following command:
148+
149+ ```
150+ $ nix-shell -A shells.ghc
151+ ```
152+
153+ This puts you in a shell that has all the necessary dependencies installed. Once
154+ inside this shell you can build as normal with cabal using ` cabal build ` or
155+ ` cabal new-build ` .
156+
157+ You can also build with stack inside this shell as follows:
158+
159+ ```
160+ $ stack --stack-yaml stack-nix.yaml build
161+ ```
162+
143163License
144164---
145165
Original file line number Diff line number Diff line change 1+ resolver : ghc-8.0.2
2+ system-ghc : true
3+ install-ghc : false
You can’t perform that action at this time.
0 commit comments