More JDK specificity

This commit is contained in:
Luc Perkins 2022-07-29 01:34:22 +02:00
parent e2b0b6b052
commit aa143490b1
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
14 changed files with 56 additions and 41 deletions

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -9,12 +9,17 @@
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
jdk = "jdk17";
java = pkgs.jdk17;
config = {
packageOverrides = p: {
gradle = (p.gradle.override { java = p.${jdk}; });
};
};
pkgs = import nixpkgs { inherit config jdk system; };
java = pkgs.${jdk};
buildTools = with pkgs; [ ant gradle maven ];
inherit (pkgs) mkShell;
in {
devShells = {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -9,16 +9,26 @@
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
jdk = "jdk17";
config = {
packageOverrides = p: {
gradle = (p.gradle.override { java = p.${jdk}; });
kotlin = (p.kotlin.override { jre = p.${jdk}; });
};
};
pkgs = import nixpkgs { inherit config system; };
kotlin = pkgs.kotlin;
buildTools = with pkgs; [ gradle ];
otherTools = with pkgs; [ gcc ncurses patchelf zlib ];
inherit (pkgs) mkShell;
in {
devShells = {
default = mkShell {
buildInputs = [ kotlin ] ++ buildTools;
buildInputs = [ kotlin ] ++ buildTools ++ otherTools;
shellHook = ''
${kotlin}/bin/kotlin -version

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -32,11 +32,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"lastModified": 1659050511,
"narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github"
},
"original": {