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

wants to merge 5 commits into
base: master
Choose a base branch

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

wants to merge 5 commits into from


Copy link

@StefanSchroeder StefanSchroeder commented Oct 22, 2020

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 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


Discussed in NixOS/nixos-search#211

Copy link

@jtojnar jtojnar commented Oct 23, 2020

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

Copy link

@SuperSandro2000 SuperSandro2000 commented Nov 27, 2020

Please squash the commits together.

Copy link
Contributor Author

@StefanSchroeder StefanSchroeder commented Nov 28, 2020

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.

Copy link

@garbas 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.

Copy link

@stale stale bot commented Jul 20, 2021

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

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

Successfully merging this pull request may close these issues.

None yet

4 participants