Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maestral: init at 0.2.6 #66420

Merged
merged 1 commit into from Aug 14, 2019
Merged

maestral: init at 0.2.6 #66420

merged 1 commit into from Aug 14, 2019

Conversation

peterhoeg
Copy link
Member

Motivation for this change

Open Source dropbox client - works great!

Cc: @ttuegel

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @


postInstall = ''
makeWrapper $out/bin/maestral $out/bin/maestral-gui \
--add-flags gui
Copy link
Contributor

@alexarice alexarice Aug 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this only be added when withGui is true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can reproduce @alexarice's failure with nix-shell --pure. The failure is due to using makeWrapper here; it should be makeQtWrapper or makeWrapper ... ${qtWrapperArgs[@]}.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn those impurities.... Thanks @ttuegel. Fixed.

meta = with lib; {
description = "Open-source Dropbox client for macOS and Linux";
license = licenses.mit;
maintainer = with maintainers; [ peterhoeg ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be maintainers instead of maintainer

@peterhoeg
Copy link
Member Author

Thanks @alexarice, all sorted.

@alexarice
Copy link
Contributor

I get this error when using nix-review:

[nix-shell:~/.cache/nix-review/pr-66420-1/results]$ maestral-gui
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.

/nix/store/41qamhdbv4nl96qhzmrvjniswn8wh6j2-maestral-0.2.6/bin/maestral-gui: line 6: 15688 Aborted                 maestral gui

any ideas?

@peterhoeg
Copy link
Member Author

Yep, it's due to a missing wrapQtAppsHook - https://nixos.wiki/wiki/Qt

It actually works if you install it in your environment but now your can also just execute it directly.

@@ -0,0 +1,38 @@
{ lib, python3Packages, fetchFromGitHub, wrapQtAppsHook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be wrapQtAppsHook ? null so that maestral (no gui) can build and ofBorg will stop complaining

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think doing this prevents the argument from being substituted automatically by callPackage. Could you add an assert withGui => !(wrapQtAppsHook == null)? The error that @alexarice has below would be symptomatic of this failure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may be true but also did not solve the problem I'm having

@alexarice
Copy link
Contributor

Unfortunately I get the same error

@peterhoeg
Copy link
Member Author

That's weird. If I do this, everything works:

nix-build -A maestral -A maestral-gui $(pwd) && result-2/bin/maestral-gui

@alexarice
Copy link
Contributor

I'll try it without nix-review

@alexarice
Copy link
Contributor

@peterhoeg
Copy link
Member Author

Try this:

nix-env -i ./result-2

And then just run maestral-gui.

@alexarice
Copy link
Contributor

~/nixpkgs-review   maestral  nix-env -i ./result-2                                                                                                                            ~/nixpkgs-review
installing 'maestral-gui-0.2.6'
building '/nix/store/1q89y90wyvvgk1w9wb4z27warfd0n3d1-user-environment.drv'...
created 1524 symlinks in user environment
 ~/nixpkgs-review   maestral  maestral-gui                                                                                                                                         ~/nixpkgs-review
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.

[1]    22213 abort      maestral-gui

same error

@alexarice
Copy link
Contributor

xcb seems to be an X library, could the problem be due to me running wayland?

@peterhoeg
Copy link
Member Author

What happens if you run it this way then:

QT_QPA_PLATFORM=wayland-egl maestral-gui

@alexarice
Copy link
Contributor

no change

@alexarice
Copy link
Contributor

Sorry for being unhelpful, I feel the best way forward might be to see if anyone else shares my issue

@peterhoeg
Copy link
Member Author

peterhoeg commented Aug 13, 2019 via email

@alexarice
Copy link
Contributor

wrapQtProgram fixed my previous error.
Unfortunately I have a new error, happens when I click the the link dropbox button

Traceback (most recent call last):
  File "/nix/store/jlbx4m9zv15b9hbf63s3wx2407l9h906-maestral-gui-0.2.6/lib/python3.7/site-packages/maestral/gui/setup_dialog.py", line 137, in on_link
    self.auth_url = self.auth_session.get_auth_url()
  File "/nix/store/jlbx4m9zv15b9hbf63s3wx2407l9h906-maestral-gui-0.2.6/lib/python3.7/site-packages/maestral/oauth.py", line 64, in get_auth_url
    APP_KEY = os.environ["DROPBOX_API_KEY"]
  File "/nix/store/w7gsq8v86hni4ynaqgwwlnlny115ylng-python3-3.7.4/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'DROPBOX_API_KEY'
[1]    6765 abort      result-2/bin/maestral-gui

@peterhoeg
Copy link
Member Author

peterhoeg commented Aug 14, 2019 via email

@alexarice
Copy link
Contributor

Everything is likely working for me then

@peterhoeg peterhoeg merged commit d7fc23a into NixOS:master Aug 14, 2019
@peterhoeg peterhoeg deleted the p/maestral branch August 14, 2019 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants