forked from the-nix-way/nix-flake-dev-environments
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
31 lines (27 loc) · 860 Bytes
/
flake.nix
File metadata and controls
31 lines (27 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
description = "A Nix-flake-based Go development environment";
# GitHub URLs for the Nix inputs we're using
inputs = {
# Simply the greatest package repository on the planet
nixpkgs.url = "github:NixOS/nixpkgs";
# A set of helper functions for using flakes
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
node = pkgs.nodejs_latest;
in {
devShells = {
default = pkgs.mkShell {
# Packages included in the environment
buildInputs = [ node ];
# Run when the shell is started up
shellHook = ''
echo "node `${node}/bin/node --version`"
'';
};
};
});
}