Repository navigation
nixos/flatpak: pass system icons and fonts - #262462
Conversation
a340b18 to
0194ccc
Compare
There was a problem hiding this comment.
This will not handle symlinks pointing to trees of symlinks (e.g. when using font collections produced with buildEnv) but I am not sure how common that is.
I also wonder about performance with large font libraries. I thought about using nix-store --query --references but that will not work for the /run/current-system paths directly, since they are not in Nix store. It would also pull in all dependencies, not just those referenced by icons/fonts. But I guess we can just address it by having NixOS generate /run/current-system/sw/share/nix-flatpak/fonts.closure if/when someone notices a performance degradataion.
|
Thanks for the review! I applied the suggestions.
I think it does, because |
|
I'm running this locally, it seems to work fine, at least for fonts (I can see my system fonts in Inkscape without the bindfs workaround). |
Does the bindfs workaround have the same behavior? If no, what is the output of |
b0fec33 to
b333f26
Compare
andrevmatos
left a comment
There was a problem hiding this comment.
After some restarts (maybe cleaning up the old /usr bindfs mounts), and checking again, this patch seems to be working fine. I can see fonts everywhere, and proper cursors in most apps (but a few stubborn gtk ones, but would not make an issue for them). LGTM
|
will this fix the mouse cursor not being the adwaita theme in flatpak apps? |
Yes |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
since well this is still an open issue is passing themes as well out of the question |
I don't think flatpak tries to pass themes by default, just fonts and icons. I also don't know if nixpkgs would be willing to accept a patch to add a feature that doesn't exist on other distros like that? |
|
This is what I used to do on arch symlink th theme I want to use from /usr/share/.../themes it seems just installing the package isn't enough in nixos or home-manager since I have no idea where are the themes even stored Also so adding icon packs to .local/share/icons manually isn't gonna pass them ?? |
|
what is blocking this pr? |
alois31
left a comment
There was a problem hiding this comment.
I can confirm this fixes icons and fonts in Flatpak apps on my system. The changes also look sane to the extent I can say that without familiarity with glib code.
|
So this will get merged now ?? |
No, this has to be done by someone with commit rights. Please be more patient. |
|
@SuperSandro2000 could you please give a look at this PR? I've been running it for months with great success. |
SuperSandro2000
left a comment
There was a problem hiding this comment.
LGTM but I have no clue about the C code :/
|
@andrevmatos can you post just the bit when you overrided the module with this pr |
|
@beh-10257 my system is a flake using https://github.com/gytis-ivaskevicius/flake-utils-plus, and I use the |
|
@ofborg build flatpak |
|
Fonts fine but icons are still missing. Edit: Install icon system-wide solve issue. |
|
How to apply this patch in nixos 23.11? |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Fixes #119433
Description of changes
Add another patch to Flatpak that mounts the NixOS system font and icon directories into the sandbox if the standard FHS ones don't exist. The FHS paths are still checked so that the Flatpak build still works on non-NixOS systems. Since these directories contain symlinks into
/nix/store, the patch also walks the tree of symlinks to collect a list of/nix/storepaths to expose to the sandbox.Also, change the default for
fonts.fontDir.enablefromfalsetoservices.flatpak.enable.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)