diff options
Diffstat (limited to 'pkgs/development/libraries/qt-5/5.6/default.nix')
-rw-r--r-- | pkgs/development/libraries/qt-5/5.6/default.nix | 57 |
1 files changed, 40 insertions, 17 deletions
diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index cc6475d31b64..b250ae8b9527 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -18,8 +18,9 @@ existing packages here and modify it as necessary. 1. Update the URL in `./fetch.sh`. 2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION/` from the top of the Nixpkgs tree. -3. Use `nox-review wip` to check that everything builds. -4. Commit the changes and open a pull request. +3. Update `qtCompatVersion` below if the minor version number changes. +4. Check that the new packages build correctly. +5. Commit the changes and open a pull request. */ @@ -32,21 +33,42 @@ existing packages here and modify it as necessary. # options developerBuild ? false, decryptSslTraffic ? false, + debug ? null, }: with stdenv.lib; let + qtCompatVersion = "5.6"; + mirror = "http://download.qt.io"; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; + mkDerivation = args: + stdenv.mkDerivation (args // { + + qmakeFlags = + (args.qmakeFlags or []) + ++ optional (debug != null) + (if debug then "CONFIG+=debug" else "CONFIG+=release"); + + cmakeFlags = + (args.cmakeFlags or []) + ++ [ "-DBUILD_TESTING=OFF" ] + ++ optional (debug != null) + (if debug then "-DCMAKE_BUILD_TYPE=Debug" + else "-DCMAKE_BUILD_TYPE=Release"); + + enableParallelBuilding = args.enableParallelBuilding or true; + + }); + qtSubmodule = args: let inherit (args) name; version = args.version or srcs."${name}".version; src = args.src or srcs."${name}".src; - inherit (stdenv) mkDerivation; in mkDerivation (args // { name = "${name}-${version}"; inherit src; @@ -54,7 +76,7 @@ let propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); nativeBuildInputs = (args.nativeBuildInputs or []) - ++ [ perl self.qmakeHook ]; + ++ [ perl self.qmake ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; @@ -63,16 +85,22 @@ let setupHook = ../qtsubmodule-setup-hook.sh; - enableParallelBuilding = args.enableParallelBuilding or true; - - meta = self.qtbase.meta // (args.meta or {}); + meta = { + homepage = http://www.qt.io; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ qknight ttuegel periklis ]; + platforms = platforms.unix; + } // (args.meta or {}); }); addPackages = self: with self; let - callPackage = self.newScope { inherit qtSubmodule srcs; }; + callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; in { + inherit mkDerivation; + qtbase = callPackage ./qtbase { inherit bison cups harfbuzz mesa; inherit developerBuild decryptSslTraffic; @@ -119,15 +147,10 @@ let qtwebchannel qtwebengine qtwebkit qtwebsockets qtx11extras qtxmlpatterns ]; - makeQtWrapper = - makeSetupHook - { deps = [ makeWrapper ]; } - (if stdenv.isDarwin then ../make-qt-wrapper-darwin.sh else ../make-qt-wrapper.sh); - - qmakeHook = - makeSetupHook - { deps = [ self.qtbase.dev ]; } - (if stdenv.isDarwin then ../qmake-hook-darwin.sh else ../qmake-hook.sh); + qmake = makeSetupHook { + deps = [ self.qtbase.dev ]; + substitutions = { inherit (stdenv) isDarwin; }; + } ../qmake-hook.sh; }; self = makeScope newScope addPackages; |