diff --git a/pkgs/applications/networking/maestral-qt/default.nix b/pkgs/applications/networking/maestral-qt/default.nix new file mode 100644 index 00000000000..ea6303a3c34 --- /dev/null +++ b/pkgs/applications/networking/maestral-qt/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, lib +, fetchFromGitHub +, python3 +, wrapQtAppsHook +}: + +python3.pkgs.buildPythonApplication rec { + pname = "maestral-qt"; + version = "1.1.0"; + disabled = python3.pkgs.pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "SamSchott"; + repo = "maestral-qt"; + rev = "v${version}"; + sha256 = "0clzzwwbrynfbvawhaaa4mp2qi8smng31mmz0is166z6g67bwdl6"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + bugsnag + click + markdown2 + maestral + pyqt5 + ]; + + nativeBuildInputs = [ wrapQtAppsHook ]; + + makeWrapperArgs = [ + # Firstly, add all necessary QT variables + "\${qtWrapperArgs[@]}" + + # Add the installed directories to the python path so the daemon can find them + "--prefix" "PYTHONPATH" ":" "${stdenv.lib.concatStringsSep ":" (map (p: p + "/lib/${python3.libPrefix}/site-packages") (python3.pkgs.requiredPythonModules python3.pkgs.maestral.propagatedBuildInputs))}" + "--prefix" "PYTHONPATH" ":" "${python3.pkgs.maestral}/lib/${python3.libPrefix}/site-packages" + ]; + + # no tests + doCheck = false; + + meta = with lib; { + description = "GUI front-end for maestral (an open-source Dropbox client) for Linux"; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.linux; + inherit (src.meta) homepage; + }; +} diff --git a/pkgs/applications/networking/maestral/default.nix b/pkgs/applications/networking/maestral/default.nix deleted file mode 100644 index fe611892ae6..00000000000 --- a/pkgs/applications/networking/maestral/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, python3 -, withGui ? false -, wrapQtAppsHook ? null -}: - -python3.pkgs.buildPythonApplication rec { - pname = "maestral${lib.optionalString withGui "-gui"}"; - version = "0.6.4"; - - disabled = python3.pkgs.pythonOlder "3.6"; - - src = fetchFromGitHub { - owner = "SamSchott"; - repo = "maestral-dropbox"; - rev = "v${version}"; - sha256 = "06psbjd205qj6vx7k7ywhclz1bs5zp43xnf275hf0k80h3b064sn"; - }; - - propagatedBuildInputs = with python3.pkgs; [ - blinker - bugsnag - click - dropbox - keyring - keyrings-alt - lockfile - pathspec - Pyro5 - requests - u-msgpack-python - watchdog - ] ++ lib.optionals stdenv.isLinux [ - sdnotify - systemd - ] ++ lib.optional withGui pyqt5; - - nativeBuildInputs = lib.optional withGui wrapQtAppsHook; - - postInstall = lib.optionalString withGui '' - makeQtWrapper $out/bin/maestral $out/bin/maestral-gui \ - --add-flags gui - ''; - - # no tests - doCheck = false; - - meta = with lib; { - description = "Open-source Dropbox client for macOS and Linux"; - license = licenses.mit; - maintainers = with maintainers; [ peterhoeg ]; - platforms = platforms.unix; - inherit (src.meta) homepage; - }; -} diff --git a/pkgs/development/python-modules/maestral/default.nix b/pkgs/development/python-modules/maestral/default.nix new file mode 100644 index 00000000000..c7a4fc3f423 --- /dev/null +++ b/pkgs/development/python-modules/maestral/default.nix @@ -0,0 +1,57 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, python +, blinker, bugsnag, click, dropbox, fasteners, keyring, keyrings-alt, pathspec, Pyro5, requests, u-msgpack-python, watchdog +, sdnotify +, systemd +}: + +buildPythonPackage rec { + pname = "maestral"; + version = "1.1.0"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "SamSchott"; + repo = "maestral"; + rev = "v${version}"; + sha256 = "0d1pxbg69ll07w4bbpzs7zz1yn82qyrym95b0mqmhrrg2ysxjngg"; + }; + + propagatedBuildInputs = [ + blinker + bugsnag + click + dropbox + fasteners + keyring + keyrings-alt + pathspec + Pyro5 + requests + u-msgpack-python + watchdog + ] ++ stdenv.lib.optionals stdenv.isLinux [ + sdnotify + systemd + ]; + + makeWrapperArgs = [ + # Add the installed directories to the python path so the daemon can find them + "--prefix" "PYTHONPATH" ":" "${stdenv.lib.concatStringsSep ":" (map (p: p + "/lib/${python.libPrefix}/site-packages") (python.pkgs.requiredPythonModules propagatedBuildInputs))}" + "--prefix" "PYTHONPATH" ":" "$out/lib/${python.libPrefix}/site-packages" + ]; + + # no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "Open-source Dropbox client for macOS and Linux"; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; + inherit (src.meta) homepage; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cd44c0372b..b8667217796 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22170,9 +22170,9 @@ in dropbox-cli = callPackage ../applications/networking/dropbox/cli.nix { }; - maestral = callPackage ../applications/networking/maestral { }; + maestral = with python3Packages; toPythonApplication maestral; - maestral-gui = libsForQt5.callPackage ../applications/networking/maestral { withGui = true; }; + maestral-gui = libsForQt5.callPackage ../applications/networking/maestral-qt { }; insync = callPackage ../applications/networking/insync { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 56becb6b559..1a7d87a9ae3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4477,6 +4477,8 @@ in { inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation CoreServices; }; + maestral = callPackage ../development/python-modules/maestral { }; + manifestparser = callPackage ../development/python-modules/marionette-harness/manifestparser.nix {}; marionette_driver = callPackage ../development/python-modules/marionette-harness/marionette_driver.nix {}; mozcrash = callPackage ../development/python-modules/marionette-harness/mozcrash.nix {};