From 8320832fc7f8b9480f53908a00c7b905fc4caab4 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Mon, 17 Feb 2020 15:20:29 +0100 Subject: [PATCH] Describe and hack around the Seafile problem. --- shell-seafile.nix | 2 +- work-notes.org | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/shell-seafile.nix b/shell-seafile.nix index 2b9d6fe..358eeca 100644 --- a/shell-seafile.nix +++ b/shell-seafile.nix @@ -1,5 +1,5 @@ with import {}; stdenv.mkDerivation { name = "seafile"; - buildInputs = [ seafile-client ]; + buildInputs = [ seafile-shared ]; } diff --git a/work-notes.org b/work-notes.org index bccf2c2..ae5b139 100644 --- a/work-notes.org +++ b/work-notes.org @@ -21,6 +21,76 @@ 6. Run =nix-shell [[file:shell-seafile.nix][shell-seafile.nix]]= and, within it, =seafile-applet= to sync the changes to the server. +* Seafile problem <2020-02-17 Mon> +** Problem + After another update, Seafile started telling me this when I tried + to start it: + #+BEGIN_QUOTE + qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" + This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. + + Aborted (core dumped) + #+END_QUOTE + + I did a couple hours of searching, and found some threads, which did + not help: + + - https://github.com/NixOS/nixpkgs/issues/42893 + + Idea: imperatively install Seafile and then tell it where to + search for plugin: + #+BEGIN_SRC shell +nix-env -iA nixpkgs.qt5.qtbase +export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS + #+END_SRC + Tried this literally, got + #+BEGIN_QUOTE + error: attribute 'nixpkgs' in selection path 'nixpkgs.qt5.qtbase' not found + #+END_QUOTE + + - https://github.com/NixOS/nixpkgs/issues/65399 + + There is a new way to describe Qt packages which correctly handles + looking for plugins, this issue is there to help track all the + problems that this may lead to. There is [[https://hydra.nixos.org/build/96804884/download/1/nixpkgs/manual.html#sec-language-qt][some documentation]] as to + how to do it properly. I didn't feel like hacking Nixpkgs right + away. + + - https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/7 + + Tell Seafile where to look for plugins. This is not necessarily + even applicable with Nix. + + - https://github.com/haiwen/seafile/issues/6 + + Apparently, Seafile has a CLI interface, but I don't find it in + my installation. More concretely, the file =seafile-cli= appears + in shell completions, but it doesn't launch nor could I find + where it was. + +** My hack <2020-02-17 Mon> + My current hack consists in the following modifications: + + 1. Add =qt5.qtbase= and =seafile-client= to =home.packages= in + [[/home/scolobb/.config/nixpkgs/home.nix][=home.nix=]]. + + 2. Install =seafile-shared= instead of =seafile-client= in + [[file:shell-seafile.nix][=shell-seafile.nix=]]. + + Very weirdly, this makes =seafile-applet= work. I tried not doing + (1) and putting all the packages in [[file:shell-seafile.nix][=shell-seafile.nix=]], but it + won't work. Also, again weirdly, outside of Nix shell the + =seafile-applet= coming from the home-manager installation never + gets past the message + #+BEGIN_QUOTE + lang = English, translation = (null), locale.name() = en_US + #+END_QUOTE + without showing the interface or doing whatsoever. + +** Proper solution? + A proper solution would probably consist in updating the Seafile + package to comply with the new [[https://hydra.nixos.org/build/96804884/download/1/nixpkgs/manual.html#sec-language-qt][way to describe Qt packages]]. + * Removing the publish cache Org-publish will not detect files being deleted from the output. To force it to clear its caches, do the following: