-
Notifications
You must be signed in to change notification settings - Fork 25
/
flake.nix
40 lines (38 loc) · 1.1 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
{
description = "The Sourcegraph Jetbrains Client developer environment Nix Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
libraries = pkgs.lib.makeLibraryPath (with pkgs; with xorg; [
libXtst
libXext
libX11
libXrender
libXi
freetype
fontconfig.lib
zlib
libsecret
]);
gradle-wrapped = pkgs.writeShellScriptBin "gradle" ''
export LD_LIBRARY_PATH=${libraries}
exec ${pkgs.gradle.override {
javaToolchains = [ "${pkgs.jdk8}/lib/openjdk" "${pkgs.jdk11}/lib/openjdk" "${pkgs.jdk17}/lib/openjdk" ];
}}/bin/gradle "$@"
'';
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gradle-wrapped
nodejs_20
nodejs_20.pkgs.pnpm
nodejs_20.pkgs.typescript
];
};
});
}