diff --git a/praktikum-5/flake.lock b/praktikum-5/flake.lock new file mode 100644 index 0000000..f82f111 --- /dev/null +++ b/praktikum-5/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1762980239, + "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1762844143, + "narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/praktikum-5/flake.nix b/praktikum-5/flake.nix new file mode 100644 index 0000000..89d2878 --- /dev/null +++ b/praktikum-5/flake.nix @@ -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 = { + }; + }; +} diff --git a/praktikum-5/shell.nix b/praktikum-5/shell.nix deleted file mode 100644 index 0f505db..0000000 --- a/praktikum-5/shell.nix +++ /dev/null @@ -1,13 +0,0 @@ -with import {}; - mkShell { - packages = [ - openjdk - ant - astyle - jdt-language-server - ]; - - shellHook = '' - echo "Usage Example: ant run -Dmain-class=aufgabe3.Server" - ''; - }