feat: add nix flake (#631)

This commit is contained in:
Ryan Brink
2024-08-15 04:10:05 -04:00
committed by GitHub
parent 01c4e0558d
commit ee56c8023e
5 changed files with 121 additions and 0 deletions

29
flake.nix Normal file
View File

@ -0,0 +1,29 @@
{
description = "Minimal example of building Kotlin with Gradle and Nix";
inputs = {nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";};
inputs.systems.url = "github:nix-systems/default";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-utils.inputs.systems.follows = "systems";
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
updateLocks = pkgs.callPackage ./update-locks.nix {};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
gradle_8
temurin-bin-21
updateLocks
ktlint
];
};
});
}