In this tutorial, you will learn how to add flake.nix
to a Gleam project.
Initialize a new project
Make
gleam
executable available:Run
gleam new
to scaffold a new project:By default,
gleam new
generates.github
directory containing a CI workflow for running tests, but we don't need it as we will install Gleam using Nix.Enter the directory:
Add flake.nix to the project
Initialize the template from the root directory of the project:
Open
flake.nix
and update the Erlang version to the current one:Add
.envrc
:Allow direnv: