Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftb fails with no url attribute set, and hashes are confusing. #10

Open
werner291 opened this issue Oct 15, 2023 · 1 comment
Open

Ftb fails with no url attribute set, and hashes are confusing. #10

werner291 opened this issue Oct 15, 2023 · 1 comment

Comments

@werner291
Copy link

werner291 commented Oct 15, 2023

Hi there,

This flake does not build:

{
  inputs.nix-minecraft.url = "github:12Boti/nix-minecraft";

  outputs =
    { self
    , nixpkgs
    , nix-minecraft
    }:
    {
      defaultPackage.x86_64-linux = nix-minecraft.lib.x86_64-linux.mkMinecraft {
        username = "USERNAME";
        gamedir = "./gamedir";
        minecraft.version = "1.16.5";
        
        modpack.ftb = {
          id = 91;
          version = 6495;
          hash = "sha256-cmnV8ZkV+FkXSkJcj2ML5iIjIiTP5OS6cwM50yooZks=";
        };
        
        forge.hash = "sha256-JNZwW63f02hIv5rJ8P8y2VISRjdnGCtpcxcUSFg3tww=";
      };
    };
}

If fails with:

error: fetchurl requires either urlorurls to be set (while evaluating the attribute 'urls' of the derivation 'AI-Improvements-1.16.5-0.5.0.jar')

Also, not setting the hashes manually causes a confusing error; it doesn't report the hash that should be used. (Btw, since you're using flakes, maybe that's a job for the flake.lock?)

Edit: the bit about the hashes is apparently a hard "no"; see NixOS/nix#4945 (Though the error message when not setting the hash is still confusing.)

@werner291
Copy link
Author

Oh, indeed, AI-improvements does not have a URL for some reason:

{
            "version": "0.4.0",
            "path": "./mods/",
            "url": "",
            "mirrors": [],
            "sha1": "e318a74de7ab982e6ed9a4a0051dd8bf05041b35",
            "size": 28376,
            "tags": [],
            "clientonly": false,
            "serveronly": false,
            "optional": false,
            "id": 303382,
            "name": "AI-Improvements-1.16.5-0.5.0.jar",
            "type": "mod",
            "updated": 1655035779,
            "curseforge": {
                "project": 233019,
                "file": 3798940
            }
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant