use flake isntead of shell.nix

This commit is contained in:
2025-11-12 22:52:56 +01:00
parent 179f16d993
commit b17a5fa1dd
3 changed files with 99 additions and 13 deletions

38
praktikum-5/flake.nix Normal file
View File

@@ -0,0 +1,38 @@
{
description = "Rechnerstrukturen Praktikum 5";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [];
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}:
with pkgs.lib; {
devShells.default = with pkgs;
mkShell {
packages = [
openjdk
ant
];
shellHook = ''
echo "Usage Example:"
echo "ant run -Dmain-class=aufgabe3.Server"
'';
};
};
flake = {
};
};
}