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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1659049902, "lastModified": 1659050511,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "narHash": "sha256-JqDvJv3kiVMvwfA2NVbzmB/dx+LxJWhTXUCi5morzD4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "rev": "57b2048cc8c34f9a2e3a2edc196e9a98efc3862f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -9,12 +9,17 @@
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let 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 ]; buildTools = with pkgs; [ ant gradle maven ];
inherit (pkgs) mkShell; inherit (pkgs) mkShell;
in { in {
devShells = { devShells = {

View file

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

View file

@ -9,16 +9,26 @@
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let 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; kotlin = pkgs.kotlin;
buildTools = with pkgs; [ gradle ]; buildTools = with pkgs; [ gradle ];
otherTools = with pkgs; [ gcc ncurses patchelf zlib ];
inherit (pkgs) mkShell; inherit (pkgs) mkShell;
in { in {
devShells = { devShells = {
default = mkShell { default = mkShell {
buildInputs = [ kotlin ] ++ buildTools; buildInputs = [ kotlin ] ++ buildTools ++ otherTools;
shellHook = '' shellHook = ''
${kotlin}/bin/kotlin -version ${kotlin}/bin/kotlin -version

View file

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

View file

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

View file

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

View file

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

View file

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