From 96a1cfc630caa13d475e907bfa9b7869f9e5a613 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Tue, 3 Jan 2023 11:41:48 -0300 Subject: [PATCH 01/13] Provide initial flake plus README --- .envrc | 1 + README.md | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.lock | 26 +++++++++++++++ flake.nix | 74 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 199 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/README.md b/README.md index 193b717..2ae7b08 100644 --- a/README.md +++ b/README.md @@ -1 +1,99 @@ # Nix flake development environment example + +This repo provides an example [Nix flake][flakes] that outputs a Nix [development +environment][env]. + +## Prerequisites + +In order to use this starter template, you need to have [Nix installed][install] +and [flakes enabled][enable]. + +## Explore this flake + +To see what this flake provides: + +```shell +nix flake show +``` + +Or as JSON: + +```shell +nix flake show --json +``` + +As you can see, this flake outputs `default` development environments +(`devShells`) for a variety of architectures: + +- `aarch64-darwin` (macOS on Apple Silicon) +- `aarch64-linux` (Linux on ARM64) +- `x86_64-darwin` (macOS on AMD/Intel) +- `x86_64-linux` (Linux on AMD/Intel) + +## Using the environment + +There are two ways to use the [Nix development environment][env] provided in +this flake: + +1. You can clone this repo and run `nix develop` inside of it: + + ```shell + git clone https://github.com/nix-dot-dev/nix-flake-example + cd nix-flake-example + nix develop + ``` + +2. You can run `nix develop` and provide the flake reference to this repo: + + ```shell + nix develop github:nix-dot-dev/nix-flake-example + ``` + +This will likely take some time, as Nix needs to install the tools provided in +the environment. Once that's finished, you should be greeted by a welcome message +and then enter a [Bash] shell with a `bash-5.1$` prompt. + +This dev environment provides several tools: + +- [Node.js] +- [Python] +- [Go] +- [Terraform] + +You can see that these tools are installed in your local [Nix store][store] by +running commands like these: + +```shell +which node +which npm +which python +which go +``` + +In all cases, you should see paths of this form: + +```shell +/nix/store/${LONG_HASH}-${PACKAGE_NAME}/bin/${EXECUTABLE_NAME} +``` + +That means that if you run `node`, `npm`, `python`, and so on you'll use +versions of those tools in the Nix store and _not_ versions installed in +directories like `/usr/bin`. + +> **Note**: If you have [direnv] installed, you can also enter this +> flake-provided development environment by running `direnv allow`. Once you've +> done that, you will automatically enter the environment every time you +> navigate to this directory. + +[bash]: https://gnu.org/software/bash +[direnv]: https://direnv.net +[enable]: https://nixos.wiki/wiki/Flakes#Enable_flakes +[env]: https://nixos.org/explore +[flakes]: https://nixos.wiki/wiki/Flakes +[go]: https://go.dev +[install]: https://nixos.org/download +[nix.dev]: https://nix.dev +[node.js]: https://nodejs.org +[python]: https://python.org +[store]: https://nixos.org/manual/nix/stable/command-ref/nix-store +[terraform]: https://terraform.io diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7106756 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1672751307, + "narHash": "sha256-oC9HKU8y50GDx+/mVvg3MJO/uevyFpBgVKR8/lujMPc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a72e226b04c008ccc499e9e19dcda9dae493a8c9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..60e18b3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,74 @@ +{ + # If you wish, you can provide flakes with a description string. This string is + # shown if you run `nix flake show` to get information about a flake. + description = "nix.dev starter template for Nix flakes"; + + # Flake inputs are Nix code dependencies. What you don't see here in + # `flake.nix` is that each of these inputs has an entry in `flake.lock` that + # "pins" the input to a specific revision. This makes `flake.nix` and + # `flake.lock` inseparable. With flakes, the pinning mechanism previously + # provided by tools like Niv is built in. + inputs = { + # Nixpkgs is by far the largest Nix codebase in the world, providing tens of + # thousands of packages and utilities for the Nix language. Here, we + # essentially import Nixpkgs using a flake reference. `github` is the prefix + # for GitHub repos, but other prefixes include `gitlab` for GitLab repos, + # `path` for directories in the local filesystem, and more. + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + # Outputs are what the flake provides (packages, NixOS configurations, dev + # environments, and more). Flakes *must* have outputs or else they are... kind + # of pointless! In fact, you can think of flakes as a way of sharing Nix code + # with others. + outputs = { self, nixpkgs }: + let + # A set of systems to provide outputs for. In Nix flakes, many output + # types, like packages and development environments, need to be for + # specific systems. + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + # Helper function to provide per-system outputs. + nameValuePair = name: value: { inherit name value; }; + genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names); + forAllSystems = f: genAttrs supportedSystems (system: f { + # Passing a system attribute to `nixpkgs` produces a system-specific + # Nixpkgs + pkgs = import nixpkgs { inherit system; }; + }); + in + { + # Development environments provided by the flake + devShells = forAllSystems ({ pkgs }: { + # When you specify a `default` environment, you can enter it by running + # `nix develop` with no arguments. In other words `nix develop` is the + # equivalent of `nix develop .#default`. + default = pkgs.mkShell { + # The packages provided in the environment + buildInputs = with pkgs; [ + python310 # Python 3.10 + go_1_19 # Go 1.19 + nodejs-18_x # Node.js 18 + terraform + ]; + + # Nix development environments support environment variables. You + # can set variables like `DEBUG = true` or `ENV = "production"`. But + # beware: we do *not* recommend using environment variables to provide + # secrets! + MESSAGE = "This is only available inside the environment"; + + # Shell hooks are optional scripts that are run every time you enter + # the development environment. + shellHook = '' + echo "Welcome to an example Nix development environment for nix.dev!" + ''; + }; + }); + }; +} From b8f6a70e35a71c36fe515eac29c92df5e551c5ad Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Tue, 3 Jan 2023 11:48:30 -0300 Subject: [PATCH 02/13] More notes in flake.nix --- flake.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 60e18b3..1a7f216 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,8 @@ { # If you wish, you can provide flakes with a description string. This string is - # shown if you run `nix flake show` to get information about a flake. + # shown if you run `nix flake show` to get information about the flake. To see + # this description string, run this command: + # `nix flake show github:nix-dot-dev/nix-flake-example` description = "nix.dev starter template for Nix flakes"; # Flake inputs are Nix code dependencies. What you don't see here in @@ -15,6 +17,9 @@ # for GitHub repos, but other prefixes include `gitlab` for GitLab repos, # `path` for directories in the local filesystem, and more. nixpkgs.url = "github:NixOS/nixpkgs"; + + # Although Nixpkgs is extremely common, you can use any valid flake as an + # input. }; # Outputs are what the flake provides (packages, NixOS configurations, dev @@ -25,12 +30,12 @@ let # A set of systems to provide outputs for. In Nix flakes, many output # types, like packages and development environments, need to be for - # specific systems. + # specific systems. This flake supports these systems: supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" + "x86_64-linux" # Linux on AMD/Intel + "aarch64-linux" # Linux on ARM64 + "x86_64-darwin" # macOS on AMD/Intel + "aarch64-darwin" # macOS on Apple Silicon ]; # Helper function to provide per-system outputs. From ea0a4142a1adb7217f4c73d230e32703cd1325e9 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Tue, 3 Jan 2023 11:50:37 -0300 Subject: [PATCH 03/13] More details in README --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2ae7b08..797e496 100644 --- a/README.md +++ b/README.md @@ -43,15 +43,21 @@ this flake: nix develop ``` + > **Note**: If you have [direnv] installed, you can also enter this + > flake-provided development environment by running `direnv allow`. Once + > you've done that, you will automatically enter the environment every time + > you navigate to this directory. + 2. You can run `nix develop` and provide the flake reference to this repo: ```shell nix develop github:nix-dot-dev/nix-flake-example ``` -This will likely take some time, as Nix needs to install the tools provided in -the environment. Once that's finished, you should be greeted by a welcome message -and then enter a [Bash] shell with a `bash-5.1$` prompt. +This will likely take some time, as Nix needs to download [Nixpkgs] and then +install the tools provided in the environment. Once that's finished, you should +be greeted by a welcome message and then enter a [Bash] shell with a `bash-5.1$` +prompt. This dev environment provides several tools: @@ -80,11 +86,6 @@ That means that if you run `node`, `npm`, `python`, and so on you'll use versions of those tools in the Nix store and _not_ versions installed in directories like `/usr/bin`. -> **Note**: If you have [direnv] installed, you can also enter this -> flake-provided development environment by running `direnv allow`. Once you've -> done that, you will automatically enter the environment every time you -> navigate to this directory. - [bash]: https://gnu.org/software/bash [direnv]: https://direnv.net [enable]: https://nixos.wiki/wiki/Flakes#Enable_flakes @@ -93,6 +94,7 @@ directories like `/usr/bin`. [go]: https://go.dev [install]: https://nixos.org/download [nix.dev]: https://nix.dev +[nixpkgs]: https://github.com/NixOS/nixpkgs [node.js]: https://nodejs.org [python]: https://python.org [store]: https://nixos.org/manual/nix/stable/command-ref/nix-store From ec7a342ad6a9c11e10402f49037289cfad25bb45 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 6 Jan 2023 10:42:34 -0300 Subject: [PATCH 04/13] Switch to flake-utils and add warning about flake status --- README.md | 13 +++++++++++-- flake.lock | 16 ++++++++++++++++ flake.nix | 36 ++++++++++++++++++------------------ 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 797e496..8bcf3ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ # Nix flake development environment example -This repo provides an example [Nix flake][flakes] that outputs a Nix [development -environment][env]. +> **Warning**: [Nix flakes][flakes] are an experimental feature in [Nix]. Flakes +> will eventually become the de facto standard way to use Nix and thus you may +> find it worthwhile to learn how to use them. But beware that there may be +> breaking changes in the user interface around flakes. + +This repo provides an example [Nix flake][flakes] that outputs a reproducible Nix +[development environment][env] that works across [several systems][systems]. ## Prerequisites @@ -22,6 +27,8 @@ Or as JSON: nix flake show --json ``` +### System support + As you can see, this flake outputs `default` development environments (`devShells`) for a variety of architectures: @@ -93,9 +100,11 @@ directories like `/usr/bin`. [flakes]: https://nixos.wiki/wiki/Flakes [go]: https://go.dev [install]: https://nixos.org/download +[nix]: https://nixos.org [nix.dev]: https://nix.dev [nixpkgs]: https://github.com/NixOS/nixpkgs [node.js]: https://nodejs.org [python]: https://python.org [store]: https://nixos.org/manual/nix/stable/command-ref/nix-store +[systems]: #system-support [terraform]: https://terraform.io diff --git a/flake.lock b/flake.lock index 7106756..ee97bb0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1672751307, @@ -17,6 +32,7 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 1a7f216..e4ad97c 100644 --- a/flake.nix +++ b/flake.nix @@ -18,15 +18,17 @@ # `path` for directories in the local filesystem, and more. nixpkgs.url = "github:NixOS/nixpkgs"; - # Although Nixpkgs is extremely common, you can use any valid flake as an - # input. + flake-utils.url = "github:numtide/flake-utils"; + + # Although Nixpkgs and flake-utils are extremely common, you can use any + # valid flake as an input. }; # Outputs are what the flake provides (packages, NixOS configurations, dev # environments, and more). Flakes *must* have outputs or else they are... kind # of pointless! In fact, you can think of flakes as a way of sharing Nix code # with others. - outputs = { self, nixpkgs }: + outputs = { self, nixpkgs, flake-utils }: let # A set of systems to provide outputs for. In Nix flakes, many output # types, like packages and development environments, need to be for @@ -37,24 +39,23 @@ "x86_64-darwin" # macOS on AMD/Intel "aarch64-darwin" # macOS on Apple Silicon ]; - - # Helper function to provide per-system outputs. - nameValuePair = name: value: { inherit name value; }; - genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names); - forAllSystems = f: genAttrs supportedSystems (system: f { - # Passing a system attribute to `nixpkgs` produces a system-specific - # Nixpkgs - pkgs = import nixpkgs { inherit system; }; - }); in - { - # Development environments provided by the flake - devShells = forAllSystems ({ pkgs }: { + flake-utils.lib.eachSystem supportedSystems (system: + let + # This creates a system-specific version of Nixpkgs and stores it in a + # variable + pkgs = import nixpkgs { inherit system; }; + in + { # When you specify a `default` environment, you can enter it by running # `nix develop` with no arguments. In other words `nix develop` is the # equivalent of `nix develop .#default`. - default = pkgs.mkShell { - # The packages provided in the environment + devShells.default = pkgs.mkShell { + # The packages provided in the environment. Because the packages are + # included in the `pkgs` attribute set, each is pinned to a specific + # revision of Nixpkgs via `flake.lock`, which makes the environment + # reproducible (as anyone else using this environment uses the same + # Git revision). buildInputs = with pkgs; [ python310 # Python 3.10 go_1_19 # Go 1.19 @@ -75,5 +76,4 @@ ''; }; }); - }; } From 58114be39ccdf7cb68ed3e0ed1fe0d10e0b3b996 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 6 Jan 2023 10:48:09 -0300 Subject: [PATCH 05/13] Add GitHub Actions pipeline --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e890bf2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Show a Nix development environment in action in CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + check_store_paths: + name: Display the Nix store paths of installed packages + strategy: + matrix: + os: [ubuntu-22.04, macos-12] + runs-on: ${{ matrix.os }} + steps: + - name: git checkout + uses: actions/checkout@v3 + - name: Install Nix + uses: cachix/install-nix-action@v17 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Display versions + run: | + type python + type go + type node + type terraform From b497262e21805e713b14944aeca12ca4c0a1d0dd Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 6 Jan 2023 10:53:44 -0300 Subject: [PATCH 06/13] Use nix develop --command for Nix shell commands --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e890bf2..a1fdb60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Display versions run: | - type python - type go - type node - type terraform + nix develop --command type python + nix develop --command type go + nix develop --command type node + nix develop --command type terraform From 977ee5f1594434124cd990f84ea818c5a51f8dae Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 6 Jan 2023 10:58:41 -0300 Subject: [PATCH 07/13] Upgrade install-nix-action --- .github/workflows/ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1fdb60..2a478e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,27 @@ jobs: steps: - name: git checkout uses: actions/checkout@v3 + + # This step installs Nix using cachix/install-nix-action: + # + # https://github.com/marketplace/actions/install-nix) + # + # Another Nix insaller Action widely used in the community is the Nix + # Quick Install Action from nixbuild.net, which has a similar interface: + # + # https://github.com/marketplace/actions/nix-quick-install - name: Install Nix - uses: cachix/install-nix-action@v17 + uses: cachix/install-nix-action@v18 with: extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Display versions run: | - nix develop --command type python - nix develop --command type go - nix develop --command type node - nix develop --command type terraform + nix develop + + type python + type go + type node + type terraform + + exit From c6b849b745c7aa04769b0957b7397f5ca1aca3c3 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 6 Jan 2023 11:02:48 -0300 Subject: [PATCH 08/13] Use which instead of type --- .github/workflows/ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a478e9..30e03fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,11 +34,7 @@ jobs: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Display versions run: | - nix develop - - type python - type go - type node - type terraform - - exit + nix develop --command which python + nix develop --command which go + nix develop --command which node + nix develop --command which terraform From 6308846decb9f8fecf98eadba2974caf2713a422 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 12 Jan 2023 13:32:32 -0300 Subject: [PATCH 09/13] Remove GHA for now --- .github/workflows/ci.yml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 30e03fc..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Show a Nix development environment in action in CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - check_store_paths: - name: Display the Nix store paths of installed packages - strategy: - matrix: - os: [ubuntu-22.04, macos-12] - runs-on: ${{ matrix.os }} - steps: - - name: git checkout - uses: actions/checkout@v3 - - # This step installs Nix using cachix/install-nix-action: - # - # https://github.com/marketplace/actions/install-nix) - # - # Another Nix insaller Action widely used in the community is the Nix - # Quick Install Action from nixbuild.net, which has a similar interface: - # - # https://github.com/marketplace/actions/nix-quick-install - - name: Install Nix - uses: cachix/install-nix-action@v18 - with: - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Display versions - run: | - nix develop --command which python - nix develop --command which go - nix develop --command which node - nix develop --command which terraform From 09470b3908f6e9ca4b1ec0b061590436517a2c01 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 12 Jan 2023 13:53:52 -0300 Subject: [PATCH 10/13] Remove mention of --json flag for nix flake show --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 8bcf3ac..ad43486 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,6 @@ To see what this flake provides: nix flake show ``` -Or as JSON: - -```shell -nix flake show --json -``` - ### System support As you can see, this flake outputs `default` development environments From 01469edf52443788a5283a20fdf7a71357a6a8e0 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 19 Jan 2023 12:40:13 -0300 Subject: [PATCH 11/13] Update README.md Co-authored-by: Silvan Mosberger --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index ad43486..544cd59 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,6 @@ this flake: > you've done that, you will automatically enter the environment every time > you navigate to this directory. -2. You can run `nix develop` and provide the flake reference to this repo: - - ```shell - nix develop github:nix-dot-dev/nix-flake-example - ``` This will likely take some time, as Nix needs to download [Nixpkgs] and then install the tools provided in the environment. Once that's finished, you should From bef047a0040734143509143eca13adc569476ac7 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 19 Jan 2023 12:40:21 -0300 Subject: [PATCH 12/13] Update flake.nix Co-authored-by: Silvan Mosberger --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index e4ad97c..131bdff 100644 --- a/flake.nix +++ b/flake.nix @@ -57,9 +57,9 @@ # reproducible (as anyone else using this environment uses the same # Git revision). buildInputs = with pkgs; [ - python310 # Python 3.10 - go_1_19 # Go 1.19 - nodejs-18_x # Node.js 18 + python3 # Python 3.10 in this revision of nixpkgs + go # Go 1.19 + nodejs # Node.js 18 terraform ]; From 05b09e42dcc148afa09433d63937d90137ba65d8 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 19 Jan 2023 12:40:30 -0300 Subject: [PATCH 13/13] Update flake.nix Co-authored-by: Silvan Mosberger --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 131bdff..9c072b9 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ # revision of Nixpkgs via `flake.lock`, which makes the environment # reproducible (as anyone else using this environment uses the same # Git revision). - buildInputs = with pkgs; [ + packages = with pkgs; [ python3 # Python 3.10 in this revision of nixpkgs go # Go 1.19 nodejs # Node.js 18