-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathflake.nix
45 lines (40 loc) · 1.05 KB
/
flake.nix
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
description = "Hasura docs development dependencies";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (localSystem:
let
pkgs = import nixpkgs
{
system = localSystem;
overlays = [ ];
};
nodejs-corepack = pkgs.stdenv.mkDerivation {
name = "nodejs-corepack";
buildInputs = [
pkgs.nodejs
];
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin
corepack enable --install-directory $out/bin
'';
};
in
{
packages.${localSystem}.default = self.packages.${localSystem}.nodejs;
devShells = {
default = pkgs.mkShell {
nativeBuildInputs = [
# Development
pkgs.nodejs
nodejs-corepack
];
};
};
}
);
}