From e2b0b6b052ecc1b7d5c96f128758e75b62c32425 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Fri, 29 Jul 2022 01:21:18 +0200 Subject: [PATCH] format and update --- README.md | 3 +++ dhall/flake.lock | 6 +++--- dhall/flake.nix | 2 +- elixir/flake.lock | 6 +++--- flake.nix | 5 +++++ gleam/flake.lock | 6 +++--- gleam/flake.nix | 2 +- go1.17/flake.lock | 6 +++--- go1.18/flake.lock | 6 +++--- java/flake.lock | 6 +++--- java/flake.nix | 6 +++--- kotlin/.envrc | 1 + kotlin/flake.lock | 42 ++++++++++++++++++++++++++++++++++++++++++ kotlin/flake.nix | 29 +++++++++++++++++++++++++++++ nix/flake.lock | 6 +++--- nix/flake.nix | 2 +- node/flake.lock | 6 +++--- node/flake.nix | 2 +- rust/flake.lock | 6 +++--- scala/flake.lock | 6 +++--- scala/flake.nix | 2 +- zig/flake.lock | 6 +++--- zig/flake.nix | 2 +- 23 files changed, 122 insertions(+), 42 deletions(-) create mode 100644 kotlin/.envrc create mode 100644 kotlin/flake.lock create mode 100644 kotlin/flake.nix diff --git a/README.md b/README.md index e0cff09..8e583a4 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ nix flake init --template github:the-nix-way/dev-templates#go_1_18 # Java nix flake init --template github:the-nix-way/dev-templates#java +# Kotlin +nix flake init --template github:the-nix-way/dev-templates#kotlin + # Nix nix flake init --template github:the-nix-way/dev-templates#nix diff --git a/dhall/flake.lock b/dhall/flake.lock index 871676c..d6b9406 100644 --- a/dhall/flake.lock +++ b/dhall/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/dhall/flake.nix b/dhall/flake.nix index bdaa08b..c6d2530 100644 --- a/dhall/flake.nix +++ b/dhall/flake.nix @@ -32,7 +32,7 @@ inherit (pkgs) mkShell; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ dhall ] ++ otherFormats; shellHook = '' diff --git a/elixir/flake.lock b/elixir/flake.lock index 871676c..d6b9406 100644 --- a/elixir/flake.lock +++ b/elixir/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6bd3379..e790048 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,11 @@ description = "Java development environment"; }; + kotlin = { + path = ./kotlin; + description = "Kotlin development environment"; + }; + nix = { path = ./nix; description = "Nix development environment"; diff --git a/gleam/flake.lock b/gleam/flake.lock index 871676c..d6b9406 100644 --- a/gleam/flake.lock +++ b/gleam/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/gleam/flake.nix b/gleam/flake.nix index dcf6d98..9794c36 100644 --- a/gleam/flake.nix +++ b/gleam/flake.nix @@ -15,7 +15,7 @@ inherit (pkgs) mkShell; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ gleamPkg ]; shellHook = '' diff --git a/go1.17/flake.lock b/go1.17/flake.lock index 871676c..d6b9406 100644 --- a/go1.17/flake.lock +++ b/go1.17/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/go1.18/flake.lock b/go1.18/flake.lock index 871676c..d6b9406 100644 --- a/go1.18/flake.lock +++ b/go1.18/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/java/flake.lock b/java/flake.lock index 871676c..d6b9406 100644 --- a/java/flake.lock +++ b/java/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/java/flake.nix b/java/flake.nix index 94bdc1b..fea142d 100644 --- a/java/flake.nix +++ b/java/flake.nix @@ -11,14 +11,14 @@ let pkgs = import nixpkgs { inherit system; }; - inherit (pkgs) mkShell; - java = pkgs.jdk17; buildTools = with pkgs; [ ant gradle maven ]; + + inherit (pkgs) mkShell; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ java ] ++ buildTools; shellHook = '' diff --git a/kotlin/.envrc b/kotlin/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/kotlin/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/kotlin/flake.lock b/kotlin/flake.lock new file mode 100644 index 0000000..d6b9406 --- /dev/null +++ b/kotlin/flake.lock @@ -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 +} diff --git a/kotlin/flake.nix b/kotlin/flake.nix new file mode 100644 index 0000000..6ed3c88 --- /dev/null +++ b/kotlin/flake.nix @@ -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 + ''; + }; + }; + }); +} diff --git a/nix/flake.lock b/nix/flake.lock index 871676c..d6b9406 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index 309d849..ec3a016 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -27,7 +27,7 @@ inherit (pkgs) mkShell; in { devShells = { - default = pkgs.mkShell { buildInputs = [ nix ] ++ nixRelatedTools; }; + default = mkShell { buildInputs = [ nix ] ++ nixRelatedTools; }; }; }); } diff --git a/node/flake.lock b/node/flake.lock index 871676c..d6b9406 100644 --- a/node/flake.lock +++ b/node/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/node/flake.nix b/node/flake.nix index 166c1b8..cb21980 100644 --- a/node/flake.nix +++ b/node/flake.nix @@ -18,7 +18,7 @@ yarn = pkgs.yarn; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ nodejs pnpm (yarn.override { inherit nodejs; }) ]; shellHook = '' diff --git a/rust/flake.lock b/rust/flake.lock index 652a69c..df7d7c7 100644 --- a/rust/flake.lock +++ b/rust/flake.lock @@ -32,11 +32,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/scala/flake.lock b/scala/flake.lock index 871676c..d6b9406 100644 --- a/scala/flake.lock +++ b/scala/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/scala/flake.nix b/scala/flake.nix index 23aa9f9..e5e0e10 100644 --- a/scala/flake.nix +++ b/scala/flake.nix @@ -28,7 +28,7 @@ buildTools = with pkgs; [ sbt ]; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ scala jdkPkg ] ++ buildTools; shellHook = '' diff --git a/zig/flake.lock b/zig/flake.lock index 871676c..d6b9406 100644 --- a/zig/flake.lock +++ b/zig/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1659047633, - "narHash": "sha256-zeI+NkJOa665fRrKGpjscfy3Hs4K316q1q7394xbRbw=", + "lastModified": 1659049902, + "narHash": "sha256-eFyEAnwY/9U+8W/6qam++osVH7ec3D7IXGBHKNk6p4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "496caa738a16d2bb3607243d9127df718bb50513", + "rev": "42ad817998d134577ee8788f4cc2c52f04c71f5b", "type": "github" }, "original": { diff --git a/zig/flake.nix b/zig/flake.nix index 7a0fa45..5175e57 100644 --- a/zig/flake.nix +++ b/zig/flake.nix @@ -15,7 +15,7 @@ inherit (pkgs) mkShell; in { devShells = { - default = pkgs.mkShell { + default = mkShell { buildInputs = [ zigPkg ]; shellHook = ''