Initial test commit

This commit is contained in:
Jan-Bulthuis committed 2025-05-18 03:55:41 +02:00
commit dedcc13762
12 files changed
+291

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
{
description = "Create nix derivations from a packwiz modpack";
inputs = {
nix-minecraft.url = "github:Jan-Bulthuis/nix-minecraft";
};
outputs =
{ nix-minecraft, ... }:
let
lib = import ./lib {
inherit nix-minecraft;
};
in
{
__functor = _: lib;
};
}
+33
View File
@@ -0,0 +1,33 @@
{ nix-minecraft, ... }:
let
mkModpack =
{ inputs }:
let
nixpkgs = inputs.nixpkgs;
lib = nixpkgs.lib;
eachSystem =
fn: lib.genAttrs lib.systems.flakeExposed (system: fn (import nixpkgs { inherit system; }));
mkPackages = pkgs: {
modpack = nix-minecraft.legacyPackages.${pkgs.system}.fetchPackwizModpack {
url = inputs.self;
};
};
overlay = final: prev: mkPackages prev;
in
{
inherit overlay;
packages = eachSystem mkPackages;
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
packwiz
];
};
});
};
in
mkModpack