Add Nix env for Java and C

This commit is contained in:
ctsk
2022-08-31 21:21:03 +02:00
commit 69a872fe2d
2 changed files with 69 additions and 0 deletions

27
flake.nix Normal file
View File

@@ -0,0 +1,27 @@
{
description = "Crafting Interpreters";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
gcc = pkgs.gcc;
openjdk = pkgs.openjdk;
in
{
devShell = pkgs.mkShell {
buildInputs = [
gcc
openjdk
];
};
}
);
}