-
-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathflake.nix
More file actions
35 lines (31 loc) · 1.03 KB
/
flake.nix
File metadata and controls
35 lines (31 loc) · 1.03 KB
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
{
description = "Usage analysis tool for Claude Code";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { nixpkgs, ... }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
# Package manager
pnpm_10
# Development tools
typos
typos-lsp
jq
git
gh
];
shellHook = ''
# Install dependencies only if node_modules/.pnpm/lock.yaml is older than pnpm-lock.yaml
if [ ! -f node_modules/.pnpm/lock.yaml ] || [ pnpm-lock.yaml -nt node_modules/.pnpm/lock.yaml ]; then
echo "📦 Installing dependencies..."
pnpm install --frozen-lockfile
fi
'';
};
});
};
}