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

Add new meta-attributes to stdenv to permit URLs for screenshots #101417

Closed
wants to merge 5 commits into from
Closed

Add new meta-attributes to stdenv to permit URLs for screenshots #101417

wants to merge 5 commits into from

Conversation

StefanSchroeder
Copy link
Contributor

Motivation for this change

If a meta-attribute for a Screenshot-URL were added to the package description, the search result could include a screenshot of the application in the result. There is no need to create new screenshots as http://screenshots.debian.net/ provides a public repository of screenshots already that could be reused.

I am aware that adding screenshots to the existing thousands of packages would be a major undertaking, but I think it would be a nice user experience enhancement and - of course - optional, since screenshots only make sense for graphical applications.

When the Screenshot-URL is provided for a package, the search result could fetch the image and show it alongside the package description.

The font packages could show a sample of the font instead.

Things done

Two paragraphs were added to the Nixpks-manual, section Stdenv -> Meta-attributes to explain the two new
attributes ScreenshotThumb and ScreenshotLarge.

In the package games/pingus the two attributes were added as an example.

The Nixpkgs-manual was rebuild to check correctness.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@garbas

Discussed in NixOS/nixos-search#211

@jtojnar
Copy link
Contributor

jtojnar commented Oct 23, 2020

An alternative approach would be relying on the appstream data (#15932), cc @matthewbauer.

@SuperSandro2000
Copy link
Member

Please squash the commits together.

@StefanSchroeder
Copy link
Contributor Author

I can't take it from here. The other (#15932) issue is quite complex, involves many aspects. I cannot even identify all the different parts that are involved.
Only one thing is for sure: information in the stdenv and the associated appstream data (if available) must be synchronized.
Ideally, one should "rule" over the other to have one authoritative source of truth.

@garbas
Copy link
Member

garbas commented Dec 2, 2020

@matthewbauer is there any timeline on #15932? That RFC is quite old, but I can see it is still in your radar. We could serve AppStream XML via search if you want.

Would you be ok if @StefanSchroeder continues with this new meta-attributes? I'm assuming that we will be doing some merging of some sort when producing this XML.

@stale
Copy link

stale bot commented Jul 20, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 20, 2021
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/brainstorming-generating-appstream-metadata/19273/1

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label May 22, 2022
@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 8, 2023
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 12, 2023
@Artturin Artturin closed this Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants