-
Notifications
You must be signed in to change notification settings - Fork 43
/
flake.nix
39 lines (34 loc) · 1.01 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
{
description = "Inngest JS/TS SDK";
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 (system:
let
pkgs = import nixpkgs { inherit system; };
corepack = pkgs.stdenv.mkDerivation {
name = "corepack";
buildInputs = [ pkgs.nodejs_20 ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
corepack enable --install-directory=$out/bin
'';
};
in {
devShells.default = pkgs.mkShell {
packages = [ corepack ];
nativeBuildInputs = with pkgs; [
# Node
typescript
nodejs_20
# LSPs
nodePackages.typescript-language-server
nodePackages.vscode-json-languageserver
nodePackages.yaml-language-server
];
};
});
}