-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
38 lines (35 loc) · 950 Bytes
/
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
{
description = "Dev environment for strato-db";
inputs = {
# Make sure to use the same locked commits as the nix-infra deploys
# That way the packages are shared
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }:
let
b = builtins;
# Make sure that this include runtime libs linked by npm builds
deps = pkgs: with pkgs; [
bashInteractive
sqlite-interactive
# NodeJS
nodejs_22
corepack_22
];
makeDevShell = system: pkgs: {
default = pkgs.mkShell {
nativeBuildInputs = (deps pkgs) ++ (with pkgs; [
gitMinimal
# sqlite3 module
sqlite-interactive.dev
]);
shellHook = ''
export PATH=$PWD/node_modules/.bin:$PATH
'';
};
};
in
{
devShells = b.mapAttrs (makeDevShell) nixpkgs.legacyPackages;
};
}