-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (53 loc) · 1.78 KB
/
flake.nix
File metadata and controls
61 lines (53 loc) · 1.78 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "VS Code Haskell extension development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# flake-utils for cross-platform support
flake-utils.url = "github:numtide/flake-utils";
};
# Outputs define what our flake produces
outputs =
{
self,
nixpkgs,
flake-utils,
}:
# This function creates outputs for each system (x86_64-linux, aarch64-darwin, etc.)
flake-utils.lib.eachDefaultSystem (
system:
let
# Import nixpkgs for our specific system
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Development shell with Node.js and VS Code extension tools
devShells.default = pkgs.mkShell {
name = "vscode-haskell-dev";
packages = with pkgs; [
# Node.js runtime (LTS version)
nodejs_20
# Package managers
corepack # Enables yarn/npm/pnpm via packageManager field
# VS Code extension development
vscode # For testing extension
vsce # VS Code Extension CLI (publish/package)
# Additional tools
git
nixpkgs-fmt
];
shellHook = ''
echo "VS Code Haskell Extension Dev Environment"
echo "Node: $(node --version)"
echo "npm: $(npm --version 2>/dev/null || echo 'not active')"
echo ""
echo "Available commands:"
echo " npm install - Install dependencies"
echo " npm build - Build extension with webpack"
echo " npm run watch - Watch mode"
echo " vsce package - Create .vsix package"
echo " vsce publish - Publish to marketplace"
'';
};
}
);
}