rfd
rfd copied to clipboard
a list of system dependencies
I built my iced app on nixos, however when trying to create a rfd window. Some of the gtk3 dependencies are missing because I get this error
GLib-GIO-ERROR **: 15:05:49.211: No GSettings schemas are installed on the system
--
Trace/breakpoint trap (core dumped)
a full list would be nice
For others experiencing this issue, here's a flake.nix file that appears to fix this issue on my end:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [ cmake pkg-config wrapGAppsHook ];
buildInputs = with pkgs; [
xorg.libX11
xorg.libXrandr
xorg.libXcursor
xorg.libXi
libxkbcommon
libGL
fontconfig
wayland
gdk-pixbuf
cairo
pango
atk
gtk3
gsettings-desktop-schemas
];
LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
shellHook = ''
export XDG_DATA_DIRS=${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
'';
};
});
}
https://docs.rs/rfd/latest/rfd/#gtk-backend
Is this not up to date?
@PolyMeilex I definitely don't understand much about the problem, but in doing some digging it looks like the way NixOS operates when it comes to gsettings schemas requires a bit of extra care in the environment variables:
https://discourse.nixos.org/t/custom-gsettings-schema-being-ignored-in-xdg-data-dirs/3449
The flake.nix file I shared was cobbled together after playing around with various cargo builds. When I bumped into @Redhawk18's specific problem then I added the shell hook portion at the bottom.