forked from clojure-lsp/clojure-lsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (61 loc) · 2.03 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
description = "Clojure LSP flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
clj-nix = {
url = "github:jlesquembre/clj-nix?ref=0.2.0";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, clj-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
cljpkgs = clj-nix.packages."${system}";
in
{
packages = rec {
default = clojure-lsp;
clojure-lsp-jdk = cljpkgs.mkCljBin {
projectSrc = ./.;
name = "com.github.clojure-lsp/clojure-lsp";
main-ns = "clojure-lsp.main";
jdkRunner = pkgs.jdk17_headless;
buildCommand =
''
mkdir -p target
make cli-prod-jar
cp clojure-lsp-standalone.jar target
'';
maven-extra = [{
content =
''
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<versioning>
<latest>2.9.0</latest>
<release>2.9.0</release>
<versions>
<version>2.8.9</version>
<version>2.9.0</version>
</versions>
<lastUpdated>19700101000000</lastUpdated>
</versioning>
</metadata>
'';
path = "com/google/code/gson/gson/maven-metadata-central.xml";
}];
};
clojure-lsp = cljpkgs.mkGraalBin {
cljDrv = self.packages."${system}".clojure-lsp-jdk;
};
};
}) // {
overlays.default = (final: prev: {
clojure-lsp = self.packages.${final.system}.default;
});
};
}