3 , buildFHSEnvBubblewrap
19 version = "3.8.6.50504";
21 platforms = ["x86_64-linux"];
22 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
23 license = licenses.unfree;
24 maintainers = with maintainers; [ hellwolf ];
25 homepage = "https://www.insynchq.com";
26 description = "Google Drive sync and backup with multiple account support";
28 Insync is a commercial application that syncs your Drive files to your
29 computer. It has more advanced features than Google's official client
30 such as multiple account support, Google Doc conversion, symlink support,
33 There is a 15-day free trial, and it is a paid application after that.
37 1) Currently the system try icon does not render correctly.
38 2) libqtvirtualkeyboardplugin does not have necessary Qt library shipped from vendor.
42 insync-pkg = stdenvNoCC.mkDerivation {
43 name = "${pname}-pkg-${version}";
47 # Find a binary from https://www.insynchq.com/downloads/linux#ubuntu.
48 url = "https://cdn.insynchq.com/builds/linux/insync_${version}-lunar_amd64.deb";
49 sha256 = "sha256-BxTFtQ1rAsOuhKnH5vsl3zkM7WOd+vjA4LKZGxl4jk0=";
61 nativeBuildInputs = [ autoPatchelfHook dpkg ];
64 dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner
74 rm $out/lib/insync/{libgcc_s.so.1,libstdc++.so.6}
76 # remove badly packaged plugins
77 rm $out/lib/insync/PySide2/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so
79 # remove the unused vendor wrapper
85 # NB! This did the trick, otherwise it segfaults! However I don't understand why!
89 in buildFHSEnvBubblewrap {
93 targetPkgs = pkgs: with pkgs; [
98 runScript = writeShellScript "insync-wrapper.sh" ''
99 # QT_STYLE_OVERRIDE was used to suppress a QT warning, it should have no actual effect for this binary.
100 echo Unsetting QT_STYLE_OVERRIDE=$QT_STYLE_OVERRIDE
101 echo Unsetting QT_QPA_PLATFORMTHEME=$QT_QPA_PLATFORMTHEME
102 unset QT_STYLE_OVERRIDE
103 unset QPA_PLATFORMTHEME
105 # xkb configuration needed: https://github.com/NixOS/nixpkgs/issues/236365
106 export XKB_CONFIG_ROOT=${xkeyboard_config}/share/X11/xkb/
107 echo XKB_CONFIG_ROOT=$XKB_CONFIG_ROOT
110 # export QT_DEBUG_PLUGINS=1
111 # find -L /usr/share -name "*insync*"
113 exec /usr/lib/insync/insync "$@"
116 # As intended by this bubble wrap, share as much namespaces as possible with user.
122 unshareCgroup = false;
123 # Since "insync start" command starts a daemon, this daemon should die with it.
124 dieWithParent = false;