Skip to content

Conversation

@getchoo
Copy link

@getchoo getchoo commented May 30, 2025

https://nix.dev/manual/nix/stable/protocols/tarball-fetcher.html

This allows Nix to always lock the underlying URL of an input that Rime is redirecting to, rather than the endpoint itself which may change

Previously this already happened with some forges that had it built-in (like Forgejo/Codeberg), but now it will be a standard across all providers, and hopefully lessen the reliance users have on a single instance of Rime

Example:

$ # Running on b84f6795d0dec05651a315a67f9e76c9b17861e10
$ nix flake metadata https://rime.getchoo.com/v1/github/prismlauncher/prismlauncher.tar.gz
Resolved URL:  https://rime.getchoo.com/v1/github/prismlauncher/prismlauncher.tar.gz
Locked URL:    https://rime.getchoo.com/v1/github/prismlauncher/prismlauncher.tar.gz?narHash=sha256-q8ln54nepwbJhC212vGODaafsbOCtdXar7F2NacKWO4%3D
Description:   A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
Path:          /nix/store/c18wx8pdwxlysjsf2mkspmja5gmv4w90-source
Last modified: 2025-04-07 12:15:28
Inputs:
├───libnbtplusplus: github:PrismLauncher/libnbtplusplus/23b955121b8217c1c348a9ed2483167a6f3ff4ad
│   Last modified: 2023-11-06 11:06:54
└───nixpkgs: github:NixOS/nixpkgs/2c8d3f48d33929642c1c12cd243df4cc7d2ce434
    Last modified: 2025-04-02 04:40:04

$ # Running on this PR!
$ nix flake metadata http://localhost:3000/v1/github/prismlauncher/prismlauncher.tar.gz
Resolved URL:  http://localhost:3000/v1/github/prismlauncher/prismlauncher.tar.gz
Locked URL:    https://github.com/prismlauncher/prismlauncher/archive/refs/tags/9.4.tar.gz?narHash=sha256-q8ln54nepwbJhC212vGODaafsbOCtdXar7F2NacKWO4%3D
Description:   A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
Path:          /nix/store/c18wx8pdwxlysjsf2mkspmja5gmv4w90-source
Last modified: 2025-04-07 12:15:28
Inputs:
├───libnbtplusplus: github:PrismLauncher/libnbtplusplus/23b955121b8217c1c348a9ed2483167a6f3ff4ad
│   Last modified: 2023-11-06 11:06:54
└───nixpkgs: github:NixOS/nixpkgs/2c8d3f48d33929642c1c12cd243df4cc7d2ce434
    Last modified: 2025-04-02 04:40:04

Immutable Link headers provided by forges will also still be respected, as Nix will always use the last header in the chain

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

Successfully merging this pull request may close these issues.

1 participant