qt5: fix splicing
and simplify some things remove now unnecessary use of buildPackages
This commit is contained in:
parent
6b6bb56d41
commit
19e047434c
@ -12,7 +12,6 @@ Check for any minor version changes.
|
|||||||
, bison, cups ? null, harfbuzz, libGL, perl, python3
|
, bison, cups ? null, harfbuzz, libGL, perl, python3
|
||||||
, gstreamer, gst-plugins-base, gtk3, dconf
|
, gstreamer, gst-plugins-base, gtk3, dconf
|
||||||
, darwin
|
, darwin
|
||||||
, buildPackages
|
|
||||||
|
|
||||||
# options
|
# options
|
||||||
, developerBuild ? false
|
, developerBuild ? false
|
||||||
@ -204,28 +203,20 @@ let
|
|||||||
|
|
||||||
addPackages = self: with self;
|
addPackages = self: with self;
|
||||||
let
|
let
|
||||||
qtModule =
|
qtModule = callPackage ../qtModule.nix {
|
||||||
import ../qtModule.nix
|
inherit patches;
|
||||||
{
|
# Use a variant of mkDerivation that does not include wrapQtApplications
|
||||||
inherit perl;
|
# to avoid cyclic dependencies between Qt modules.
|
||||||
inherit lib;
|
mkDerivation =
|
||||||
# Use a variant of mkDerivation that does not include wrapQtApplications
|
(callPackage ../mkDerivation.nix { wrapQtAppsHook = null; }) stdenv.mkDerivation;
|
||||||
# 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 stdenv; };
|
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs stdenv; };
|
||||||
in {
|
in {
|
||||||
|
|
||||||
inherit callPackage qtCompatVersion qtModule srcs;
|
inherit callPackage qtCompatVersion qtModule srcs;
|
||||||
|
|
||||||
mkDerivationWith =
|
mkDerivationWith = callPackage ../mkDerivation.nix { };
|
||||||
import ../mkDerivation.nix
|
|
||||||
{ inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
|
|
||||||
|
|
||||||
mkDerivation = mkDerivationWith stdenv.mkDerivation;
|
mkDerivation = mkDerivationWith stdenv.mkDerivation;
|
||||||
|
|
||||||
@ -318,20 +309,20 @@ let
|
|||||||
] ++ lib.optional (!stdenv.isDarwin) qtwayland
|
] ++ lib.optional (!stdenv.isDarwin) qtwayland
|
||||||
++ lib.optional (stdenv.isDarwin) qtmacextras);
|
++ lib.optional (stdenv.isDarwin) qtmacextras);
|
||||||
|
|
||||||
qmake = makeSetupHook {
|
qmake = callPackage ({ qtbase }: makeSetupHook {
|
||||||
name = "qmake-hook";
|
name = "qmake-hook";
|
||||||
propagatedBuildInputs = [ self.qtbase.dev ];
|
propagatedBuildInputs = [ qtbase.dev ];
|
||||||
substitutions = {
|
substitutions = {
|
||||||
inherit debug;
|
inherit debug;
|
||||||
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
||||||
};
|
};
|
||||||
} ../hooks/qmake-hook.sh;
|
} ../hooks/qmake-hook.sh) { };
|
||||||
|
|
||||||
wrapQtAppsHook = makeSetupHook {
|
wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook {
|
||||||
name = "wrap-qt5-apps-hook";
|
name = "wrap-qt5-apps-hook";
|
||||||
propagatedBuildInputs = [ self.qtbase.dev buildPackages.makeBinaryWrapper ]
|
propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ]
|
||||||
++ lib.optional stdenv.isLinux self.qtwayland.dev;
|
++ lib.optional stdenv.isLinux qtwayland.dev;
|
||||||
} ../hooks/wrap-qt-apps-hook.sh;
|
} ../hooks/wrap-qt-apps-hook.sh) { };
|
||||||
};
|
};
|
||||||
|
|
||||||
baseScope = makeScopeWithSplicing' {
|
baseScope = makeScopeWithSplicing' {
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
{ lib, debug, wrapQtAppsHook }:
|
{ wrapQtAppsHook }:
|
||||||
|
|
||||||
let inherit (lib) optional; in
|
|
||||||
|
|
||||||
mkDerivation:
|
mkDerivation:
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
{ lib, mkDerivation, perl }:
|
{ lib, mkDerivation, perl, qmake, patches, srcs }:
|
||||||
|
|
||||||
let inherit (lib) licenses maintainers platforms; in
|
let inherit (lib) licenses maintainers platforms; in
|
||||||
|
|
||||||
{ self, srcs, patches }:
|
|
||||||
|
|
||||||
args:
|
args:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -16,7 +14,7 @@ mkDerivation (args // {
|
|||||||
inherit pname version src;
|
inherit pname version src;
|
||||||
patches = (args.patches or []) ++ (patches.${pname} or []);
|
patches = (args.patches or []) ++ (patches.${pname} or []);
|
||||||
|
|
||||||
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
|
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl qmake ];
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
(lib.warnIf (args ? qtInputs) "qt5.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
|
(lib.warnIf (args ? qtInputs) "qt5.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
|
||||||
(args.propagatedBuildInputs or []);
|
(args.propagatedBuildInputs or []);
|
||||||
|
|||||||
@ -24656,7 +24656,7 @@ with pkgs;
|
|||||||
inherit (__splicedPackages)
|
inherit (__splicedPackages)
|
||||||
makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper
|
makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper
|
||||||
bison cups dconf harfbuzz libGL perl gtk3 python3
|
bison cups dconf harfbuzz libGL perl gtk3 python3
|
||||||
darwin buildPackages;
|
darwin;
|
||||||
inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base;
|
inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base;
|
||||||
inherit config;
|
inherit config;
|
||||||
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user