commit dedcc13762320f165f111178c93f369796ed7dfd Author: Jan-Bulthuis Date: Sun May 18 03:55:41 2025 +0200 Initial test commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.packwizignore b/.packwizignore new file mode 100644 index 0000000..dfc6b43 --- /dev/null +++ b/.packwizignore @@ -0,0 +1,4 @@ +.direnv +.envrc +result +nix-modpack \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4439cab --- /dev/null +++ b/flake.lock @@ -0,0 +1,144 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-minecraft": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1747526922, + "narHash": "sha256-NmBP0W4RJ8NTkeaMKy/NNzMBIQDa8n161Igbu7zWM2E=", + "owner": "Jan-Bulthuis", + "repo": "nix-minecraft", + "rev": "566b5218ff51d80da60873fe3b5930b8da12091c", + "type": "github" + }, + "original": { + "owner": "Jan-Bulthuis", + "repo": "nix-minecraft", + "type": "github" + } + }, + "nix-modpack": { + "inputs": { + "nix-minecraft": "nix-minecraft", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "path": "./nix-modpack", + "type": "path" + }, + "original": { + "path": "./nix-modpack", + "type": "path" + }, + "parent": [] + }, + "nixpkgs": { + "locked": { + "lastModified": 1742889210, + "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "698214a32beb4f4c8e3942372c694f40848b360d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1747327360, + "narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1747327360, + "narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nix-modpack": "nix-modpack", + "nixpkgs": "nixpkgs_3" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..40e2e30 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Minecraft Modpack"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nix-modpack.url = "./nix-modpack"; + }; + + outputs = + inputs: + inputs.nix-modpack { + inherit inputs; + url = "https://git.bulthuis.dev/Jan/Modpack"; + }; +} diff --git a/index.toml b/index.toml new file mode 100644 index 0000000..74000da --- /dev/null +++ b/index.toml @@ -0,0 +1,24 @@ +hash-format = "sha256" + +[[files]] +file = "flake.lock" +hash = "e1c46cb3d49cbdd61b8771503c0a48835e1a012da29ee6597992e891b4539c5b" + +[[files]] +file = "flake.nix" +hash = "dc48bc9897ff3d48edcf6d171f05ee9667f7a4eacec22ecc0d8da83fb29ecdc2" + +[[files]] +file = "mods/ars-nouveau.pw.toml" +hash = "c620b91abf14510baca9164bdd1ab39b8f6390c080c7a8f67e66b7fa25b515b5" +metafile = true + +[[files]] +file = "mods/curios.pw.toml" +hash = "36debf7653e95a855b4fedacc19027cf2e01960fc0b6d55ef2ffbffbcb455690" +metafile = true + +[[files]] +file = "mods/geckolib.pw.toml" +hash = "548cf9b25748105c70af57d4f169f4f8ea9c47c1ec6ec9cae9cbe264bdf31754" +metafile = true diff --git a/mods/ars-nouveau.pw.toml b/mods/ars-nouveau.pw.toml new file mode 100644 index 0000000..43bfac2 --- /dev/null +++ b/mods/ars-nouveau.pw.toml @@ -0,0 +1,13 @@ +name = "Ars Nouveau" +filename = "ars_nouveau-1.21.1-5.8.3-all.jar" +side = "both" + +[download] +url = "https://cdn.modrinth.com/data/TKB6INcv/versions/3ZneDEV4/ars_nouveau-1.21.1-5.8.3-all.jar" +hash-format = "sha512" +hash = "ddce86117c4dba0790ecd70be28f414cfae6f42938fd883edb4c269e673309a8a1b40c2e0e23d4d7a0d97999d105adaf224aaaf4d9f8e528339ad1887cefd846" + +[update] +[update.modrinth] +mod-id = "TKB6INcv" +version = "3ZneDEV4" diff --git a/mods/curios.pw.toml b/mods/curios.pw.toml new file mode 100644 index 0000000..5e5f3a9 --- /dev/null +++ b/mods/curios.pw.toml @@ -0,0 +1,13 @@ +name = "Curios API" +filename = "curios-neoforge-9.5.1+1.21.1.jar" +side = "both" + +[download] +url = "https://cdn.modrinth.com/data/vvuO3ImH/versions/yohfFbgD/curios-neoforge-9.5.1%2B1.21.1.jar" +hash-format = "sha512" +hash = "5981a267686b744e7e3c227f78cbcd5267c14ac6979a28e814695f4589273998563147207fef4a5cdb7cdbdc39797cd95d9e4abadb55869f18e02a38d0654ae5" + +[update] +[update.modrinth] +mod-id = "vvuO3ImH" +version = "yohfFbgD" diff --git a/mods/geckolib.pw.toml b/mods/geckolib.pw.toml new file mode 100644 index 0000000..7d8f87d --- /dev/null +++ b/mods/geckolib.pw.toml @@ -0,0 +1,13 @@ +name = "Geckolib" +filename = "geckolib-neoforge-1.21.1-4.7.5.1.jar" +side = "both" + +[download] +url = "https://cdn.modrinth.com/data/8BmcQJ2H/versions/QEqpUJ1G/geckolib-neoforge-1.21.1-4.7.5.1.jar" +hash-format = "sha512" +hash = "0cb7c45ce6aaf8b04e6490db20b0187d2e8cb622fb72ea15fee7476f2600e96ef7cbdef4c96a620dc30f818698605d3969b5145a6c317456befb9862154b6c6f" + +[update] +[update.modrinth] +mod-id = "8BmcQJ2H" +version = "QEqpUJ1G" diff --git a/nix-modpack/flake.nix b/nix-modpack/flake.nix new file mode 100644 index 0000000..639aa15 --- /dev/null +++ b/nix-modpack/flake.nix @@ -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; + }; +} diff --git a/nix-modpack/lib/default.nix b/nix-modpack/lib/default.nix new file mode 100644 index 0000000..9196f05 --- /dev/null +++ b/nix-modpack/lib/default.nix @@ -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 diff --git a/pack.toml b/pack.toml new file mode 100644 index 0000000..3ce1dba --- /dev/null +++ b/pack.toml @@ -0,0 +1,13 @@ +name = "Modpack" +author = "Jan Bulthuis" +version = "1.0.0" +pack-format = "packwiz:1.1.0" + +[index] +file = "index.toml" +hash-format = "sha256" +hash = "3cb74ac6e3a0106ec14ed43f4b6f64c4dbc95688c7824f884745699bd54a5a07" + +[versions] +minecraft = "1.21.1" +neoforge = "21.1.172" diff --git a/result b/result new file mode 120000 index 0000000..a09b9bb --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/7kz7ab64z7nf5mpdv3d21ncq0ndg5v0x-modpack-1.0.0 \ No newline at end of file