Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,794 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/bin/sh | ||
|
||
./fetch-kde-qt.sh http://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/ -A '*.tar.xz' | ||
./maintainers/scripts/fetch-kde-qt.sh \ | ||
http://download.qt.io/official_releases/qt/5.7/5.7.0/submodules/ \ | ||
-A '*.tar.xz' \ | ||
>pkgs/development/libraries/qt-5/5.7/srcs.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/* | ||
# Updates | ||
Before a major version update, make a copy of this directory. (We like to | ||
keep the old version around for a short time after major updates.) Add a | ||
top-level attribute to `top-level/all-packages.nix`. | ||
1. Update the URL in `maintainers/scripts/generate-qt.sh`. | ||
2. From the top of the Nixpkgs tree, run | ||
`./maintainers/scripts/generate-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`. | ||
3. Check that the new packages build correctly. | ||
4. Commit the changes and open a pull request. | ||
*/ | ||
|
||
{ pkgs | ||
|
||
# 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; }; | ||
|
||
qtSubmodule = args: | ||
let | ||
inherit (args) name; | ||
version = args.version or srcs."${name}".version; | ||
src = args.src or srcs."${name}".src; | ||
inherit (pkgs.stdenv) mkDerivation; | ||
in mkDerivation (args // { | ||
name = "${name}-${version}"; | ||
inherit src; | ||
|
||
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); | ||
nativeBuildInputs = | ||
(args.nativeBuildInputs or []) | ||
++ [ pkgs.perl self.qmakeHook ]; | ||
|
||
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; | ||
|
||
outputs = args.outputs or [ "dev" "out" ]; | ||
setOutputFlags = args.setOutputFlags or false; | ||
|
||
setupHook = ./setup-hook.sh; | ||
|
||
enableParallelBuilding = args.enableParallelBuilding or true; | ||
|
||
meta = self.qtbase.meta // (args.meta or {}); | ||
}); | ||
|
||
addPackages = self: with self; | ||
let | ||
callPackage = self.newScope { inherit qtSubmodule srcs; }; | ||
in { | ||
|
||
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 developerBuild decryptSslTraffic; | ||
}; | ||
|
||
qtconnectivity = callPackage ./qtconnectivity.nix {}; | ||
qtdeclarative = callPackage ./qtdeclarative {}; | ||
qtdoc = callPackage ./qtdoc.nix {}; | ||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {}; | ||
qtimageformats = callPackage ./qtimageformats.nix {}; | ||
qtlocation = callPackage ./qtlocation.nix {}; | ||
qtmultimedia = callPackage ./qtmultimedia.nix { | ||
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base; | ||
}; | ||
qtquickcontrols = callPackage ./qtquickcontrols.nix {}; | ||
qtscript = callPackage ./qtscript {}; | ||
qtsensors = callPackage ./qtsensors.nix {}; | ||
qtserialport = callPackage ./qtserialport {}; | ||
qtsvg = callPackage ./qtsvg.nix {}; | ||
qttools = callPackage ./qttools.nix {}; | ||
qttranslations = callPackage ./qttranslations.nix {}; | ||
qtwebchannel = callPackage ./qtwebchannel.nix {}; | ||
qtwebengine = callPackage ./qtwebengine.nix {}; | ||
qtwebsockets = callPackage ./qtwebsockets.nix {}; | ||
qtx11extras = callPackage ./qtx11extras.nix {}; | ||
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {}; | ||
|
||
env = callPackage ../qt-env.nix {}; | ||
full = env "qt-${qtbase.version}" [ | ||
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects | ||
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript | ||
qtsensors qtserialport qtsvg qttools qttranslations qtwebsockets | ||
qtx11extras qtxmlpatterns | ||
]; | ||
|
||
makeQtWrapper = | ||
makeSetupHook | ||
{ deps = [ makeWrapper ]; } | ||
./make-qt-wrapper.sh; | ||
|
||
qmakeHook = | ||
makeSetupHook | ||
{ deps = [ self.qtbase ]; } | ||
./qmake-hook.sh; | ||
|
||
}; | ||
|
||
self = makeScope pkgs.newScope addPackages; | ||
|
||
in self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
wrapQtProgram() { | ||
local prog="$1" | ||
shift | ||
wrapProgram "$prog" \ | ||
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ | ||
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ | ||
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ | ||
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ | ||
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ | ||
"$@" | ||
} | ||
|
||
makeQtWrapper() { | ||
local old="$1" | ||
local new="$2" | ||
shift | ||
shift | ||
makeWrapper "$old" "$new" \ | ||
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ | ||
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ | ||
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ | ||
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ | ||
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ | ||
"$@" | ||
} | ||
|
||
_makeQtWrapperSetup() { | ||
# cannot use addToSearchPath because these directories may not exist yet | ||
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" | ||
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" | ||
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" | ||
export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share" | ||
export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" | ||
} | ||
|
||
prePhases+=(_makeQtWrapperSetup) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
qmakeConfigurePhase() { | ||
runHook preConfigure | ||
|
||
qmake PREFIX=$out $qmakeFlags | ||
|
||
runHook postConfigure | ||
} | ||
|
||
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then | ||
configurePhase=qmakeConfigurePhase | ||
fi | ||
|
||
_qtModuleMultioutDevsPre() { | ||
# We cannot simply set these paths in configureFlags because libQtCore retains | ||
# references to the paths it was built with. | ||
moveToOutput "bin" "${!outputDev}" | ||
moveToOutput "include" "${!outputDev}" | ||
|
||
# The destination directory must exist or moveToOutput will do nothing | ||
mkdir -p "${!outputDev}/share" | ||
moveToOutput "share/doc" "${!outputDev}" | ||
} | ||
|
||
_qtModuleMultioutDevsPost() { | ||
# Move libtool archives and qmake project files to $dev/lib | ||
if [ "z${!outputLib}" != "z${!outputDev}" ]; then | ||
pushd "${!outputLib}" | ||
if [ -d "lib" ]; then | ||
find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \ | ||
while read -r -d $'\0' file; do | ||
mkdir -p "${!outputDev}/$(dirname "$file")" | ||
mv "${!outputLib}/$file" "${!outputDev}/$file" | ||
done | ||
fi | ||
popd | ||
fi | ||
} | ||
|
||
if [ -n "$NIX_QT_SUBMODULE" ]; then | ||
preFixupHooks+=(_qtModuleMultioutDevsPre) | ||
postFixupHooks+=(_qtModuleMultioutDevsPost) | ||
fi |
Oops, something went wrong.