Change:
<ins> { stdenv , lib , fetchurl , makeWrapper , dpkg , glibc , glib , libxcb , libGL , nss , libthai , wayland , alsaLib , qtvirtualkeyboard , qtwebchannel , qtwebsockets , qtlocation , qtwebengine , autoPatchelfHook , wrapQtAppsHook }: stdenv.mkDerivation rec { pname = "insync"; version = "3.2.4.40856"; src = fetchurl { url = "http://s.insynchq.com/builds/${pname}_${version}-focal_amd64.deb"; sha256 = "1bvqbbrfn5784nmb2qaflm1rzczqhvghhb6y5zaxrapyhygxbcis"; }; postPatch = '' substituteInPlace usr/bin/insync --replace /usr/lib/insync $out/usr/lib/insync ''; buildInputs = [ alsaLib libGL libthai libxcb nss qtlocation qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets wayland ]; nativeBuildInputs = [ autoPatchelfHook dpkg makeWrapper wrapQtAppsHook ]; unpackPhase = '' dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner ''; installPhase = '' mkdir -p $out/bin $out/lib $out/share cp -R usr/* $out/ rm $out/lib/insync/libGLX.so.0 rm $out/lib/insync/libQt5* sed -i 's|/usr/lib/insync|/lib/insync|' "$out/bin/insync" wrapQtApp "$out/lib/insync/insync" ''; dontConfigure = true; dontBuild = true; meta = with lib; { platforms = ["x86_64-linux"]; license = licenses.unfree; maintainers = with maintainers; [ benley ]; homepage = "https://www.insynchq.com"; description = "Google Drive sync and backup with multiple account support"; longDescription = '' Insync is a commercial application that syncs your Drive files to your computer.  It has more advanced features than Google's official client such as multiple account support, Google Doc conversion, symlink support, and built in sharing. There is a 15-day free trial, and it is a paid application after that. ''; }; } </ins>

Discussion:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on github to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: <!-- The current version can be found easily with the same process than above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 1.5.7. desired version: 3.0.4. <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Insync-headless 3.x was released recently to replace the ancient insync-portable. I've already tried to package it here: But sadly, even though it says it's started, the CLI does not detect it as started. I've documented that in the repository and also notified the Insync devs here: If anyone of you guys know why it's not working that'd would be great. Otherwise we'll have to close this until we get from the insync devs or someone else figures out why it does not work.
I'm not sure about the headless version, but I've got a working derivation for the GUI version of insync 3.0 that I need to push to nixpkgs. Would that work for you?
Yes, that would be even better! :)
Will this new GUI version also work without GUI? I run insync both on GUI and headless machines
I think the GUI version requires a GUI, unfortunately. When I add it I'll make sure to keep the existing headless insync available since the GUI one is not a direct replacement.
Thanks to tinywrkb, that helped me in the insync forums, I could get the headless version to work. It seems that the binary will not work unless its located at /usr/bin/insync-headless.

Therefore, I had to put it in an FHS, and as soon as I did that, it started to work. What's currently missing in my repo is a NixOS module with a service, tough.
I am currently trying (and failing) to get the GUI version of insync working - would you be able to provide a link or pastebin to what you have? Mine is at:
oh yeah I will try to get what I have up in a PR this afternoon! Sorry I forgot all about this since starting a new job recently.
Haven't forgotten, just delayed - getting to this soon.
Here we go: That's what was running on my nixos laptop as of a few weeks ago, but I don't have a way of testing it properly at the moment. Hopefully the derivation still works :-)
Thanks for publishing this! Sadly, it doesn't work for me. Running and does nothing. It does not even output an error message. I also had a similar problem when packaging the headless variant and the only solution was to put it into FHS (because, as found out by a user in the insync forums, the insync binaries check their install location).
Hmmm okay. I'm away from my nixos systems for the next few days, but when I get back I'll try to figure out what went wrong. It was definitely working on my laptop as of a few weeks ago.
This is what I'm using these days - hope it helps someone: I remember I changed a few things but can't remember what!
Your derivation works for me, thanks :)
not! It starts only the first time, when isn't there. The second time, it doesn't start.. :(
you still have a working insync derivation?
This is what I have currently but I'm seeing the same issue as it seems - it isn't starting for me. I haven't actually used it for a while but I'll have a look later and submit a PR for it once I have it working again. This should really be merged anyway (once working of course!)