wrapQtAppsHook: wrap Qt applications for runtime dependencies
This commit is contained in:
@@ -17,7 +17,7 @@ top-level attribute to `top-level/all-packages.nix`.
|
||||
|
||||
{
|
||||
newScope,
|
||||
stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
|
||||
stdenv, fetchurl, fetchFromGitHub, makeSetupHook, makeWrapper,
|
||||
bison, cups ? null, harfbuzz, libGL, perl,
|
||||
gstreamer, gst-plugins-base, gtk3, dconf,
|
||||
cf-private, llvmPackages_5,
|
||||
@@ -34,6 +34,8 @@ let
|
||||
|
||||
qtCompatVersion = "5.12";
|
||||
|
||||
stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
|
||||
|
||||
mirror = "https://download.qt.io";
|
||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
|
||||
# Community port of the now unmaintained upstream qtwebkit.
|
||||
@@ -69,16 +71,18 @@ let
|
||||
qttools = [ ./qttools.patch ];
|
||||
};
|
||||
|
||||
mkDerivation =
|
||||
import ../mkDerivation.nix {
|
||||
inherit (stdenv) lib;
|
||||
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
|
||||
}
|
||||
{ inherit debug; };
|
||||
|
||||
qtModule =
|
||||
import ../qtModule.nix
|
||||
{ inherit mkDerivation perl; inherit (stdenv) lib; }
|
||||
{
|
||||
inherit perl;
|
||||
inherit (stdenv) lib;
|
||||
# Use a variant of mkDerivation that does not include wrapQtApplications
|
||||
# to avoid cyclic dependencies between Qt modules.
|
||||
mkDerivation =
|
||||
import ../mkDerivation.nix
|
||||
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
|
||||
stdenvActual.mkDerivation;
|
||||
}
|
||||
{ inherit self srcs patches; };
|
||||
|
||||
addPackages = self: with self;
|
||||
@@ -86,7 +90,11 @@ let
|
||||
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
|
||||
in {
|
||||
|
||||
inherit mkDerivation;
|
||||
mkDerivationWith =
|
||||
import ../mkDerivation.nix
|
||||
{ inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
|
||||
|
||||
mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
|
||||
|
||||
qtbase = callPackage ../modules/qtbase.nix {
|
||||
inherit (srcs.qtbase) src version;
|
||||
@@ -151,6 +159,12 @@ let
|
||||
fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
|
||||
};
|
||||
} ../hooks/qmake-hook.sh;
|
||||
|
||||
wrapQtAppsHook = makeSetupHook {
|
||||
deps =
|
||||
[ self.qtbase.dev makeWrapper ]
|
||||
++ optional stdenv.isLinux self.qtwayland.dev;
|
||||
} ../hooks/wrap-qt-apps-hook.sh;
|
||||
};
|
||||
|
||||
self = makeScope newScope addPackages;
|
||||
|
||||
Reference in New Issue
Block a user