File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Install nix-direnv which provides significantly faster Nix integration
2+ if ! has nix_direnv_version || ! nix_direnv_version 3.1.0; then
3+ source_url " https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.0/direnvrc" " sha256-yMJ2OVMzrFaDPn7q8nCBZFRYpL/f0RcHzhmw/i6btJM="
4+ fi
5+
6+ # Apply the devShell configured in flake.nix
7+ use flake
8+
9+ # this line sources your `.envrc.local` file
10+ source_env_if_exists .envrc.local
Original file line number Diff line number Diff line change 11node_modules
22dist
3+ .direnv /
Original file line number Diff line number Diff line change 1+ {
2+ description = "ndc-nodejs-lambda development dependencies" ;
3+
4+ inputs = {
5+ nixpkgs . url = "github:nixos/nixpkgs/nixpkgs-unstable" ;
6+ systems . url = "github:nix-systems/default" ;
7+ } ;
8+
9+ outputs =
10+ {
11+ self ,
12+ nixpkgs ,
13+ systems ,
14+ } :
15+ let
16+ # Our default package set is configured to build for the same platform the flake is evaluated
17+ # on. So we leave `crossSystem` set to the default, which is `crossSystem = localSystem`. With
18+ # this package set if we're building on Linux we get Linux binaries, if we're building on Mac
19+ # we get Mac binaries, etc.
20+ mkPkgs =
21+ localSystem :
22+ import nixpkgs {
23+ system = localSystem ;
24+ } ;
25+
26+ # Helper to define system-specific flake outputs.
27+ perSystem =
28+ callback :
29+ nixpkgs . lib . genAttrs ( import systems ) (
30+ system :
31+ callback {
32+ inherit system ;
33+ pkgs = mkPkgs system ;
34+ }
35+ ) ;
36+ in
37+ {
38+ devShells = perSystem (
39+ { pkgs , system } :
40+ {
41+ default = pkgs . mkShell {
42+ packages = [
43+ pkgs . nixfmt
44+ pkgs . nodejs_20
45+ ] ;
46+ } ;
47+ }
48+ ) ;
49+ } ;
50+ }
You can’t perform that action at this time.
0 commit comments