on iko/ghcjs-patch-master help sign in
flakes tutorial: add buildInputs example (#1248)

Often I want to have non-haskell tools, like nixpkgs-fmt (used to format .nix files in IDE context), installed in the nix shell.

commitfbbcda2d216b63765099fe9a7a2c450009b0a8cd authorSridhar Ratnakumar <3998+srid@users.noreply.github.com> dateMon 27 Sep 2021, 02:12 (5 years ago) parent87a4143
1 file changed+4
docs/tutorials/getting-started-flakes.md+4
docs/tutorials/getting-started-flakes.md+4
@@ -57,6 +57,10 @@ Add `flake.nix`:
5757 hlint = {};
5858 haskell-language-server = {};
5959 };
60+ # Non-Haskell shell tools go here
61+ shell.buildInputs = with pkgs; [
62+ nixpkgs-fmt
63+ ];
6064 # This adds `js-unknown-ghcjs-cabal` to the shell.
6165 shell.crossPlatform = p: [p.ghcjs];
6266 };