Home / Input Output / haskell.nix
86 commits this week Dec 06, 2019 - Dec 13, 2019

Keep source for component builds (#345)

This fixes and issue with TH functions like makeRelativeToProject that can be used to keep a reference to source files. If they are in a temporary location that can result in surprising file not found errors at run time.

It may also be useful for making debug symbols and the like refer to real files.

There is a risk that keeping the source for all packages could expand closure sizes (if for instance debug info is wanted, but you do not want to keep the source in the store). For that reason we have made this an option that must be enabled.

Move envDeps and exactDeps into lib and ghc (#360)

This change moves the work done to in envDeps and exactDeps from make-config-files.nix into the library components and the ghc compiler component (well passthru derivations on the ghc component).

This greatly reduces the number of times runCommand is used while nix is working out what to build.

This fixes a performance regression in #323 for builds where little or no work needs to be done. While maintaining the performance improvement in #323 that resulted from reducing the number of calls to ghc-pkg when significant work does need to be done.

Add support for materializing generated nix files (#356)

This change adds a materialized argument to the functions that generate nix files with plan-to-nix and stack-to-nix.

  • Provides builtins.trace messages with pointers on how to do so.

  • Includes a checkMaterialized option that can be used to verify the materialized files.

  • Documents how to script updates with plan-nix or stack-nix.

  • Outputs warnings if materialized files are used without hash (or without an index-state for cabal projects).

  • Provides materialized nix files for alex, happy and hscolour