-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathflake.nix
43 lines (37 loc) · 1.09 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
{
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_22 ];
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_22
# LSPs
nodePackages.typescript-language-server
nodePackages.vscode-json-languageserver
nodePackages.yaml-language-server
];
shellHook = ''
export COREPACK_ENABLE_AUTO_PIN=0
'';
};
});
}