qt5: apply makeScope overrides to qtModule

qtModule was defined outside of addPackages, which caused it to use a self
variable that isn't affected by updates using overrideScope. This caused
overrides to qtbase to be incompletely applied. I also entirely removed the
outer self variable to prevent it from being accidently used again.
This commit is contained in:
Ben Wolsieffer
2022-01-08 01:08:23 -05:00
parent 068c0a56c5
commit f3386ca8cc
3 changed files with 45 additions and 51 deletions
@@ -117,22 +117,22 @@ let
qttools = [ ./qttools.patch ];
};
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
addPackages = self: with self;
let
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
in {
@@ -228,6 +228,4 @@ let
} ../hooks/wrap-qt-apps-hook.sh;
};
self = lib.makeScope newScope addPackages;
in self
in lib.makeScope newScope addPackages
@@ -118,22 +118,22 @@ let
qtwayland = [ ./qtwayland-libdrm-build.patch ];
};
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
addPackages = self: with self;
let
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
in {
@@ -228,6 +228,4 @@ let
} ../hooks/wrap-qt-apps-hook.sh;
};
self = lib.makeScope newScope addPackages;
in self
in lib.makeScope newScope addPackages
@@ -80,22 +80,22 @@ let
qttools = [ ./qttools.patch ];
};
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
addPackages = self: with self;
let
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
stdenv.mkDerivation;
}
{ inherit self srcs patches; };
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
in {
@@ -192,6 +192,4 @@ let
} ../hooks/wrap-qt-apps-hook.sh;
};
self = lib.makeScope newScope addPackages;
in self
in lib.makeScope newScope addPackages