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

Conversation

@peterhoeg
Copy link
Member

commented Aug 10, 2019

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

This comment has been minimized.

Copy link
@alexarice

alexarice Aug 10, 2019

Contributor

Should this only be added when withGui is true?

This comment has been minimized.

Copy link
@peterhoeg

peterhoeg Aug 13, 2019

Author Member

Fixed

This comment has been minimized.

Copy link
@ttuegel

ttuegel Aug 13, 2019

Member

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[@]}.

This comment has been minimized.

Copy link
@peterhoeg

peterhoeg Aug 14, 2019

Author Member

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 ];

This comment has been minimized.

Copy link
@alexarice

alexarice Aug 10, 2019

Contributor

should be maintainers instead of maintainer

@peterhoeg peterhoeg force-pushed the peterhoeg:p/maestral branch from 261404f to 425e850 Aug 13, 2019

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

Thanks @alexarice, all sorted.

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

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 peterhoeg force-pushed the peterhoeg:p/maestral branch from 425e850 to 4c817d7 Aug 13, 2019

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

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

This comment has been minimized.

Copy link
@alexarice

alexarice Aug 13, 2019

Contributor

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

This comment has been minimized.

Copy link
@peterhoeg

peterhoeg Aug 13, 2019

Author Member

You're absolutely right!

This comment has been minimized.

Copy link
@ttuegel

ttuegel Aug 13, 2019

Member

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.

This comment has been minimized.

Copy link
@alexarice

alexarice Aug 13, 2019

Contributor

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

@peterhoeg peterhoeg force-pushed the peterhoeg:p/maestral branch from 4c817d7 to f16a957 Aug 13, 2019

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Unfortunately I get the same error

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

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

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

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

I'll try it without nix-review

@alexarice

This comment has been minimized.

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

Try this:

nix-env -i ./result-2

And then just run maestral-gui.

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

~/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

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

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

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

What happens if you run it this way then:

QT_QPA_PLATFORM=wayland-egl maestral-gui
@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

no change

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

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

@peterhoeg

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

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

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

@alexarice

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

Everything is likely working for me then

@peterhoeg peterhoeg force-pushed the peterhoeg:p/maestral branch from f16a957 to a67aec1 Aug 14, 2019

@peterhoeg peterhoeg merged commit d7fc23a into NixOS:master Aug 14, 2019

15 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
maestral on aarch64-linux Success
Details
maestral on x86_64-linux Success
Details

@peterhoeg peterhoeg deleted the peterhoeg:p/maestral branch Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.