NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.53k stars 13.71k forks source link

Plasma 6 packages do not handle webp or avif image formats #304523

Open chermnyx opened 5 months ago

chermnyx commented 5 months ago

Describe the bug

Multiple Plasma 6 packages cannot use webp or avif images

So far I've found the following problems:

Probably there are other packages affected by the same issue

The problem is similar to https://github.com/NixOS/nixpkgs/issues/292375

Expected behavior

Plasma 6 apps should handle supported image formats other than .jpg and .png

Screenshots

image

Notify maintainers

@k900

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.4-zen1, NixOS, 24.05 (Uakari), 24.05.20240412.cfd6b5f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/yy5l09gfsagkv8rswblknmsjc2gyr20d-source`

nixpkgs from flakes.lock:

"nixpkgs": {
  "locked": {
    "lastModified": 1712963716,
    "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
    "owner": "nixos",
    "repo": "nixpkgs",
    "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
    "type": "github"
  },
  "original": {
    "owner": "nixos",
    "ref": "nixos-unstable",
    "repo": "nixpkgs",
    "type": "github"
  }
},

Add a :+1: reaction to issues you find important.

lboklin commented 5 months ago

Same problem with Krita plugins, in particular the krita-ai-diffusion plugin. Krita is a Qt5 package and the plugin in question is a Python script.

K900 commented 5 months ago

You probably want to install qtimageformats globally, I'm not sure adding it to every single place where it could potentially be used is worth it.

lboklin commented 5 months ago

You probably want to install qtimageformats globally, I'm not sure adding it to every single place where it could potentially be used is worth it.

But that wouldn't solve its absence from Krita's python environment, surely?

K900 commented 5 months ago

It should, since it's just a Qt plugin.

lboklin commented 5 months ago

Well, that's dirty. Packages should state their dependencies, so I would disagree with

I'm not sure adding it to every single place where it could potentially be used is worth it.

K900 commented 5 months ago

If that Krita plugin can't work without it, then we need to think about how to propagate that dependency to Krita if the plugin is used. For Dolphin and such, we can't really expect to add every single image format to every single program that may want to display it.

lboklin commented 5 months ago

I agree that it would be better for scripts to be packaged and their dependencies propagated, but Qt applications that are heavily centred around image handling and support custom scripts I think should be packaged with a reasonable set of libraries available at runtime. Common image formats such as webp are likely to appear in custom scripts, so unless there are plans to package python script plugins (and not just binary plugins), a generous python environment would provide a better UX.

chermnyx commented 5 months ago

You probably want to install qtimageformats globally, I'm not sure adding it to every single place where it could potentially be used is worth it.

Maybe it should be installed automatically when services.desktopManager.plasma6.enable is true? Installing the plugin globally resolves the problem, but the default behavior might be confusing

K900 commented 5 months ago

We could do that, yeah. Do you want to submit a PR?

danwdart commented 5 months ago

This also appears in gwenview not showing heif files despite it supposedly being compiled with qtimageformats - does qtimageformats have to be compiled differently?

toast003 commented 4 months ago

Also an issue for the media player applet when playing youtube videos, since the thumbnails are webp images