Skip to content

Commit 6d045d8

Browse files
committed
Added nix flake
1 parent 17edf00 commit 6d045d8

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

flake.nix

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
description = "kotlin-atlassian-client - DEV-Environment";
3+
4+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
5+
6+
outputs =
7+
{ self, nixpkgs }:
8+
let
9+
javaVersion = 17;
10+
11+
supportedSystems = [
12+
"x86_64-linux"
13+
"aarch64-linux"
14+
"x86_64-darwin"
15+
"aarch64-darwin"
16+
];
17+
forEachSupportedSystem =
18+
f:
19+
nixpkgs.lib.genAttrs supportedSystems (
20+
system:
21+
f {
22+
pkgs = import nixpkgs {
23+
inherit system;
24+
overlays = [ self.overlays.default ];
25+
};
26+
}
27+
);
28+
in
29+
{
30+
overlays.default = final: prev: rec {
31+
jdk = prev."jdk${toString javaVersion}";
32+
maven = prev.maven.override { jdk_headless = jdk; };
33+
kotlin = prev.kotlin.override { jre = jdk; };
34+
};
35+
36+
devShells = forEachSupportedSystem (
37+
{ pkgs }:
38+
{
39+
default = pkgs.mkShell {
40+
41+
MAVEN_HOME = "${pkgs.maven}/maven";
42+
43+
packages = with pkgs; [
44+
gcc
45+
jdk
46+
kotlin
47+
maven
48+
patchelf
49+
zlib
50+
];
51+
};
52+
}
53+
);
54+
};
55+
}

0 commit comments

Comments
 (0)