Skip to content

Instantly share code, notes, and snippets.

@krupkat
Last active July 27, 2023 11:01
Show Gist options
  • Save krupkat/cd0adbd584e2bfe154accdb393076fc3 to your computer and use it in GitHub Desktop.
Save krupkat/cd0adbd584e2bfe154accdb393076fc3 to your computer and use it in GitHub Desktop.
[Xpano on NixOS] #nix #flatpak

Install from nixpkgs

https://search.nixos.org/packages?channel=unstable&show=xpano

Running a self built binary

When crashing with this error:

(Xpano:7068): GLib-GIO-ERROR **: 16:40:35.251: No GSettings schemas are installed on the system

Workaround 1) (from here):

mkdir -p ~/.local/share/glib-2.0/schemas
cp -pi /nix/store/...-gtk+3-3.<LATEST>/share/gsettings-schemas/gtk+3-3.*/glib-2.0/schemas/gschemas.compiled ~/.local/share/glib-2.0/schemas/

Workaround 2) add this to home-manager:

xdg = {
    enable = true;
    systemDirs.data = [
      "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
      "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
    ];
};

Running from Flatpak

Possible errors:

  1. App crashes when there is a mouse cursor event (e.g. when moving the mouse on the edge of a resizable panel)
  2. Small mouse cursor when using display scaling

Solution (discourse, NixOSWiki):

ln -s /run/current-system/sw/share/icons ~/.local/share/icons

Add the following dirs to the filesystem permissions with Flatseal:

~/.local/share/icons:ro
/nix/store:ro
{
"breadcrumbs.enabled": false,
"cmake.configureOnOpen": true,
"cmake.statusbar.visibility": "compact",
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.configureArgs": [
"-Dexiv2_DIR:PATH=${workspaceFolder}/exiv2/install/lib64/cmake/exiv2",
"-DCMAKE_INSTALL_PREFIX:PATH=install",
"-DBUILD_TESTING:BOOL=ON",
"-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON"
],
"cmake.generator": "Ninja",
"clangd.arguments": [
"--background-index",
"--clang-tidy",
"--compile-commands-dir=build"
]
}
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/8df7a67abaf8aefc8a2839e0b48f92fdcf69a38b.tar.gz") {} }:
pkgs.mkShell {
buildInputs = (with pkgs; [
git
cmake
pkg-config
ninja
clang-tools_16
gcc13
]) ++ (with pkgs; [
opencv
SDL2
gtk3
catch2_3
spdlog
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment