From 18f477d443dd2693b7367f414dd3131cecd791ef Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 7 Feb 2026 14:29:32 +0100 Subject: [PATCH 1/2] python3Packages.maestral: fix for structuredAttrs, use finalAttrs --- .../python-modules/maestral/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/maestral/default.nix b/pkgs/development/python-modules/maestral/default.nix index 116a94520802..bb7e36e65961 100644 --- a/pkgs/development/python-modules/maestral/default.nix +++ b/pkgs/development/python-modules/maestral/default.nix @@ -28,7 +28,7 @@ nixosTests, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "maestral"; version = "1.9.6"; pyproject = true; @@ -36,7 +36,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "SamSchott"; repo = "maestral"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-mYFiQL4FumJWP2y1u5tIo1CZL027J8/EIYqJQde7G/c="; }; @@ -65,8 +65,14 @@ buildPythonPackage rec { makeWrapperArgs = [ # Add the installed directories to the python path so the daemon can find them - "--prefix PYTHONPATH : ${makePythonPath dependencies}" - "--prefix PYTHONPATH : $out/${python.sitePackages}" + "--prefix" + "PYTHONPATH" + ":" + (makePythonPath finalAttrs.finalPackage.dependencies) + "--prefix" + "PYTHONPATH" + ":" + "$out/${python.sitePackages}" ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -117,7 +123,7 @@ buildPythonPackage rec { description = "Open-source Dropbox client for macOS and Linux"; mainProgram = "maestral"; homepage = "https://maestral.app"; - changelog = "https://github.com/samschott/maestral/releases/tag/v${version}"; + changelog = "https://github.com/samschott/maestral/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium @@ -125,4 +131,4 @@ buildPythonPackage rec { sfrijters ]; }; -} +}) From 0ebd9194d0a678d8407df013247d44d39efa0d03 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Thu, 12 Feb 2026 10:37:58 +0100 Subject: [PATCH 2/2] maestral-gui: use structuredAttrs, finalAttrs --- pkgs/by-name/ma/maestral-gui/package.nix | 28 ++++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ma/maestral-gui/package.nix b/pkgs/by-name/ma/maestral-gui/package.nix index ba047ae40420..0d2ecbeee604 100644 --- a/pkgs/by-name/ma/maestral-gui/package.nix +++ b/pkgs/by-name/ma/maestral-gui/package.nix @@ -6,7 +6,7 @@ nixosTests, }: -python3.pkgs.buildPythonApplication rec { +python3.pkgs.buildPythonApplication (finalAttrs: { pname = "maestral-qt"; version = "1.9.5"; pyproject = true; @@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec { src = fetchFromGitHub { owner = "SamSchott"; repo = "maestral-qt"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-FCn9ELbodk+zCJNmlOVoxE/KSSqbxy5HTB1vpiu7AJA="; }; @@ -39,14 +39,22 @@ python3.pkgs.buildPythonApplication rec { dontWrapQtApps = true; makeWrapperArgs = with python3.pkgs; [ - # Firstly, add all necessary QT variables - "\${qtWrapperArgs[@]}" - # Add the installed directories to the python path so the daemon can find them - "--prefix PYTHONPATH : ${makePythonPath (requiredPythonModules maestral.propagatedBuildInputs)}" - "--prefix PYTHONPATH : ${makePythonPath [ maestral ]}" + "--prefix" + "PYTHONPATH" + ":" + (makePythonPath (requiredPythonModules maestral.propagatedBuildInputs)) + "--prefix" + "PYTHONPATH" + ":" + (makePythonPath [ maestral ]) ]; + preFixup = '' + # Add all necessary QT variables + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + postInstall = '' install -Dm444 -t $out/share/icons/hicolor/512x512/apps src/maestral_qt/resources/maestral.png ''; @@ -58,10 +66,12 @@ python3.pkgs.buildPythonApplication rec { passthru.tests.maestral = nixosTests.maestral; + __structuredAttrs = true; + meta = { description = "GUI front-end for maestral (an open-source Dropbox client) for Linux"; homepage = "https://maestral.app"; - changelog = "https://github.com/samschott/maestral/releases/tag/v${version}"; + changelog = "https://github.com/samschott/maestral/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ peterhoeg @@ -70,4 +80,4 @@ python3.pkgs.buildPythonApplication rec { platforms = lib.platforms.linux; mainProgram = "maestral_qt"; }; -} +})