Main motivations for using a `flake.nix`:
- To simplify managing inputs that we need to lock
(e.g. Nixpkgs and some haskellPackages).
- To speed up the loading of the developing shell.
See last stage of:
https://www.haskellforall.com/2022/08/incrementally-package-haskell-program.html
To load a shell: `nix -L develop` or `direnv allow`,
this will get reachable all the dependencies needed through the environment,
then `cabal repl` can work.
To update a dependency: `nix flake lock --update-input nixpkgs`
To update all dependencies: `nix flake update`
WARNING: Please review the WARNING comments about the use of a non primary branch
for several dependencies, they're at the exact commit frozen in `stack.yaml`
WARNING: Please review the patches in the `patches/` directory,
some should be pushed upstream, but may require a bit more care
to support backward compatibility:
- patches/accelerate-arithmetic/0001-remove-test-using-removed-realBandedGramian.patch
- patches/arxiv-api/0001-build-fix-license.patch
- patches/crawlerPubMed/0001-fix-test-suite-build-dependencies.patch
- patches/duckling/0001-fix-missing-Eq-Dimension-a-needed-by-recent-hashable.patch
- patches/duckling/0002-support-and-require-aeson-2.0.patch
- patches/ekg-json/0001-support-and-require-aeson-2.0.patch
- patches/hal/0001-build-fix-halCrawler-crawlerHAL.patch
- patches/patches-class/0001-fix-comment-that-confused-GHC-because-of-haddock-syn.patch
- patches/servant-ekg/0001-fix-missing-instance-HasEndpoint.patch
- patches/servant-job/0001-fix-comment-breaking-haddock.patch
Some may contain questionnable changes:
eg. `patches/accelerate-llvm-native/0001-fix-removed-argInt-by-using-argInt64.patch`
Some come from upstream but are not merged yet:
- patches/opaleye/PR-563.patch
NOTE: `pre-commit-hooks` is enabled, but only on `.nix` files so far.
It generates `.pre-commit-config.yaml` and `.git/hooks/pre-commit`.