Skip to content

Commit c193939

Browse files
committed
chore: add nix flake config
1 parent bc3aaa9 commit c193939

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

flake.lock

Lines changed: 61 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: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
description = "Editor Code Assistant (ECA) - AI pair programming capabilities agnostic of editor ";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, flake-utils }:
10+
flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
jdk = pkgs.jdk24_headless;
14+
graalvm = pkgs.graalvmPackages.graalvm-ce;
15+
clojure = pkgs.clojure.override { jdk = pkgs.jdk_headless; };
16+
17+
in
18+
{
19+
devShells.default = pkgs.mkShell {
20+
packages = with pkgs; [
21+
jdk
22+
clojure
23+
clojure-lsp
24+
babashka
25+
graalvm
26+
git
27+
];
28+
29+
env = {
30+
JAVA_HOME = "${jdk}";
31+
GRAALVM_HOME = "${graalvm}";
32+
33+
};
34+
35+
};
36+
37+
packages.default = pkgs.stdenv.mkDerivation {
38+
pname = "eca";
39+
version = "0.1.0";
40+
src = ./.;
41+
42+
nativeBuildInputs = with pkgs; [
43+
jdk
44+
clojure
45+
babashka
46+
graalvm
47+
git
48+
];
49+
50+
CLJ_CONFIG = "${placeholder "out"}/.clojure";
51+
CLJ_CACHE = "${placeholder "out"}/.cpcache";
52+
53+
configurePhase = ''
54+
mkdir -p $CLJ_CONFIG $CLJ_CACHE
55+
'';
56+
57+
buildPhase = ''
58+
bb native-cli
59+
'';
60+
61+
installPhase = ''
62+
cp eca $out/bin/
63+
'';
64+
};
65+
}
66+
);
67+
}

0 commit comments

Comments
 (0)