wh0 / nix-cache-view

in-browser .nar explorer
https://wh0.github.io/nix-cache-view/
MIT License
12 stars 1 forks source link

Un-hardcode my binary cache url #5

Closed wh0 closed 1 year ago

wh0 commented 2 years ago

https://github.com/wh0/nix-cache-view/blob/1a5bba2d55272506ff2f7c6af27cf0bf92d79474/drv.html#L65

Usually for links we can pass on the same cache base URL. But I store .drv files (and input srcs I guess) on a separate server from compiled packages.

Originally I didn't know it would be a problem, as I thought no one else has .drv files in a binary cache anyway. But it turns out cache.nixos.org has them up. And it would indeed be handy to be able to look up .drv files from there too. And have working links to the outputs that are also stored on cache.nixos.org.

I think what we can do is to have another URL parameter that saves the cache base URL to use when going to an output path.