From fd30eef8fd7d3969ac4c628674d638f9ed4341e6 Mon Sep 17 00:00:00 2001 From: linsui Date: Sun, 4 Sep 2022 00:21:38 +0800 Subject: [PATCH] variety: fix wrapper --- pkgs/applications/misc/variety/default.nix | 35 +++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/misc/variety/default.nix b/pkgs/applications/misc/variety/default.nix index 42c2a429de96..10b98e0642c0 100644 --- a/pkgs/applications/misc/variety/default.nix +++ b/pkgs/applications/misc/variety/default.nix @@ -11,8 +11,10 @@ , python3 , runtimeShell , wrapGAppsHook -, fehSupport ? false, feh -, imagemagickSupport ? true, imagemagick +, fehSupport ? false +, feh +, imagemagickSupport ? true +, imagemagick }: python3.pkgs.buildPythonApplication rec { @@ -29,17 +31,19 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = [ intltool wrapGAppsHook + gobject-introspection ]; - propagatedBuildInputs = [ - gexiv2 - gobject-introspection - gtk3 - hicolor-icon-theme - libnotify - librsvg - ] - ++ (with python3.pkgs; [ + buildInputs = [ + gexiv2 + gobject-introspection + gtk3 + hicolor-icon-theme + libnotify + librsvg + ]; + + propagatedBuildInputs = with python3.pkgs; [ beautifulsoup4 configobj dbus-python @@ -51,14 +55,17 @@ python3.pkgs.buildPythonApplication rec { pygobject3 requests setuptools - ]) + ] ++ lib.optional fehSupport feh ++ lib.optional imagemagickSupport imagemagick; doCheck = false; - postInstall = '' - wrapProgram $out/bin/variety --suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ + # Prevent double wrapping, let the Python wrapper use the args in preFixup. + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; prePatch = ''