NixOS / nixos-search

Search NixOS packages and options
https://search.nixos.org
MIT License
417 stars 103 forks source link

No stable links available for packages #540

Open IvarWithoutBones opened 2 years ago

IvarWithoutBones commented 2 years ago

I sometimes want to link to a package on the nixos-search page from a different repositories readme or a conversation, but the current URL scheme does not seem very reliable: https://search.nixos.org/packages?channel=unstable&show=discordchatexporter-cli&type=packages&query=discordchatexporter-cli.

It would be nice if we could use something like https://search.nixos.org/packages&show=discordchatexporter-cli, which could default to the stable channel. This makes our links look a lot more reliable, and less needlessly expressive.

ncfavier commented 1 year ago

Turns out https://search.nixos.org/packages?query=discordchatexporter-cli already works, does that answer your request?

ncfavier commented 1 year ago

I guess we could make query default to show if not provided...

ncfavier commented 1 year ago

https://github.com/NixOS/nixos-search/pull/561

ysndr commented 1 year ago

We should then also have a way to get the shorter permalink. currently when you open a search result you still need to trim down the query to make it legible

IvarWithoutBones commented 1 year ago

Turns out https://search.nixos.org/packages?query=discordchatexporter-cli already works, does that answer your request?

It does, thanks! The only thing that I think could be added to this to make the UX a bit smoother is a button to copy a short link, as suggested by @ysndr. Not sure if it'd be preferred to open a seperate issue for that, feel free to close this if you think so.