Separate Qt 5 packages from dependent libraries

This commit is contained in:
Thomas Tuegel
2017-02-25 09:44:01 -06:00
parent 6018cf4a69
commit 4f2e7a0424
11 changed files with 272 additions and 277 deletions

View File

@@ -51,9 +51,7 @@ let
});
kdeFramework = let
broken = builtins.compareVersions self.qtbase.version "5.6.0" < 0;
in args:
kdeFramework = args:
let
inherit (args) name;
inherit (srcs."${name}") src version;
@@ -67,7 +65,6 @@ let
];
platforms = lib.platforms.linux;
homepage = "http://www.kde.org";
inherit broken;
} // (args.meta or {});
});

View File

@@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, cmake, mesa, pkgconfig, libpulseaudio
, qt4 ? null, extra-cmake-modules, qtbase ? null, qttools ? null
, qt4 ? null, ecm ? null, qtbase ? null, qttools ? null
, withQt5 ? false
, debug ? false }:
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
[ mesa libpulseaudio ]
++ (if withQt5 then [ qtbase qttools ] else [ qt4 ]);
nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules;
nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 ecm;
NIX_CFLAGS_COMPILE = "-fPIC";

View File

@@ -16,27 +16,30 @@
*/
{ pkgs
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
libgnomeui, GConf, gnome_vfs,
gstreamer, gst-plugins-base,
# options
, developerBuild ? false
, decryptSslTraffic ? false
# options
developerBuild ? false,
decryptSslTraffic ? false,
}:
let inherit (pkgs) makeSetupHook makeWrapper stdenv; in
with stdenv.lib;
let
mirror = "http://download.qt.io";
srcs = import ./srcs.nix { inherit mirror; inherit (pkgs) fetchurl; };
srcs = import ./srcs.nix { inherit mirror; inherit fetchurl; };
qtSubmodule = args:
let
inherit (args) name;
inherit (srcs."${args.name}") version src;
inherit (pkgs.stdenv) mkDerivation;
inherit (stdenv) mkDerivation;
in mkDerivation (args // {
name = "${name}-${version}";
inherit src;
@@ -62,12 +65,9 @@ let
in {
qtbase = callPackage ./qtbase {
mesa = pkgs.mesa_noglu;
harfbuzz = pkgs.harfbuzz-icu;
cups = if stdenv.isLinux then pkgs.cups else null;
inherit bison cups harfbuzz mesa;
# GNOME dependencies are not used unless gtkStyle == true
inherit (pkgs.gnome2) libgnomeui GConf gnome_vfs;
bison = pkgs.bison2; # error: too few arguments to function 'int yylex(...
inherit libgnomeui GConf gnome_vfs;
inherit developerBuild decryptSslTraffic;
};
@@ -84,7 +84,7 @@ let
qtlocation = callPackage ./qtlocation.nix {};
/* qtmacextras = not packaged */
qtmultimedia = callPackage ./qtmultimedia.nix {
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
inherit gstreamer gst-plugins-base;
};
qtquick1 = callPackage ./qtquick1 {};
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
@@ -124,6 +124,6 @@ let
};
self = makeScope pkgs.newScope addPackages;
self = makeScope newScope addPackages;
in self

View File

@@ -14,28 +14,30 @@ top-level attribute to `top-level/all-packages.nix`.
*/
{ pkgs
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
gstreamer, gst-plugins-base,
# options
, developerBuild ? false
, decryptSslTraffic ? false
# options
developerBuild ? false,
decryptSslTraffic ? false,
}:
let inherit (pkgs) makeSetupHook makeWrapper stdenv; in
with stdenv.lib;
let
mirror = "http://download.qt.io";
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
qtSubmodule = args:
let
inherit (args) name;
version = args.version or srcs."${name}".version;
src = args.src or srcs."${name}".src;
inherit (pkgs.stdenv) mkDerivation;
inherit (stdenv) mkDerivation;
in mkDerivation (args // {
name = "${name}-${version}";
inherit src;
@@ -43,7 +45,7 @@ let
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
nativeBuildInputs =
(args.nativeBuildInputs or [])
++ [ pkgs.perl self.qmakeHook ];
++ [ perl self.qmakeHook ];
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
@@ -63,10 +65,7 @@ let
in {
qtbase = callPackage ./qtbase {
mesa = pkgs.mesa_noglu;
harfbuzz = pkgs.harfbuzz-icu;
cups = if stdenv.isLinux then pkgs.cups else null;
bison = pkgs.bison2; # error: too few arguments to function 'int yylex(...
inherit bison cups harfbuzz mesa;
inherit developerBuild decryptSslTraffic;
};
@@ -83,7 +82,7 @@ let
qtlocation = callPackage ./qtlocation.nix {};
/* qtmacextras = not packaged */
qtmultimedia = callPackage ./qtmultimedia.nix {
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
inherit gstreamer gst-plugins-base;
};
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
qtscript = callPackage ./qtscript {};
@@ -120,6 +119,6 @@ let
(if stdenv.isDarwin then ../qmake-hook-darwin.sh else ../qmake-hook.sh);
};
self = makeScope pkgs.newScope addPackages;
self = makeScope newScope addPackages;
in self

View File

@@ -14,28 +14,30 @@ top-level attribute to `top-level/all-packages.nix`.
*/
{ pkgs
{
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
gstreamer, gst-plugins-base,
# options
, developerBuild ? false
, decryptSslTraffic ? false
# options
developerBuild ? false,
decryptSslTraffic ? false,
}:
let inherit (pkgs) makeSetupHook makeWrapper stdenv; in
with stdenv.lib;
let
mirror = "http://download.qt.io";
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
qtSubmodule = args:
let
inherit (args) name;
version = args.version or srcs."${name}".version;
src = args.src or srcs."${name}".src;
inherit (pkgs.stdenv) mkDerivation;
inherit (stdenv) mkDerivation;
in mkDerivation (args // {
name = "${name}-${version}";
inherit src;
@@ -43,7 +45,7 @@ let
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
nativeBuildInputs =
(args.nativeBuildInputs or [])
++ [ pkgs.perl self.qmakeHook ];
++ [ perl self.qmakeHook ];
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
@@ -64,11 +66,7 @@ let
qtbase = callPackage ./qtbase {
inherit (srcs.qtbase) src version;
mesa = pkgs.mesa_noglu;
harfbuzz = pkgs.harfbuzz-icu;
cups = if stdenv.isLinux then pkgs.cups else null;
# GNOME dependencies are not used unless gtkStyle == true
bison = pkgs.bison2; # error: too few arguments to function 'int yylex(...
inherit bison cups harfbuzz mesa;
inherit developerBuild decryptSslTraffic;
};
@@ -79,7 +77,7 @@ let
qtimageformats = callPackage ./qtimageformats.nix {};
qtlocation = callPackage ./qtlocation.nix {};
qtmultimedia = callPackage ./qtmultimedia.nix {
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
inherit gstreamer gst-plugins-base;
};
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {};
@@ -117,6 +115,6 @@ let
};
self = makeScope pkgs.newScope addPackages;
self = makeScope newScope addPackages;
in self

View File

@@ -1,4 +1,4 @@
{ fetchurl, stdenv, zip, zlib, qt, qmakeHook }:
{ fetchurl, stdenv, zip, zlib, qtbase, qmakeHook }:
stdenv.mkDerivation rec {
name = "quazip-0.7.1";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
preConfigure = "cd quazip";
buildInputs = [ zlib qt ];
buildInputs = [ zlib qtbase ];
nativeBuildInputs = [ qmakeHook ];
meta = {