Skip to content

Commit 436a459

Browse files
committed
chore: add nix development environment
Signed-off-by: suin <[email protected]>
1 parent 39e6c1d commit 436a459

File tree

2 files changed

+167
-0
lines changed

2 files changed

+167
-0
lines changed

flake.lock

Lines changed: 131 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
kclpkgs.url = "github:appthrust/kcl-nix/09645bef8b60aef2f32c17676fbafd7f64b0e5a3";
6+
};
7+
8+
outputs = { self, nixpkgs, flake-utils, kclpkgs }:
9+
flake-utils.lib.eachDefaultSystem (system:
10+
let
11+
pkgs = import nixpkgs {
12+
inherit system;
13+
};
14+
kcl = kclpkgs.default.${system};
15+
tools = with pkgs; [
16+
kcl.cli
17+
kcl.language-server
18+
] ++ (with pkgs-2405; [ ]);
19+
in
20+
{
21+
# Support for IDEs
22+
# `nix profile install` installs to ~/.nix-profile/bin, so you can use tools outside of /workspace.
23+
# This allows VS Code or JetBrains IDE processes to start outside of /workspace.
24+
defaultPackage = pkgs.symlinkJoin {
25+
name = "workspace-tools";
26+
paths = tools;
27+
};
28+
devShells.default = pkgs.mkShell {
29+
buildInputs = tools;
30+
shellHook = ''
31+
'';
32+
};
33+
formatter = pkgs.nixpkgs-fmt;
34+
}
35+
);
36+
}

0 commit comments

Comments
 (0)