aoc2022/flake.nix

31 lines
689 B
Nix
Raw Normal View History

2022-12-02 16:48:27 +01:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
millWithFixedJdk = pkgs.mill.override { jre = pkgs.jdk; };
in
{
devShell = pkgs.mkShell {
buildInputs = [ millWithFixedJdk ];
shellHook = ''
set -a
JAVA_HOME=${pkgs.jdk}
set +a
'';
};
}
);
}