diff --git a/README.md b/README.md index 7716dbd..07f8297 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,52 @@ cabal v2-run hnix -- --help (`--` is for separation between `cabal` & `hnix` args) +### Using the Nix-build + +There is a number of build options to use with `nix-build`, documentation of them is in: `./default.nix`, keys essentially pass-through the [Nixpkgs Haskell Lib API](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix). + +Options can be used as: +``` +nix-build \ + --arg \ + --arg \ + --argstr "" +``` + +#### Run benchmarks + +``` +nix-build \ + --arg disableOptimization false \ + --arg enableDeadCodeElimination true \ + --arg doStrip true \ + --arg doBenchmark true +``` + +#### With profiling + +``` +nix-build \ + --arg disableOptimization false \ + --arg enableDeadCodeElimination true \ + --arg enableLibraryProfiling true \ + --arg enableExecutableProfiling true +``` + +#### With full debug info + +``` +nix-build \ + --arg disableOptimization false \ + --arg enableDeadCodeElimination true \ + --arg doBenchmark true \ + --arg doStrip false \ + --arg enableLibraryProfiling true \ + --arg enableExecutableProfiling true + --arg doTracing true \ + --arg enableDWARFDebugging true +``` + ## Using the HNix REPL To enter in: