format and update

This commit is contained in:
Luc Perkins 2022-07-29 01:21:18 +02:00
parent c06ee195ac
commit e2b0b6b052
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
23 changed files with 122 additions and 42 deletions

1
kotlin/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

42
kotlin/flake.lock generated Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1659049902,
"narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

29
kotlin/flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "A Nix-flake-based Kotlin development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
kotlin = pkgs.kotlin;
buildTools = with pkgs; [ gradle ];
inherit (pkgs) mkShell;
in {
devShells = {
default = mkShell {
buildInputs = [ kotlin ] ++ buildTools;
shellHook = ''
${kotlin}/bin/kotlin -version
'';
};
};
});
}