git.iko.soy/typeable/nixpkgs
on master help sign in
Merge staging into staging-next
commitfabbe17440a4c8b0a7b632ea0276e0d1160df151 authorFrederik Rietdijk <fridh@fridh.nl> dateWed 10 Jul 2019, 08:53 (7 years ago) parent7f23e98da96a41
135 files changed+1078−981
doc/languages-frameworks/qt.xml+167−65 nixos/modules/services/x11/desktop-managers/plasma5.nix+2−2 pkgs/applications/altcoins/bitcoin.nix+9−6 pkgs/applications/altcoins/monero-gui/default.nix+3−8 pkgs/applications/audio/carla/default.nix+8−5 pkgs/applications/audio/kid3/default.nix+3−6 pkgs/applications/editors/emacs/25.nix+2−6 pkgs/applications/editors/emacs/default.nix+2−6 pkgs/applications/editors/emacs/macport.nix+1−3 pkgs/applications/editors/kdevelop5/kdevelop.nix+3−2 pkgs/applications/editors/vim/configurable.nix+2−2 pkgs/applications/editors/vim/default.nix+2−6 pkgs/applications/gis/openorienteering-mapper/default.nix+3−5 pkgs/applications/graphics/gimp/default.nix+2−4 pkgs/applications/graphics/ktikz/default.nix+3−7 pkgs/applications/kde/ark/default.nix+20−18 pkgs/applications/kde/okular.nix+6−6 pkgs/applications/misc/alacritty/default.nix+1−7 pkgs/applications/misc/albert/default.nix−5 pkgs/applications/misc/aminal/default.nix+1−7 pkgs/applications/misc/electron-cash/default.nix+2−6 pkgs/applications/misc/keepassx/community.nix+4−5 pkgs/applications/misc/kitty/default.nix−2 pkgs/applications/misc/masterpdfeditor/default.nix+2−7 pkgs/applications/misc/subsurface/default.nix+2−7 pkgs/applications/misc/synergy/default.nix+2−2 pkgs/applications/misc/xpdf/default.nix+4−7 pkgs/applications/misc/zola/default.nix+3−2 pkgs/applications/networking/browsers/qtchan/default.nix+1−6 pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix+4−3 pkgs/applications/networking/linssid/default.nix+4−7 pkgs/applications/networking/mumble/default.nix+2−7 pkgs/applications/networking/newsreaders/quiterss/default.nix+2−7 pkgs/applications/networking/nextcloud-client/default.nix+6−6 pkgs/applications/networking/protonmail-bridge/default.nix+3−10 pkgs/applications/networking/sniffers/wireshark/default.nix+2−5 pkgs/applications/office/kmymoney/default.nix+6−6 pkgs/applications/office/scribus/unstable.nix+4−8 pkgs/applications/science/astronomy/stellarium/default.nix+3−8 pkgs/applications/science/electronics/dsview/default.nix+2−7 pkgs/applications/science/misc/root/5.nix+2−2 pkgs/applications/science/misc/root/default.nix+2−2 pkgs/applications/version-management/p4v/default.nix+5−5 pkgs/applications/video/avidemux/default.nix+10−5 pkgs/applications/video/minitube/default.nix+2−7 pkgs/build-support/cc-wrapper/setup-hook.sh+4−4 pkgs/desktops/plasma-5/plasma-workspace/default.nix+4−7 pkgs/development/compilers/llvm/4/lldb.nix+1−1 pkgs/development/compilers/llvm/5/lldb.nix+1−1 pkgs/development/compilers/llvm/6/lldb.nix+1−1 pkgs/development/compilers/llvm/7/lldb.nix+13−8 pkgs/development/compilers/llvm/8/lldb.nix+1−1 pkgs/development/compilers/nextpnr/default.nix+5−10 pkgs/development/interpreters/python/default.nix+4−4 pkgs/development/libraries/SDL/default.nix+1−6 pkgs/development/libraries/SDL2/default.nix+2−6 pkgs/development/libraries/cutelyst/default.nix+2−8 pkgs/development/libraries/ffmpeg-full/default.nix+2−10 pkgs/development/libraries/fltk/1.4.nix+14−18 pkgs/development/libraries/fltk/default.nix+13−18 pkgs/development/libraries/glfw/3.x.nix+3−8 pkgs/development/libraries/glib/default.nix−3 pkgs/development/libraries/gsettings-qt/default.nix+5−1 pkgs/development/libraries/kde-frameworks/default.nix+3−12 pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh+59−5 pkgs/development/libraries/kde-frameworks/kinit/default.nix+1−3 pkgs/development/libraries/libgdata/default.nix+57−8 pkgs/development/libraries/libgdata/installed-tests-path.patch+94 pkgs/development/libraries/librime/default.nix+3−3 pkgs/development/libraries/libui/default.nix+2−2 pkgs/development/libraries/libxkbcommon/default.nix+4−11 pkgs/development/libraries/libyaml/default.nix+4−21 pkgs/development/libraries/opencv/3.x.nix+2−2 pkgs/development/libraries/opencv/4.x.nix+2−2 pkgs/development/libraries/opencv/default.nix+2−2 pkgs/development/libraries/pcl/default.nix+2−2 pkgs/development/libraries/qt-4.x/4.8/default.nix+2−2 pkgs/development/libraries/qt-5/5.11/default.nix+27−17 pkgs/development/libraries/qt-5/5.12/default.nix+27−17 pkgs/development/libraries/qt-5/5.6/default.nix+23−12 pkgs/development/libraries/qt-5/5.9/default.nix+24−15 pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh+12−10 pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh+106 pkgs/development/libraries/qt-5/mkDerivation.nix+5−3 pkgs/development/libraries/qt-5/modules/qtbase.nix−2 pkgs/development/libraries/qt-5/modules/qtconnectivity.nix+2−2 pkgs/development/libraries/qt-5/modules/qtmacextras.nix+2−4 pkgs/development/libraries/qt-5/modules/qtspeech.nix+1−1 pkgs/development/libraries/qt-5/modules/qtwebengine.nix−8 pkgs/development/libraries/qt-5/modules/qtwebkit.nix+1−1 pkgs/development/libraries/qt-5/modules/qtwebview.nix+2−8 pkgs/development/libraries/sfml/default.nix+2−5 pkgs/development/libraries/tk/generic.nix+2−4 pkgs/development/libraries/vtk/default.nix+8−8 pkgs/development/libraries/wxwidgets/3.0/mac.nix+2−9 pkgs/development/python-modules/numpy/default.nix+3−1 pkgs/development/python-modules/pytest/default.nix+2−1 pkgs/development/python-modules/watchdog/default.nix+1−1 pkgs/development/r-modules/wrapper-rstudio.nix+5−4 pkgs/development/tools/analysis/flow/default.nix+2−2 pkgs/development/tools/analysis/hopper/default.nix+12−14 pkgs/development/tools/cargo-web/default.nix+2−6 pkgs/development/tools/qtcreator/default.nix+8−8 pkgs/development/tools/tora/default.nix+3−4 pkgs/development/tools/watchman/default.nix+12−13 pkgs/games/chessx/default.nix−3 pkgs/games/flightgear/default.nix+4−5 pkgs/games/gargoyle/default.nix+2−2 pkgs/games/nethack/default.nix+6−7 pkgs/misc/emulators/dolphin-emu/master.nix+2−2 pkgs/misc/emulators/mgba/default.nix+2−4 pkgs/misc/jackaudio/default.nix+2−2 pkgs/os-specific/darwin/cf-private/setup-hook.sh → pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh+3−6 pkgs/os-specific/darwin/apple-sdk/default.nix+6−2 pkgs/os-specific/darwin/apple-sdk/frameworks.nix+40−39 pkgs/os-specific/darwin/cf-private/default.nix−58 pkgs/os-specific/darwin/trash/default.nix+2−7 pkgs/os-specific/linux/apparmor/cross.patch+19 pkgs/os-specific/linux/apparmor/default.nix+4−2 pkgs/servers/x11/quartz-wm/default.nix+1−3 pkgs/servers/x11/xorg/overrides.nix+2−6 pkgs/servers/x11/xquartz/default.nix+1−6 pkgs/tools/graphics/nifskope/default.nix+4−8 pkgs/tools/misc/contacts/default.nix+2−7 pkgs/tools/misc/noti/default.nix+2−2 pkgs/tools/misc/partition-manager/default.nix+3−7 pkgs/tools/misc/watchexec/default.nix+1−5 pkgs/tools/misc/yubikey-manager-qt/default.nix+13−22 pkgs/tools/security/keybase/default.nix+2−6 pkgs/tools/security/nitrokey-app/default.nix+3−8 pkgs/tools/security/pinentry/mac.nix+2−7 pkgs/tools/text/mdbook/default.nix+1−5 pkgs/tools/video/atomicparsley/default.nix+2−6 pkgs/top-level/all-packages.nix+13−56 pkgs/top-level/darwin-packages.nix+6−3
doc/languages-frameworks/qt.xml+167−65
@@ -4,71 +4,173 @@
44 <title>Qt</title>
55
66 <para>
7− Qt is a comprehensive desktop and mobile application development toolkit for
8− C++. Legacy support is available for Qt 3 and Qt 4, but all current
9− development uses Qt 5. The Qt 5 packages in Nixpkgs are updated frequently to
10− take advantage of new features, but older versions are typically retained
11− until their support window ends. The most important consideration in
12− packaging Qt-based software is ensuring that each package and all its
13− dependencies use the same version of Qt 5; this consideration motivates most
14− of the tools described below.
7+ This section describes the differences between Nix expressions for Qt
8+ libraries and applications and Nix expressions for other C++ software. Some
9+ knowledge of the latter is assumed. There are primarily two problems which
10+ the Qt infrastructure is designed to address: ensuring consistent versioning
11+ of all dependencies and finding dependencies at runtime.
1512 </para>
1613
17− <section xml:id="ssec-qt-libraries">
18− <title>Packaging Libraries for Nixpkgs</title>
19−
20− <para>
21− Whenever possible, libraries that use Qt 5 should be built with each
22− available version. Packages providing libraries should be added to the
23− top-level function <varname>mkLibsForQt5</varname>, which is used to build a
24− set of libraries for every Qt 5 version. A special
25− <varname>callPackage</varname> function is used in this scope to ensure that
26− the entire dependency tree uses the same Qt 5 version. Import dependencies
27− unqualified, i.e., <literal>qtbase</literal> not
28− <literal>qt5.qtbase</literal>. <emphasis>Do not</emphasis> import a package
29− set such as <literal>qt5</literal> or <literal>libsForQt5</literal>.
30− </para>
31−
32− <para>
33− If a library does not support a particular version of Qt 5, it is best to
34− mark it as broken by setting its <literal>meta.broken</literal> attribute. A
35− package may be marked broken for certain versions by testing the
36− <literal>qtbase.version</literal> attribute, which will always give the
37− current Qt 5 version.
38− </para>
39− </section>
40−
41− <section xml:id="ssec-qt-applications">
42− <title>Packaging Applications for Nixpkgs</title>
43−
44− <para>
45− Call your application expression using
46− <literal>libsForQt5.callPackage</literal> instead of
47− <literal>callPackage</literal>. Import dependencies unqualified, i.e.,
48− <literal>qtbase</literal> not <literal>qt5.qtbase</literal>. <emphasis>Do
49− not</emphasis> import a package set such as <literal>qt5</literal> or
50− <literal>libsForQt5</literal>.
51− </para>
52−
53− <para>
54− Qt 5 maintains strict backward compatibility, so it is generally best to
55− build an application package against the latest version using the
56− <varname>libsForQt5</varname> library set. In case a package does not build
57− with the latest Qt version, it is possible to pick a set pinned to a
58− particular version, e.g. <varname>libsForQt55</varname> for Qt 5.5, if that
59− is the latest version the package supports. If a package must be pinned to
60− an older Qt version, be sure to file a bug upstream; because Qt is strictly
61− backwards-compatible, any incompatibility is by definition a bug in the
62− application.
63− </para>
64−
65− <para>
66− When testing applications in Nixpkgs, it is a common practice to build the
67− package with <literal>nix-build</literal> and run it using the created
68− symbolic link. This will not work with Qt applications, however, because
69− they have many hard runtime requirements that can only be guaranteed if the
70− package is actually installed. To test a Qt application, install it with
71− <literal>nix-env</literal> or run it inside <literal>nix-shell</literal>.
72− </para>
73− </section>
14+ <example xml:id='qt-default-nix'>
15+ <title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
16+ <programlisting>
17+{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
18+
19+mkDerivation { <co xml:id='qt-default-nix-co-2' />
20+ pname = "myapp";
21+ version = "1.0";
22+
23+ buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
24+}
25+ </programlisting>
26+ </example>
27+
28+ <calloutlist>
29+ <callout arearefs='qt-default-nix-co-1'>
30+ <para>
31+ Import <literal>mkDerivation</literal> and Qt (such as
32+ <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis>
33+ import Qt package sets; the Qt versions of dependencies may not be
34+ coherent, causing build and runtime failures.
35+ </para>
36+ </callout>
37+ <callout arearefs='qt-default-nix-co-2'>
38+ <para>
39+ Use <literal>mkDerivation</literal> instead of
40+ <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal>
41+ is a wrapper around <literal>stdenv.mkDerivation</literal> which
42+ applies some Qt-specific settings.
43+ This deriver accepts the same arguments as
44+ <literal>stdenv.mkDerivation</literal>; refer to
45+ <xref linkend='chap-stdenv' /> for details.
46+ </para>
47+ <para>
48+ To use another deriver instead of
49+ <literal>stdenv.mkDerivation</literal>, use
50+ <literal>mkDerivationWith</literal>:
51+<programlisting>
52+mkDerivationWith myDeriver {
53+ # ...
54+}
55+</programlisting>
56+ If you cannot use <literal>mkDerivationWith</literal>, please refer to
57+ <xref linkend='qt-runtime-dependencies' />.
58+ </para>
59+ </callout>
60+ <callout arearefs='qt-default-nix-co-3'>
61+ <para>
62+ <literal>mkDerivation</literal> accepts the same arguments as
63+ <literal>stdenv.mkDerivation</literal>, such as
64+ <literal>buildInputs</literal>.
65+ </para>
66+ </callout>
67+ </calloutlist>
68+
69+ <formalpara xml:id='qt-runtime-dependencies'>
70+ <title>Locating runtime dependencies</title>
71+ <para>
72+ Qt applications need to be wrapped to find runtime dependencies. If you
73+ cannot use <literal>mkDerivation</literal> or
74+ <literal>mkDerivationWith</literal> above, include
75+ <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
76+<programlisting>
77+stdenv.mkDerivation {
78+ # ...
79+
80+ nativeBuildInputs = [ wrapQtAppsHook ];
81+}
82+</programlisting>
83+ </para>
84+ </formalpara>
85+
86+ <para>
87+ Entries added to <literal>qtWrapperArgs</literal> are used to modify the
88+ wrappers created by <literal>wrapQtAppsHook</literal>. The entries are
89+ passed as arguments to <xref linkend='fun-wrapProgram' />.
90+<programlisting>
91+mkDerivation {
92+ # ...
93+
94+ qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
95+}
96+</programlisting>
97+ </para>
98+
99+ <para>
100+ Set <literal>dontWrapQtApps</literal> to stop applications from being
101+ wrapped automatically. It is required to wrap applications manually with
102+ <literal>wrapQtApp</literal>, using the syntax of
103+ <xref linkend='fun-wrapProgram' />:
104+<programlisting>
105+mkDerivation {
106+ # ...
107+
108+ dontWrapQtApps = true;
109+ preFixup = ''
110+ wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
111+ '';
112+}
113+</programlisting>
114+ </para>
115+
116+ <para>
117+ Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal>
118+ attribute to disable the package for unsupported Qt versions:
119+<programlisting>
120+mkDerivation {
121+ # ...
122+
123+ # Disable this library with Qt &lt; 5.9.0
124+ meta.broken = builtins.compareVersions qtbase.version "5.9.0" &lt; 0;
125+}
126+</programlisting>
127+ </para>
128+
129+ <formalpara>
130+ <title>Adding a library to Nixpkgs</title>
131+ <para>
132+ Add a Qt library to <filename>all-packages.nix</filename> by adding it to the
133+ collection inside <literal>mkLibsForQt5</literal>. This ensures that the
134+ library is built with every available version of Qt as needed.
135+ <example xml:id='qt-library-all-packages-nix'>
136+ <title>Adding a Qt library to <filename>all-packages.nix</filename></title>
137+<programlisting>
138+{
139+ # ...
140+
141+ mkLibsForQt5 = self: with self; {
142+ # ...
143+
144+ mylib = callPackage ../path/to/mylib {};
145+ };
146+
147+ # ...
148+}
149+</programlisting>
150+ </example>
151+ </para>
152+ </formalpara>
153+
154+ <formalpara>
155+ <title>Adding an application to Nixpkgs</title>
156+ <para>
157+ Add a Qt application to <filename>all-packages.nix</filename> using
158+ <literal>libsForQt5.callPackage</literal> instead of the usual
159+ <literal>callPackage</literal>. The former ensures that all dependencies
160+ are built with the same version of Qt.
161+ <example xml:id='qt-application-all-packages-nix'>
162+ <title>Adding a Qt application to <filename>all-packages.nix</filename></title>
163+<programlisting>
164+{
165+ # ...
166+
167+ myapp = libsForQt5.callPackage ../path/to/myapp/ {};
168+
169+ # ...
170+}
171+</programlisting>
172+ </example>
173+ </para>
174+ </formalpara>
175+
74176</section>
nixos/modules/services/x11/desktop-managers/plasma5.nix+2−2
@@ -64,8 +64,8 @@ in
6464 };
6565
6666 security.wrappers = {
67− kcheckpass.source = "${lib.getBin plasma5.kscreenlocker}/lib/libexec/kcheckpass";
68− "start_kdeinit".source = "${lib.getBin pkgs.kinit}/lib/libexec/kf5/start_kdeinit";
67+ kcheckpass.source = "${lib.getBin plasma5.kscreenlocker}/libexec/kcheckpass";
68+ "start_kdeinit".source = "${lib.getBin pkgs.kinit}/libexec/kf5/start_kdeinit";
6969 kwin_wayland = {
7070 source = "${lib.getBin plasma5.kwin}/bin/kwin_wayland";
7171 capabilities = "cap_sys_nice+ep";
pkgs/applications/altcoins/bitcoin.nix+9−6
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck
2−, zlib, miniupnpc, qtbase ? null, qttools ? null, utillinux, protobuf, python3, qrencode, libevent
2+, zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, protobuf, python3, qrencode, libevent
33, withGui }:
44
55with stdenv.lib;
@@ -14,7 +14,9 @@ stdenv.mkDerivation rec{
1414 sha256 = "5e4e6890e07b620a93fdb24605dae2bb53e8435b2a93d37558e1db1913df405f";
1515 };
1616
17− nativeBuildInputs = [ pkgconfig autoreconfHook ];
17+ nativeBuildInputs =
18+ [ pkgconfig autoreconfHook ]
19+ ++ optional withGui wrapQtAppsHook;
1820 buildInputs = [ openssl db48 boost zlib zeromq
1921 miniupnpc protobuf libevent]
2022 ++ optionals stdenv.isLinux [ utillinux ]
@@ -34,10 +36,11 @@ stdenv.mkDerivation rec{
3436
3537 doCheck = true;
3638
37− # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
38− # See also https://github.com/NixOS/nixpkgs/issues/24256
39− checkFlags = optionals withGui [ "QT_PLUGIN_PATH=${qtbase}/lib/qt-5.${versions.minor qtbase.version}/plugins" ]
40− ++ [ "LC_ALL=C.UTF-8" ];
39+ checkFlags =
40+ [ "LC_ALL=C.UTF-8" ]
41+ # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
42+ # See also https://github.com/NixOS/nixpkgs/issues/24256
43+ ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
4144
4245 enableParallelBuilding = true;
4346
pkgs/applications/altcoins/monero-gui/default.nix+3−8
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub
2−, makeWrapper, makeDesktopItem
2+, wrapQtAppsHook, makeDesktopItem
33, qtbase, qmake, qtmultimedia, qttools
44, qtgraphicaleffects, qtdeclarative
55, qtlocation, qtquickcontrols, qtquickcontrols2
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
3434 sha256 = "0ilx47771faygf97wilm64xnqxgxa3b43q0g9v014npk0qj8pc31";
3535 };
3636
37− nativeBuildInputs = [ qmake pkgconfig ];
37+ nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
3838
3939 buildInputs = [
4040 qtbase qtmultimedia qtgraphicaleffects
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
4343 qtwebchannel qtwebengine qtx11extras
4444 qtxmlpatterns monero unbound readline
4545 boost libunwind libsodium pcsclite zeromq
46− cppzmq makeWrapper hidapi
46+ cppzmq hidapi
4747 ];
4848
4949 patches = [
@@ -94,11 +94,6 @@ stdenv.mkDerivation rec {
9494 cp $src/images/appicons/$size.png \
9595 $out/share/icons/hicolor/$size/apps/monero.png
9696 done;
97−
98− # wrap runtime dependencies
99− wrapProgram $out/bin/monero-wallet-gui \
100− --set QML2_IMPORT_PATH "${qml2ImportPath}" \
101− --set QT_PLUGIN_PATH "${qtbase.bin}/${qtbase.qtPluginPrefix}"
10297 '';
10398
10499 meta = {
pkgs/applications/audio/carla/default.nix+8−5
@@ -1,7 +1,7 @@
11{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, jack2,
22 liblo, libpulseaudio, libsndfile, pkgconfig, python3Packages,
33 which, withFrontend ? true,
4− withQt ? true, qtbase ? null,
4+ withQt ? true, qtbase ? null, wrapQtAppsHook ? null,
55 withGtk2 ? true, gtk2 ? null,
66 withGtk3 ? true, gtk3 ? null }:
77
@@ -9,6 +9,7 @@ with stdenv.lib;
99
1010assert withFrontend -> python3Packages ? pyqt5;
1111assert withQt -> qtbase != null;
12+assert withQt -> wrapQtAppsHook != null;
1213assert withGtk2 -> gtk2 != null;
1314assert withGtk3 -> gtk3 != null;
1415
@@ -23,7 +24,9 @@ stdenv.mkDerivation rec {
2324 sha256 = "0fqgncqlr86n38yy7pa118mswfacmfczj7w9xx6c6k0jav3wk29k";
2425 };
2526
26− nativeBuildInputs = [ python3Packages.wrapPython pkgconfig which ];
27+ nativeBuildInputs = [
28+ python3Packages.wrapPython pkgconfig which wrapQtAppsHook
29+ ];
2730
2831 pythonPath = with python3Packages; [
2932 rdflib pyliblo
@@ -38,6 +41,7 @@ stdenv.mkDerivation rec {
3841
3942 installFlags = [ "PREFIX=$(out)" ];
4043
44+ dontWrapQtApps = true;
4145 postFixup = ''
4246 # Also sets program_PYTHONPATH and program_PATH variables
4347 wrapPythonPrograms
@@ -48,10 +52,9 @@ stdenv.mkDerivation rec {
4852 patchPythonScript "$out/share/carla/carla_settings.py"
4953
5054 for program in $out/bin/*; do
51− wrapProgram "$program" \
55+ wrapQtApp "$program" \
5256 --prefix PATH : "$program_PATH:${which}/bin" \
53− --set PYTHONNOUSERSITE true \
54− --prefix QT_PLUGIN_PATH : "${qtbase.bin}/${qtbase.qtPluginPrefix}"
57+ --set PYTHONNOUSERSITE true
5558 done
5659 '';
5760
pkgs/applications/audio/kid3/default.nix+3−6
@@ -3,7 +3,7 @@
33, chromaprint, docbook_xml_dtd_45, docbook_xsl, libxslt
44, id3lib, taglib, mp4v2, flac, libogg, libvorbis
55, zlib, readline , qtbase, qttools, qtmultimedia, qtquickcontrols
6−, makeWrapper
6+, wrapQtAppsHook
77}:
88
99stdenv.mkDerivation rec {
@@ -16,11 +16,12 @@ stdenv.mkDerivation rec {
1616 sha256 = "0xkrsjrbr3z8cn8hjf623l28r3b755gr11i0clv8d8i3s10vhbd8";
1717 };
1818
19+ nativeBuildInputs = [ wrapQtAppsHook ];
1920 buildInputs = with stdenv.lib;
2021 [ pkgconfig cmake python ffmpeg phonon automoc4
2122 chromaprint docbook_xml_dtd_45 docbook_xsl libxslt
2223 id3lib taglib mp4v2 flac libogg libvorbis zlib readline
23− qtbase qttools qtmultimedia qtquickcontrols makeWrapper ];
24+ qtbase qttools qtmultimedia qtquickcontrols ];
2425
2526 cmakeFlags = [ "-DWITH_APPS=Qt;CLI" ];
2627 NIX_LDFLAGS = "-lm -lpthread";
@@ -29,10 +30,6 @@ stdenv.mkDerivation rec {
2930 export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
3031 '';
3132
32− postInstall = ''
33− wrapProgram $out/bin/kid3-qt --prefix QT_PLUGIN_PATH : $out/lib/qt5/plugins
34− '';
35−
3633 enableParallelBuilding = true;
3734
3835 meta = with stdenv.lib; {
pkgs/applications/editors/emacs/25.nix+2−6
@@ -1,7 +1,7 @@
11{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
22, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
33, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
4−, alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO
4+, alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO
55, withX ? !stdenv.isDarwin
66, withGTK2 ? false, gtk2 ? null
77, withGTK3 ? true, gtk3 ? null, gsettings-desktop-schemas ? null
@@ -62,11 +62,7 @@ stdenv.mkDerivation rec {
6262 ++ lib.optionals (withX && withGTK3) [ gtk3 gsettings-desktop-schemas ]
6363 ++ lib.optional (stdenv.isDarwin && withX) cairo
6464 ++ lib.optionals (withX && withXwidgets) [ webkitgtk24x-gtk3 glib-networking ]
65− ++ lib.optionals stdenv.isDarwin [
66− AppKit GSS ImageIO
67− # Needed for CFNotificationCenterAddObserver symbols.
68− cf-private
69− ];
65+ ++ lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ];
7066
7167 hardeningDisable = [ "format" ];
7268
pkgs/applications/editors/emacs/default.nix+2−6
@@ -1,7 +1,7 @@
11{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm
22, Xaw3d, libXcursor, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
33, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
4−, alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO, m17n_lib, libotf
4+, alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
55, systemd ? null
66, withX ? !stdenv.isDarwin
77, withNS ? stdenv.isDarwin
@@ -67,11 +67,7 @@ stdenv.mkDerivation rec {
6767 ++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ]
6868 ++ lib.optional (stdenv.isDarwin && withX) cairo
6969 ++ lib.optionals (withX && withXwidgets) [ webkitgtk ]
70− ++ lib.optionals withNS [
71− AppKit GSS ImageIO
72− # Needed for CFNotificationCenterAddObserver symbols.
73− cf-private
74− ];
70+ ++ lib.optionals withNS [ AppKit GSS ImageIO ];
7571
7672 hardeningDisable = [ "format" ];
7773
pkgs/applications/editors/emacs/macport.nix+1−3
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls, gettext, autoconf, automake
2−, cf-private, AppKit, Carbon, Cocoa, IOKit, OSAKit, Quartz, QuartzCore, WebKit
2+, AppKit, Carbon, Cocoa, IOKit, OSAKit, Quartz, QuartzCore, WebKit
33, ImageCaptureCore, GSS, ImageIO # These may be optional
44}:
55
@@ -33,8 +33,6 @@ stdenv.mkDerivation rec {
3333 buildInputs = [ ncurses libxml2 gnutls texinfo gettext
3434 AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit
3535 ImageCaptureCore GSS ImageIO # may be optional
36− # Needed for CFNotificationCenterAddObserver symbols.
37− cf-private
3836 ];
3937
4038 postUnpack = ''
pkgs/applications/editors/kdevelop5/kdevelop.nix+3−2
@@ -43,6 +43,8 @@ mkDerivation rec {
4343 "-DCLANG_BUILTIN_DIR=${llvmPackages.clang-unwrapped}/lib/clang/${(builtins.parseDrvName llvmPackages.clang.name).version}/include"
4444 ];
4545
46+ dontWrapQtApps = true;
47+
4648 postPatch = ''
4749 # FIXME: temporary until https://invent.kde.org/kde/kdevelop/merge_requests/8 is merged
4850 substituteInPlace kdevplatform/language/backgroundparser/parsejob.cpp --replace \
@@ -55,8 +57,7 @@ mkDerivation rec {
5557 wrapProgram "$out/bin/kdevelop!" \
5658 --prefix PATH ":" "${lib.makeBinPath [ qttools kde-cli-tools ]}"
5759
58− wrapProgram "$out/bin/kdevelop" \
59− --prefix QT_PLUGIN_PATH : $out/lib/qt-${qtVersion}/plugins
60+ wrapQtApp "$out/bin/kdevelop"
6061
6162 # Fix the (now wrapped) kdevelop! to find things in right places:
6263 # - Fixup the one use where KDEV_BASEDIR is assumed to contain kdevelop.
pkgs/applications/editors/vim/configurable.nix+2−2
@@ -10,7 +10,7 @@
1010, runtimeShell
1111
1212# apple frameworks
13−, CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private
13+, CoreServices, CoreData, Cocoa, Foundation, libobjc
1414
1515, features ? "huge" # One of tiny, small, normal, big or huge
1616, wrapPythonDrv ? false
@@ -132,7 +132,7 @@ in stdenv.mkDerivation rec {
132132 libXmu glib libICE ]
133133 ++ stdenv.lib.optional (guiSupport == "gtk2") gtk2-x11
134134 ++ stdenv.lib.optional (guiSupport == "gtk3") gtk3-x11
135− ++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc cf-private ]
135+ ++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]
136136 ++ stdenv.lib.optional luaSupport lua
137137 ++ stdenv.lib.optional pythonSupport python
138138 ++ stdenv.lib.optional tclSupport tcl
pkgs/applications/editors/vim/default.nix+2−6
@@ -6,7 +6,7 @@
66 sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c";
77 }
88# apple frameworks
9−, cf-private, Carbon, Cocoa
9+, Carbon, Cocoa
1010}:
1111
1212let
@@ -19,11 +19,7 @@ stdenv.mkDerivation rec {
1919
2020 nativeBuildInputs = [ gettext pkgconfig ];
2121 buildInputs = [ ncurses ]
22− ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [
23− Carbon Cocoa
24− # Needed for OBJC_CLASS_$_NSArray symbols.
25− cf-private
26− ];
22+ ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ];
2723
2824 configureFlags = [
2925 "--enable-multibyte"
pkgs/applications/gis/openorienteering-mapper/default.nix+3−5
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools
2− , qtlocation, qtsensors, doxygen, cups, makeWrapper, qtimageformats
2+, qtlocation, qtsensors, doxygen, cups, wrapQtAppsHook, qtimageformats
33}:
44
55stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
99 buildInputs = [ gdal qtbase qttools qtlocation qtimageformats
1010 qtsensors clipper zlib proj doxygen cups];
1111
12− nativeBuildInputs = [ cmake makeWrapper ninja ];
12+ nativeBuildInputs = [ cmake wrapQtAppsHook ninja ];
1313
1414 src = fetchFromGitHub {
1515 owner = "OpenOrienteering";
@@ -48,9 +48,7 @@ stdenv.mkDerivation rec {
4848 stdenv.lib.optionalString stdenv.isDarwin ''
4949 # Fixes "This application failed to start because it could not find or load the Qt
5050 # platform plugin "cocoa"."
51− wrapProgram $out/Mapper.app/Contents/MacOS/Mapper \
52− --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
53− --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtimageformats}/${qtbase.qtPluginPrefix}
51+ wrapQtApp $out/Mapper.app/Contents/MacOS/Mapper
5452 mkdir -p $out/bin
5553 ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
5654 '';
pkgs/applications/graphics/gimp/default.nix+2−4
@@ -3,7 +3,7 @@
33, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
44, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
55, harfbuzz, mypaint-brushes, libwebp, libheif, libgudev, openexr
6−, AppKit, Cocoa, gtk-mac-integration-gtk2, cf-private }:
6+, AppKit, Cocoa, gtk-mac-integration-gtk2 }:
77
88let
99 inherit (python2Packages) pygtk wrapPython python;
@@ -24,9 +24,7 @@ in stdenv.mkDerivation rec {
2424 libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp libheif
2525 python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes
2626 ] ++ stdenv.lib.optionals stdenv.isDarwin [
27− # cf-private is needed to get some things not in swift-corefoundation.
28− # For instance _OBJC_CLASS_$_NSArray is missing.
29− AppKit Cocoa gtk-mac-integration-gtk2 cf-private
27+ AppKit Cocoa gtk-mac-integration-gtk2
3028 ] ++ stdenv.lib.optionals stdenv.isLinux [ libgudev ];
3129
3230 pythonPath = [ pygtk ];
pkgs/applications/graphics/ktikz/default.nix+3−7
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub, fetchpatch
2−, pkgconfig, makeWrapper
2+, pkgconfig, wrapQtAppsHook
33, poppler, qt5, gnuplot
44}:
55
@@ -36,9 +36,9 @@ stdenv.mkDerivation rec {
3636 })
3737 ];
3838
39+ nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake wrapQtAppsHook ];
3940 QT_PLUGIN_PATH = "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}";
4041
41− nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake makeWrapper ];
4242 buildInputs = [ qt5.qtbase poppler ];
4343 enableParallelBuilding = true;
4444
@@ -50,9 +50,5 @@ stdenv.mkDerivation rec {
5050 "QCOLLECTIONGENERATORCOMMAND=qhelpgenerator"
5151 ];
5252
53− postFixup = ''
54− wrapProgram "$out/bin/qtikz" \
55− --prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" \
56− --prefix PATH : "${gnuplot}/bin"
57− '';
53+ qtWrapperArgs = [ ''--prefix PATH : "${gnuplot}/bin"'' ];
5854}
pkgs/applications/kde/ark/default.nix+20−18
@@ -1,37 +1,39 @@
11{
2− mkDerivation, lib, makeWrapper,
2+ mkDerivation, lib, config,
33
44 extra-cmake-modules, kdoctools,
55
6− karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, kitemmodels,
7− khtml, kio, kparts, kpty, kservice, kwidgetsaddons, libarchive,
6+ breeze-icons, karchive, kconfig, kcrash, kdbusaddons, ki18n,
7+ kiconthemes, kitemmodels, khtml, kio, kparts, kpty, kservice, kwidgetsaddons,
8+
9+ libarchive, libzip,
810
911 # Archive tools
10− p7zip, unzip, zip,
12+ p7zip, lrzip,
1113
1214 # Unfree tools
1315 unfreeEnableUnrar ? false, unrar,
1416}:
1517
18+let
19+ extraTools = [ p7zip lrzip ] ++ lib.optional unfreeEnableUnrar unrar;
20+in
21+
1622mkDerivation {
1723 name = "ark";
18− nativeBuildInputs = [ extra-cmake-modules kdoctools makeWrapper ];
19− propagatedBuildInputs = [
20− karchive kconfig kcrash kdbusaddons khtml ki18n kiconthemes kio kitemmodels
21− kparts kpty kservice kwidgetsaddons libarchive
22− ];
23− outputs = [ "out" "dev" ];
24− postFixup =
25− let
26− PATH =
27− lib.makeBinPath
28− ([ p7zip unzip zip ] ++ lib.optional unfreeEnableUnrar unrar);
29− in ''
30− wrapProgram "$out/bin/ark" --prefix PATH : "${PATH}"
31− '';
3224 meta = {
3325 license = with lib.licenses;
3426 [ gpl2 lgpl3 ] ++ lib.optional unfreeEnableUnrar unfree;
3527 maintainers = [ lib.maintainers.ttuegel ];
3628 };
29+
30+ outputs = [ "out" "dev" ];
31+ nativeBuildInputs = [ extra-cmake-modules kdoctools ];
32+ buildInputs = [ libarchive libzip ] ++ extraTools;
33+ propagatedBuildInputs = [
34+ breeze-icons karchive kconfig kcrash kdbusaddons khtml ki18n kiconthemes kio
35+ kitemmodels kparts kpty kservice kwidgetsaddons
36+ ];
37+
38+ qtWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath extraTools) ];
3739}
pkgs/applications/kde/okular.nix+6−6
@@ -1,18 +1,18 @@
11{
22 stdenv, mkDerivation, lib,
33 extra-cmake-modules, kdoctools,
4− chmlib ? null, discount, djvulibre, ebook_tools, kactivities, karchive, kbookmarks,
5− kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
6− kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts, kpty, kwallet,
7− kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler, qca-qt5,
8− qtdeclarative, qtsvg, threadweaver, kcrash
4+ breeze-icons, chmlib ? null, discount, djvulibre, ebook_tools, kactivities,
5+ karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
6+ kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts,
7+ kpty, kwallet, kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler,
8+ qca-qt5, qtdeclarative, qtsvg, threadweaver, kcrash
99}:
1010
1111mkDerivation {
1212 name = "okular";
1313 nativeBuildInputs = [ extra-cmake-modules kdoctools ];
1414 buildInputs = [
15− discount djvulibre ebook_tools kactivities karchive kbookmarks
15+ breeze-icons discount djvulibre ebook_tools kactivities karchive kbookmarks
1616 kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
1717 kdegraphics-mobipocket kiconthemes kjs khtml kio kparts kpty kwallet
1818 kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5
pkgs/applications/misc/alacritty/default.nix+1−7
@@ -24,9 +24,7 @@
2424 wayland,
2525
2626 # Darwin Frameworks
27− cf-private,
2827 AppKit,
29− CoreFoundation,
3028 CoreGraphics,
3129 CoreServices,
3230 CoreText,
@@ -74,11 +72,7 @@ in buildRustPackage rec {
7472 ];
7573
7674 buildInputs = rpathLibs
77− ++ lib.optionals stdenv.isDarwin [
78− AppKit CoreFoundation CoreGraphics CoreServices CoreText Foundation OpenGL
79− # Needed for CFURLResourceIsReachable symbols.
80− cf-private
81− ];
75+ ++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
8276
8377 outputs = [ "out" "terminfo" ];
8478
pkgs/applications/misc/albert/default.nix−5
@@ -37,11 +37,6 @@ mkDerivation rec {
3737 rm "$out/lib"
3838 '';
3939
40− postInstall = ''
41− wrapProgram $out/bin/albert \
42− --prefix XDG_DATA_DIRS : $out/share
43− '';
44−
4540 meta = with lib; {
4641 homepage = https://albertlauncher.github.io/;
4742 description = "Desktop agnostic launcher";
pkgs/applications/misc/aminal/default.nix+1−7
@@ -2,7 +2,6 @@
22, Carbon
33, Cocoa
44, Kernel
5−, cf-private
65, fetchFromGitHub
76, lib
87, mesa_glu
@@ -25,12 +24,7 @@ buildGoPackage rec {
2524 xorg.libXinerama
2625 xorg.libXrandr
2726 xorg.libXxf86vm
28− ] ++ lib.optionals stdenv.isDarwin [
29− Carbon
30− Cocoa
31− Kernel
32− cf-private /* Needed for NSDefaultRunLoopMode */
33− ];
27+ ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ];
3428
3529 src = fetchFromGitHub {
3630 owner = "liamg";
pkgs/applications/misc/electron-cash/default.nix+2−6
@@ -1,4 +1,4 @@
1−{ lib, fetchurl, python3Packages, qtbase, makeWrapper }:
1+{ lib, fetchurl, python3Packages, qtbase, wrapQtAppsHook }:
22
33python3Packages.buildPythonApplication rec {
44 pname = "electron-cash";
@@ -32,7 +32,7 @@ python3Packages.buildPythonApplication rec {
3232 btchip
3333 ];
3434
35− nativeBuildInputs = [ makeWrapper ];
35+ nativeBuildInputs = [ wrapQtAppsHook ];
3636
3737 postPatch = ''
3838 substituteInPlace contrib/requirements/requirements.txt \
@@ -54,10 +54,6 @@ python3Packages.buildPythonApplication rec {
5454 postInstall = ''
5555 substituteInPlace $out/share/applications/electron-cash.desktop \
5656 --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
57−
58− # Please remove this when #44047 is fixed
59− wrapProgram $out/bin/electron-cash \
60− --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
6157 '';
6258
6359 doInstallCheck = true;
pkgs/applications/misc/keepassx/community.nix+4−5
@@ -17,6 +17,7 @@
1717, qtsvg
1818, qtx11extras
1919, quazip
20+, wrapQtAppsHook
2021, yubikey-personalization
2122, zlib
2223
@@ -73,12 +74,11 @@ stdenv.mkDerivation rec {
7374 doCheck = true;
7475 checkPhase = ''
7576 export LC_ALL="en_US.UTF-8"
76− export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}"
7777 export QT_QPA_PLATFORM=offscreen
7878 make test ARGS+="-E testgui --output-on-failure"
7979 '';
8080
81− nativeBuildInputs = [ cmake makeWrapper qttools ];
81+ nativeBuildInputs = [ cmake wrapQtAppsHook qttools ];
8282
8383 buildInputs = [
8484 curl
@@ -102,10 +102,9 @@ stdenv.mkDerivation rec {
102102 ++ stdenv.lib.optional withKeePassKeeShareSecure quazip
103103 ++ stdenv.lib.optional stdenv.isDarwin qtmacextras;
104104
105− postInstall = optionalString stdenv.isDarwin ''
105+ preFixup = optionalString stdenv.isDarwin ''
106106 # Make it work without Qt in PATH.
107− wrapProgram $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC \
108− --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}
107+ wrapQtApp $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC
109108 '';
110109
111110 meta = {
pkgs/applications/misc/kitty/default.nix−2
@@ -9,7 +9,6 @@
99 IOKit,
1010 Kernel,
1111 OpenGL,
12− cf-private,
1312 libicns,
1413 libpng,
1514 librsvg,
@@ -40,7 +39,6 @@ buildPythonApplication rec {
4039 IOKit
4140 Kernel
4241 OpenGL
43− cf-private
4442 libpng
4543 python3
4644 zlib
pkgs/applications/misc/masterpdfeditor/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, makeWrapper }:
1+{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, wrapQtAppsHook }:
22
33let
44 version = "5.4.10";
@@ -11,17 +11,12 @@ in stdenv.mkDerivation {
1111 sha256 = "1902ahb2g9xanrip1n0ihr31az8sv9fsvzddnzf70kbwlfclnqf7";
1212 };
1313
14− nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
14+ nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ];
1515
1616 buildInputs = [ nss qtbase qtsvg sane-backends stdenv.cc.cc ];
1717
1818 dontStrip = true;
1919
20− # Please remove this when #44047 is fixed
21− postInstall = ''
22− wrapProgram $out/bin/masterpdfeditor5 --prefix QT_PLUGIN_PATH : ${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
23− '';
24−
2520 installPhase = ''
2621 runHook preInstall
2722
pkgs/applications/misc/subsurface/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, makeWrapper, pkgconfig, qmake
1+{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkgconfig, qmake
22, curl, grantlee, libgit2, libusb, libssh2, libxml2, libxslt, libzip, zlib
33, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
44}:
@@ -79,18 +79,13 @@ in stdenv.mkDerivation rec {
7979 qtbase qtconnectivity qtsvg qttools qtwebkit
8080 ];
8181
82− nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
82+ nativeBuildInputs = [ cmake wrapQtAppsHook pkgconfig ];
8383
8484 cmakeFlags = [
8585 "-DLIBDC_FROM_PKGCONFIG=ON"
8686 "-DNO_PRINTING=OFF"
8787 ];
8888
89− postInstall = ''
90− wrapProgram $out/bin/subsurface \
91− --prefix QT_PLUGIN_PATH : "${googlemaps}/${googlemaps.pluginsSubdir}"
92− '';
93−
9489 enableParallelBuilding = true;
9590
9691 passthru = { inherit version libdc googlemaps; };
pkgs/applications/misc/synergy/default.nix+2−2
@@ -1,5 +1,5 @@
11{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, xlibsWrapper
2−, ApplicationServices, Carbon, Cocoa, CoreServices, ScreenSaver, cf-private
2+, ApplicationServices, Carbon, Cocoa, CoreServices, ScreenSaver
33, libX11, libXi, libXtst, libXrandr, xinput, curl, openssl, unzip }:
44
55stdenv.mkDerivation rec {
@@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
6464 buildInputs = [
6565 cmake curl openssl
6666 ] ++ lib.optionals stdenv.isDarwin [
67− ApplicationServices Carbon Cocoa CoreServices ScreenSaver cf-private
67+ ApplicationServices Carbon Cocoa CoreServices ScreenSaver
6868 ] ++ lib.optionals stdenv.isLinux [ xlibsWrapper libX11 libXi libXtst libXrandr xinput ];
6969
7070 installPhase = ''
pkgs/applications/misc/xpdf/default.nix+4−7
@@ -1,6 +1,6 @@
11{ enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false
22, stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null
3−, cmake, qtbase ? null, qtsvg ? null, makeWrapper
3+, cmake, qtbase ? null, qtsvg ? null, wrapQtAppsHook
44}:
55
66assert enableGUI -> qtbase != null && qtsvg != null && freetype != null;
@@ -22,7 +22,9 @@ stdenv.mkDerivation {
2222 # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html
2323 patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch;
2424
25− nativeBuildInputs = [ cmake makeWrapper ];
25+ nativeBuildInputs =
26+ [ cmake ]
27+ ++ stdenv.lib.optional enableGUI wrapQtAppsHook;
2628
2729 cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"];
2830
@@ -36,11 +38,6 @@ stdenv.mkDerivation {
3638
3739 hardeningDisable = [ "format" ];
3840
39− postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableGUI) ''
40− wrapProgram $out/bin/xpdf \
41− --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtsvg.bin}/${qtbase.qtPluginPrefix}
42− '';
43−
4441 meta = with stdenv.lib; {
4542 homepage = https://www.xpdfreader.com;
4643 description = "Viewer for Portable Document Format (PDF) files";
pkgs/applications/misc/zola/default.nix+3−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, openssl, CoreServices, cf-private }:
1+{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, openssl, CoreServices }:
22
33rustPlatform.buildRustPackage rec {
44 pname = "zola";
@@ -14,7 +14,8 @@ rustPlatform.buildRustPackage rec {
1414 cargoSha256 = "1brmlg6nqyls1v62z0fg0km150q9m7h71wy67lidcnw76icmqr24";
1515
1616 nativeBuildInputs = [ cmake pkgconfig ];
17− buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices cf-private ];
17+ buildInputs = [ openssl ]
18+ ++ stdenv.lib.optional stdenv.isDarwin CoreServices;
1819
1920 postInstall = ''
2021 install -D -m 444 completions/zola.bash \
pkgs/applications/networking/browsers/qtchan/default.nix+1−6
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
1919 ];
2020
2121 enableParallelBuilding = true;
22− nativeBuildInputs = [ qt.qmake makeWrapper ];
22+ nativeBuildInputs = [ qt.qmake qt.wrapQtAppsHook ];
2323 buildInputs = [ qt.qtbase ];
2424
2525 qmakeFlags = [ "CONFIG-=app_bundle" ];
@@ -29,11 +29,6 @@ stdenv.mkDerivation rec {
2929 cp qtchan $out/bin
3030 '';
3131
32− preFixup = ''
33− wrapProgram $out/bin/qtchan \
34− --suffix QT_PLUGIN_PATH : ${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}
35− '';
36−
3732 meta = with stdenv.lib; {
3833 description = "4chan browser in qt5";
3934 homepage = "https://github.com/siavash119/qtchan";
pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix+4−3
@@ -1,7 +1,7 @@
11{ stable, version, sha256Hash, archPatchesRevision, archPatchesHash }:
22
33{ mkDerivation, lib, fetchFromGitHub, fetchsvn
4−, pkgconfig, pythonPackages, cmake, wrapGAppsHook, gcc8
4+, pkgconfig, pythonPackages, cmake, wrapGAppsHook, wrapQtAppsHook, gcc8
55, qtbase, qtimageformats, gtk3, libappindicator-gtk3, libnotify, xdg_utils
66, dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
77}:
@@ -39,7 +39,7 @@ mkDerivation rec {
3939 --replace '"notify"' '"${libnotify}/lib/libnotify.so"'
4040 '';
4141
42− nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook gcc8 ];
42+ nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook wrapQtAppsHook gcc8 ];
4343
4444 # We want to run wrapProgram manually (with additional parameters)
4545 dontWrapGApps = true;
@@ -129,12 +129,13 @@ mkDerivation rec {
129129 done
130130 '';
131131
132+ dontWrapQtApps = true;
132133 postFixup = ''
133134 # This is necessary to run Telegram in a pure environment.
134135 # We also use gappsWrapperArgs from wrapGAppsHook.
135136 wrapProgram $out/bin/telegram-desktop \
136137 "''${gappsWrapperArgs[@]}" \
137− --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \
138+ "''${qtWrapperArgs[@]}" \
138139 --prefix PATH : ${xdg_utils}/bin \
139140 --set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
140141 sed -i $out/bin/telegram-desktop \
pkgs/applications/networking/linssid/default.nix+4−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, qtbase, qtsvg, qmake, pkgconfig, boost, wirelesstools, iw, qwt, makeWrapper }:
1+{ stdenv, fetchurl, qtbase, qtsvg, qmake, pkgconfig, boost, wirelesstools, iw, qwt, wrapQtAppsHook }:
22
33stdenv.mkDerivation rec {
44 name = "linssid-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
99 sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl";
1010 };
1111
12− nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
12+ nativeBuildInputs = [ pkgconfig qmake wrapQtAppsHook ];
1313 buildInputs = [ qtbase qtsvg boost qwt ];
1414
1515 patches = [ ./0001-unbundled-qwt.patch ];
@@ -26,11 +26,8 @@ stdenv.mkDerivation rec {
2626 rm -fr qwt-lib
2727 '';
2828
29− postInstall = ''
30− wrapProgram $out/bin/linssid \
31− --prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix} \
32− --prefix PATH : ${stdenv.lib.makeBinPath [ wirelesstools iw ]}
33− '';
29+ qtWrapperArgs =
30+ [ ''--prefix PATH : ${stdenv.lib.makeBinPath [ wirelesstools iw ]}'' ];
3431
3532 meta = with stdenv.lib; {
3633 description = "Graphical wireless scanning for Linux";
pkgs/applications/networking/mumble/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper, pkgconfig
1+{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig
22, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf3_6, speex, libcap
33, alsaLib, python
44, jackSupport ? false, libjack2 ? null
@@ -158,11 +158,6 @@ in {
158158 murmur_git = (server gitSource).overrideAttrs (old: {
159159 meta = old.meta // { broken = iceSupport; };
160160
161− nativeBuildInputs = old.nativeBuildInputs or [] ++ [ makeWrapper ];
162−
163− installPhase = old.installPhase or "" + ''
164− wrapProgram $out/bin/murmurd --suffix QT_PLUGIN_PATH : \
165− ${getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}
166− '';
161+ nativeBuildInputs = old.nativeBuildInputs or [] ++ [ qt5.wrapQtAppsHook ];
167162 });
168163}
pkgs/applications/networking/newsreaders/quiterss/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, qmake, pkgconfig, makeWrapper
1+{ stdenv, fetchFromGitHub, qmake, pkgconfig, wrapQtAppsHook
22, qtbase, qttools, qtwebkit, sqlite
33}:
44
@@ -13,14 +13,9 @@ stdenv.mkDerivation rec {
1313 sha256 = "0xav9qr8n6310636nfbgx4iix65fs3ya5rz2isxsf38bkjm7r3pa";
1414 };
1515
16− nativeBuildInputs = [ qmake pkgconfig makeWrapper ];
16+ nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
1717 buildInputs = [ qtbase qttools qtwebkit sqlite.dev ];
1818
19− postFixup = ''
20− wrapProgram $out/bin/quiterss \
21− --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
22− '';
23−
2419 meta = with stdenv.lib; {
2520 description = "A Qt-based RSS/Atom news feed reader";
2621 longDescription = ''
pkgs/applications/networking/nextcloud-client/default.nix+6−6
@@ -1,5 +1,5 @@
11{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
2−, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret
2+, inotify-tools, wrapQtAppsHook, openssl_1_1, pcre, qtwebengine, libsecret
33, libcloudproviders
44}:
55
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
1414 fetchSubmodules = true;
1515 };
1616
17− nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
17+ nativeBuildInputs = [ pkgconfig cmake wrapQtAppsHook ];
1818
1919 buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl_1_1.out pcre inotify-tools libcloudproviders ];
2020
@@ -31,13 +31,13 @@ stdenv.mkDerivation rec {
3131 "-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
3232 ];
3333
34+ qtWrapperArgs = [
35+ ''--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]}''
36+ ];
37+
3438 postInstall = ''
3539 sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
3640 $out/share/applications/nextcloud.desktop
37−
38− wrapProgram "$out/bin/nextcloud" \
39− --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]} \
40− --prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix}
4141 '';
4242
4343 meta = with stdenv.lib; {
pkgs/applications/networking/protonmail-bridge/default.nix+3−10
@@ -1,5 +1,5 @@
1−{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, full,
2− libsecret, libGL, libpulseaudio, glib, makeWrapper, makeDesktopItem }:
1+{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, full
2+, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, makeDesktopItem }:
33
44let
55 version = "1.1.5-1";
@@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
2828 sha256 = "1y5mphrs60zd6km9z64vskk70q9zzw4g6js7qvgl572wv81w2l75";
2929 };
3030
31− nativeBuildInputs = [ makeWrapper ];
31+ nativeBuildInputs = [ wrapQtAppsHook ];
3232
3333 sourceRoot = ".";
3434
@@ -60,18 +60,11 @@ in stdenv.mkDerivation rec {
6060 libpulseaudio
6161 glib
6262 ];
63−
64− qtPath = prefix: "${full}/${prefix}";
6563 in ''
6664 patchelf \
6765 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
6866 --set-rpath "${rpath}" \
6967 $out/lib/protonmail-bridge
70−
71− wrapProgram $out/lib/protonmail-bridge \
72− --set QT_PLUGIN_PATH "${qtPath qtbase.qtPluginPrefix}" \
73− --set QML_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \
74− --set QML2_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \
7568 '';
7669
7770 meta = with stdenv.lib; {
pkgs/applications/networking/sniffers/wireshark/default.nix+2−5
@@ -30,7 +30,7 @@ in stdenv.mkDerivation {
3030
3131 nativeBuildInputs = [
3232 bison cmake extra-cmake-modules flex pkgconfig
33− ];
33+ ] ++ optional withQt qt5.wrapQtAppsHook;
3434
3535 buildInputs = [
3636 gettext pcre perl libpcap lua5 libssh nghttp2 openssl libgcrypt
@@ -70,12 +70,9 @@ in stdenv.mkDerivation {
7070 done
7171 done
7272
73− wrapProgram $out/Applications/Wireshark.app/Contents/MacOS/Wireshark \
74− --set QT_PLUGIN_PATH ${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}
73+ wrapQtApp $out/Applications/Wireshark.app/Contents/MacOS/Wireshark
7574 '' else optionalString withQt ''
7675 install -Dm644 -t $out/share/applications ../wireshark.desktop
77− wrapProgram $out/bin/wireshark \
78− --set QT_PLUGIN_PATH ${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}
7976
8077 substituteInPlace $out/share/applications/*.desktop \
8178 --replace "Exec=wireshark" "Exec=$out/bin/wireshark"
pkgs/applications/office/kmymoney/default.nix+6−6
@@ -1,4 +1,5 @@
11{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
2+, wrapQtAppsHook
23
34, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
45, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
@@ -29,6 +30,7 @@ stdenv.mkDerivation rec {
2930
3031 nativeBuildInputs = [
3132 doxygen extra-cmake-modules graphviz kdoctools python2Packages.wrapPython
33+ wrapQtAppsHook
3234 ];
3335
3436 buildInputs = [
@@ -57,13 +59,11 @@ stdenv.mkDerivation rec {
5759
5860 doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
5961 installCheckInputs = [ xvfb_run ];
60− installCheckPhase = let
61− pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
62− in lib.optionalString doInstallCheck ''
63− QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} \
62+ installCheckPhase =
63+ lib.optionalString doInstallCheck ''
6464 xvfb-run -s '-screen 0 1024x768x24' make test \
65− ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
66− '';
65+ ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
66+ '';
6767
6868 meta = {
6969 description = "Personal finance manager for KDE";
pkgs/applications/office/scribus/unstable.nix+4−8
@@ -1,11 +1,11 @@
1−{ stdenv, fetchsvn, makeWrapper, pkgconfig, cmake, qtbase, cairo, pixman,
1+{ stdenv, fetchsvn, wrapQtAppsHook, pkgconfig, cmake, qtbase, cairo, pixman,
22boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
33podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools }:
44
55let
66 pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
77 revision = "22806";
8−in
8+in
99stdenv.mkDerivation rec {
1010 name = "scribus-unstable-${version}";
1111 version = "2019-01-16";
@@ -18,17 +18,13 @@ stdenv.mkDerivation rec {
1818
1919 enableParallelBuilding = true;
2020
21+ nativeBuildInputs = [ wrapQtAppsHook ];
2122 buildInputs = [
22− makeWrapper pkgconfig cmake qtbase cairo pixman boost cups fontconfig
23+ pkgconfig cmake qtbase cairo pixman boost cups fontconfig
2324 freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
2425 poppler_data pythonEnv harfbuzz qtimageformats qttools
2526 ];
2627
27− postFixup = ''
28− wrapProgram $out/bin/scribus \
29− --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
30− '';
31−
3228 meta = {
3329 maintainers = [ stdenv.lib.maintainers.erictapen ];
3430 platforms = stdenv.lib.platforms.linux;
pkgs/applications/science/astronomy/stellarium/default.nix+3−8
@@ -1,7 +1,7 @@
11{ mkDerivation, lib, fetchFromGitHub
22, cmake, freetype, libpng, libGLU_combined, openssl, perl, libiconv
33, qtscript, qtserialport, qttools
4−, qtmultimedia, qtlocation, makeWrapper, qtbase
4+, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
55}:
66
77mkDerivation rec {
@@ -15,18 +15,13 @@ mkDerivation rec {
1515 sha256 = "0hf1wv2bb5j7ny2xh29mj9m4hjblhn02zylay8gl85w7xlqs7s5r";
1616 };
1717
18− nativeBuildInputs = [ cmake perl ];
18+ nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
1919
2020 buildInputs = [
2121 freetype libpng libGLU_combined openssl libiconv qtscript qtserialport qttools
22− qtmultimedia qtlocation qtbase makeWrapper
22+ qtmultimedia qtlocation qtbase
2323 ];
2424
25− postInstall = ''
26− wrapProgram $out/bin/stellarium \
27− --prefix QT_PLUGIN_PATH : "${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
28− '';
29−
3025 meta = with lib; {
3126 description = "Free open-source planetarium";
3227 homepage = http://stellarium.org/;
pkgs/applications/science/electronics/dsview/default.nix+2−7
@@ -1,6 +1,6 @@
11{ stdenv, fetchFromGitHub, pkgconfig, cmake,
22libzip, boost, fftw, qtbase,
3−libusb, makeWrapper, libsigrok4dsl, libsigrokdecode4dsl
3+libusb, wrapQtAppsHook, libsigrok4dsl, libsigrokdecode4dsl
44}:
55
66stdenv.mkDerivation rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
2424 ./install.patch
2525 ];
2626
27− nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
27+ nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
2828
2929 buildInputs = [
3030 boost fftw qtbase libusb libzip libsigrokdecode4dsl libsigrok4dsl
@@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
3232
3333 enableParallelBuilding = true;
3434
35− postFixup = ''
36− wrapProgram $out/bin/DSView --suffix QT_PLUGIN_PATH : \
37− ${qtbase.bin}/${qtbase.qtPluginPrefix}
38− '';
39−
4035 meta = with stdenv.lib; {
4136 description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
4237 homepage = https://www.dreamsourcelab.com/;
pkgs/applications/science/misc/root/5.nix+2−2
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkgconfig, python2
22, libX11, libXpm, libXft, libXext, libGLU_combined, zlib, libxml2, lzma, gsl_1
3−, Cocoa, OpenGL, cf-private, noSplash ? false }:
3+, Cocoa, OpenGL, noSplash ? false }:
44
55stdenv.mkDerivation rec {
66 name = "root-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
1414 nativeBuildInputs = [ pkgconfig ];
1515 buildInputs = [ cmake pcre python2 zlib libxml2 lzma gsl_1 ]
1616 ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU_combined ]
17− ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL cf-private ]
17+ ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
1818 ;
1919
2020 patches = [
pkgs/applications/science/misc/root/default.nix+2−2
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, cmake, pcre, pkgconfig, python2
22, libX11, libXpm, libXft, libXext, libGLU_combined, zlib, libxml2, lz4, lzma, gsl, xxHash
3−, Cocoa, OpenGL, cf-private, noSplash ? false }:
3+, Cocoa, OpenGL, noSplash ? false }:
44
55stdenv.mkDerivation rec {
66 name = "root-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
1414 nativeBuildInputs = [ pkgconfig ];
1515 buildInputs = [ cmake pcre python2 zlib libxml2 lz4 lzma gsl xxHash ]
1616 ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU_combined ]
17− ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL cf-private ]
17+ ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
1818 ;
1919
2020 patches = [
pkgs/applications/version-management/p4v/default.nix+5−5
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl, xkeyboard_config, makeWrapper }:
1+{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl, xkeyboard_config, wrapQtAppsHook }:
22
33stdenv.mkDerivation rec {
44 name = "p4v-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
1010 };
1111
1212 dontBuild = true;
13− nativeBuildInputs = [makeWrapper];
13+ nativeBuildInputs = [ wrapQtAppsHook ];
1414
1515 ldLibraryPath = lib.makeLibraryPath [
1616 stdenv.cc.cc.lib
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
2222 openssl
2323 ];
2424
25+ dontWrapQtApps = true;
2526 installPhase = ''
2627 mkdir $out
2728 cp -r bin $out
@@ -31,10 +32,9 @@ stdenv.mkDerivation rec {
3132 for f in $out/bin/*.bin ; do
3233 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f
3334
34− wrapProgram $f \
35+ wrapQtApp $f \
3536 --suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
36− --suffix QT_XKB_CONFIG_ROOT : ${xkeyboard_config}/share/X11/xkb \
37− --suffix QT_PLUGIN_PATH : ${qtbase.bin}/${qtbase.qtPluginPrefix}
37+ --suffix QT_XKB_CONFIG_ROOT : ${xkeyboard_config}/share/X11/xkb
3838 done
3939 '';
4040
pkgs/applications/video/avidemux/default.nix+10−5
@@ -1,7 +1,7 @@
11{ stdenv, lib, fetchurl, cmake, pkgconfig
22, zlib, gettext, libvdpau, libva, libXv, sqlite
33, yasm, freetype, fontconfig, fribidi
4−, makeWrapper, libXext, libGLU, qttools, qtbase
4+, makeWrapper, libXext, libGLU, qttools, qtbase, wrapQtAppsHook
55, alsaLib
66, withX265 ? true, x265
77, withX264 ? true, x264
@@ -37,7 +37,9 @@ stdenv.mkDerivation rec {
3737 ./bootstrap_logging.patch
3838 ];
3939
40− nativeBuildInputs = [ yasm cmake pkgconfig ];
40+ nativeBuildInputs =
41+ [ yasm cmake pkgconfig ]
42+ ++ lib.optional withQT wrapQtAppsHook;
4143 buildInputs = [
4244 zlib gettext libvdpau libva libXv sqlite fribidi fontconfig
4345 freetype alsaLib libXext libGLU makeWrapper
@@ -55,7 +57,10 @@ stdenv.mkDerivation rec {
5557
5658 buildCommand = let
5759 qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
58− wrapProgram = f: "wrapProgram ${f} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
60+ wrapWith = makeWrapper: filename:
61+ "${makeWrapper} ${filename} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
62+ wrapQtApp = wrapWith "wrapQtApp";
63+ wrapProgram = wrapWith "wrapProgram";
5964 in ''
6065 unpackPhase
6166 cd "$sourceRoot"
@@ -74,8 +79,8 @@ stdenv.mkDerivation rec {
7479 ${wrapProgram "$out/bin/avidemux3_cli"}
7580
7681 ${stdenv.lib.optionalString withQT ''
77− ${wrapProgram "$out/bin/avidemux3_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
78− ${wrapProgram "$out/bin/avidemux3_jobs_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
82+ ${wrapQtApp "$out/bin/avidemux3_qt5"}
83+ ${wrapQtApp "$out/bin/avidemux3_jobs_qt5"}
7984 ''}
8085
8186 ln -s "$out/bin/avidemux3_${default}" "$out/bin/avidemux"
pkgs/applications/video/minitube/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, makeWrapper, phonon, phonon-backend-vlc, qtbase, qmake
1+{ stdenv, fetchFromGitHub, wrapQtAppsHook, phonon, phonon-backend-vlc, qtbase, qmake
22, qtdeclarative, qttools
33
44# "Free" key generated by nckx <github@tobias.gr>. I no longer have a Google
@@ -17,17 +17,12 @@ stdenv.mkDerivation rec {
1717 };
1818
1919 buildInputs = [ phonon phonon-backend-vlc qtbase qtdeclarative qttools ];
20− nativeBuildInputs = [ makeWrapper qmake ];
20+ nativeBuildInputs = [ wrapQtAppsHook qmake ];
2121
2222 qmakeFlags = [ "DEFINES+=APP_GOOGLE_API_KEY=${withAPIKey}" ];
2323
2424 enableParallelBuilding = true;
2525
26− postInstall = ''
27− wrapProgram $out/bin/minitube \
28− --prefix QT_PLUGIN_PATH : "${phonon-backend-vlc}/lib/qt-5.${stdenv.lib.versions.minor qtbase.version}/plugins"
29− '';
30−
3126 meta = with stdenv.lib; {
3227 description = "Stand-alone YouTube video player";
3328 longDescription = ''
pkgs/build-support/cc-wrapper/setup-hook.sh+4−4
@@ -70,12 +70,12 @@ ccWrapper_addCVars () {
7070 local role_post role_pre
7171 getHostRoleEnvHook
7272
73− if [[ -d "$1/include" ]]; then
74− export NIX_${role_pre}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
73+ if [ -d "$1/include" ]; then
74+ export NIX_${role_pre}CFLAGS_COMPILE+=" -isystem $1/include"
7575 fi
7676
77− if [[ -d "$1/Library/Frameworks" ]]; then
78− export NIX_${role_pre}CFLAGS_COMPILE+=" -F$1/Library/Frameworks"
77+ if [ -d "$1/Library/Frameworks" ]; then
78+ export NIX_${role_pre}CFLAGS_COMPILE+=" -iframework $1/Library/Frameworks"
7979 fi
8080}
8181
pkgs/desktops/plasma-5/plasma-workspace/default.nix+4−7
@@ -34,7 +34,8 @@ mkDerivation {
3434
3535 qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtwayland qtx11extras
3636 ];
37− outputs = [ "bin" "dev" "out" ];
37+ propagatedUserEnvPkgs = [ qtgraphicaleffects ];
38+ outputs = [ "out" "dev" ];
3839
3940 cmakeFlags = [
4041 "-DNIXPKGS_XMESSAGE=${getBin xmessage}/bin/xmessage"
@@ -45,7 +46,7 @@ mkDerivation {
4546 "-DNIXPKGS_XPROP=${getBin xprop}/bin/xprop"
4647 "-DNIXPKGS_ID=${getBin coreutils}/bin/id"
4748 "-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=${getBin dbus}/bin/dbus-update-activation-environment"
48− "-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/lib/libexec/kf5/start_kdeinit_wrapper"
49+ "-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"
4950 "-DNIXPKGS_QDBUS=${getBin qttools}/bin/qdbus"
5051 "-DNIXPKGS_KWRAPPER5=${getBin kinit}/bin/kwrapper5"
5152 "-DNIXPKGS_KREADCONFIG5=${getBin kconfig}/bin/kreadconfig5"
@@ -72,10 +73,6 @@ mkDerivation {
7273
7374 preConfigure = ''
7475 NIX_CFLAGS_COMPILE+=" -DNIXPKGS_KDOSTARTUPCONFIG5=\"''${!outputBin}/bin/kdostartupconfig5\""
75− cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/lib/libexec/startplasma"
76− '';
77−
78− postInstall = ''
79− moveToOutput lib/libexec/startplasma ''${!outputBin}
76+ cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/libexec/startplasma"
8077 '';
8178}
pkgs/development/compilers/llvm/4/lldb.nix+1−1
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
3232
3333 nativeBuildInputs = [ cmake python which swig ];
3434 buildInputs = [ ncurses zlib libedit libxml2 llvm ]
35− ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
35+ ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
3636
3737 CXXFLAGS = "-fno-rtti";
3838 hardeningDisable = [ "format" ];
pkgs/development/compilers/llvm/5/lldb.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
3131
3232 nativeBuildInputs = [ cmake python which swig ];
3333 buildInputs = [ ncurses zlib libedit libxml2 llvm ]
34− ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
34+ ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
3535
3636 CXXFLAGS = "-fno-rtti";
3737 hardeningDisable = [ "format" ];
pkgs/development/compilers/llvm/6/lldb.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
3131
3232 nativeBuildInputs = [ cmake python which swig ];
3333 buildInputs = [ ncurses zlib libedit libxml2 llvm ]
34− ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
34+ ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
3535
3636 CXXFLAGS = "-fno-rtti";
3737 hardeningDisable = [ "format" ];
pkgs/development/compilers/llvm/7/lldb.nix+13−8
@@ -9,6 +9,7 @@
99, libxml2
1010, llvm
1111, clang-unwrapped
12+, perl
1213, python
1314, version
1415, darwin
@@ -19,6 +20,11 @@ stdenv.mkDerivation {
1920
2021 src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
2122
23+ nativeBuildInputs = [ cmake perl python which swig ];
24+ buildInputs = [ ncurses zlib libedit libxml2 llvm ]
25+ ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
26+
27+
2228 postPatch = ''
2329 # Fix up various paths that assume llvm and clang are installed in the same place
2430 sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
@@ -30,22 +36,21 @@ stdenv.mkDerivation {
3036 sed -i -e 's,message(SEND_ERROR "Cannot find debugserver on system."),,' \
3137 -e 's,string(STRIP ''${XCODE_DEV_DIR} XCODE_DEV_DIR),,' \
3238 tools/debugserver/source/CMakeLists.txt
39+
40+ # Fix /usr/bin references for sandboxed builds.
41+ patchShebangs scripts
3342 '';
3443
35− nativeBuildInputs = [ cmake python which swig ];
36− buildInputs = [ ncurses zlib libedit libxml2 llvm ]
37− ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
44+ cmakeFlags = [
45+ "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
46+ "-DSKIP_DEBUGSERVER=ON"
47+ ];
3848
3949 CXXFLAGS = "-fno-rtti";
4050 hardeningDisable = [ "format" ];
4151
4252 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
4353
44− cmakeFlags = [
45− "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
46− "-DSKIP_DEBUGSERVER=ON"
47− ];
48−
4954 enableParallelBuilding = true;
5055
5156 postInstall = ''
pkgs/development/compilers/llvm/8/lldb.nix+1−1
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
3131
3232 nativeBuildInputs = [ cmake python which swig ];
3333 buildInputs = [ ncurses zlib libedit libxml2 llvm ]
34− ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
34+ ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
3535
3636 CXXFLAGS = "-fno-rtti";
3737 hardeningDisable = [ "format" ];
pkgs/development/compilers/nextpnr/default.nix+5−10
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, cmake, makeWrapper
1+{ stdenv, fetchFromGitHub, cmake
22, boost, python3, eigen
33, icestorm, trellis
44
@@ -6,7 +6,7 @@
66# laptop (and over a remote X server on my server...), so mark it broken for
77# now, with intent to fix later.
88, enableGui ? false
9−, qtbase
9+, qtbase, wrapQtAppsHook
1010}:
1111
1212let
@@ -36,7 +36,9 @@ stdenv.mkDerivation rec {
3636 sha256 = "1y14jpa948cwk0i19bsfqh7yxsxkgskm4xym4z179sjcvcdvrn3a";
3737 };
3838
39− nativeBuildInputs = [ cmake makeWrapper ];
39+ nativeBuildInputs
40+ = [ cmake ]
41+ ++ (stdenv.lib.optional enableGui wrapQtAppsHook);
4042 buildInputs
4143 = [ boostPython python3 eigen ]
4244 ++ (stdenv.lib.optional enableGui qtbase);
@@ -56,13 +58,6 @@ stdenv.mkDerivation rec {
5658 --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
5759 '';
5860
59− postInstall = stdenv.lib.optionalString enableGui ''
60− for x in generic ice40 ecp5; do
61− wrapProgram $out/bin/nextpnr-$x \
62− --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
63− done
64− '';
65−
6661 meta = with stdenv.lib; {
6762 description = "Place and route tool for FPGAs";
6863 homepage = https://github.com/yosyshq/nextpnr;
pkgs/development/interpreters/python/default.nix+4−4
@@ -77,10 +77,10 @@ in {
7777 sourceVersion = {
7878 major = "3";
7979 minor = "6";
80− patch = "8";
80+ patch = "9";
8181 suffix = "";
8282 };
83− sha256 = "14qi6n5gpcjnwy165wi9hkfcmbadc95ny6bxxldknxwmx50n4i1m";
83+ sha256 = "1nkh70azbv866aw5a9bbxsxarsf40233vrzpjq17z3rz9ramybsy";
8484 inherit (darwin) CF configd;
8585 inherit passthruFun;
8686 };
@@ -90,10 +90,10 @@ in {
9090 sourceVersion = {
9191 major = "3";
9292 minor = "7";
93− patch = "3";
93+ patch = "4";
9494 suffix = "";
9595 };
96− sha256 = "066ka8csjwkycqpgyv424d8hhqhfd7r6svsp4sfcvkylci0baq6s";
96+ sha256 = "0gxiv5617zd7dnqm5k9r4q2188lk327nf9jznwq9j6b8p0s92ygv";
9797 inherit (darwin) CF configd;
9898 inherit passthruFun;
9999 };
pkgs/development/libraries/SDL/default.nix+1−6
@@ -6,7 +6,6 @@
66, libXext, libICE, libXrandr
77, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid, libpulseaudio
88, OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
9−, cf-private
109}:
1110
1211# NOTE: When editing this expression see if the same change applies to
@@ -41,11 +40,7 @@ stdenv.mkDerivation rec {
4140
4241 buildInputs = [ ]
4342 ++ optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
44− ++ optionals stdenv.isDarwin [
45− AudioUnit CoreAudio CoreServices Kernel OpenGL
46− # Needed for NSDefaultRunLoopMode symbols.
47− cf-private
48− ];
43+ ++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
4944
5045 configureFlags = [
5146 "--disable-oss"
pkgs/development/libraries/SDL2/default.nix+2−6
@@ -14,7 +14,7 @@
1414, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
1515, libpulseaudio
1616, AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL
17−, audiofile, cf-private, libiconv
17+, audiofile, libiconv
1818}:
1919
2020# NOTE: When editing this expression see if the same change applies to
@@ -58,11 +58,7 @@ stdenv.mkDerivation rec {
5858 ++ dlopenBuildInputs
5959 ++ optional ibusSupport ibus
6060 ++ optional fcitxSupport fcitx
61− ++ optionals stdenv.isDarwin [
62− AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL
63− # Needed for NSDefaultRunLoopMode symbols.
64− cf-private
65− ];
61+ ++ optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ];
6662
6763 enableParallelBuilding = true;
6864
pkgs/development/libraries/cutelyst/default.nix+2−8
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, makeWrapper
1+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, wrapQtAppsHook
22, qtbase, libuuid, libcap, uwsgi, grantlee, pcre
33}:
44
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
1313 sha256 = "09cgfpr2k1jp98h1ahxqm5lmv3qbk0bcxpqpill6n5wmq2c8kl8b";
1414 };
1515
16− nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
16+ nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
1717 buildInputs = [ qtbase libuuid libcap uwsgi grantlee pcre ];
1818
1919 cmakeFlags = [
@@ -31,12 +31,6 @@ stdenv.mkDerivation rec {
3131 unset LD_LIBRARY_PATH
3232 '';
3333
34− postInstall = ''
35− for prog in $out/bin/*; do
36− wrapProgram "$prog" --set QT_PLUGIN_PATH '${qtbase}/${qtbase.qtPluginPrefix}'
37− done
38− '';
39−
4034 meta = with lib; {
4135 description = "C++ Web Framework built on top of Qt";
4236 homepage = https://cutelyst.org/;
pkgs/development/libraries/ffmpeg-full/default.nix+2−10
@@ -139,7 +139,7 @@
139139 * Darwin frameworks
140140 */
141141, Cocoa, CoreAudio, CoreServices, AVFoundation, MediaToolbox
142−, VideoDecodeAcceleration, cf-private
142+, VideoDecodeAcceleration
143143}:
144144
145145/* Maintainer notes:
@@ -419,7 +419,7 @@ stdenv.mkDerivation rec {
419419 ++ optional nvenc nv-codec-headers
420420 ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation
421421 MediaToolbox VideoDecodeAcceleration
422− libiconv cf-private /* For _OBJC_EHTYPE_$_NSException */ ];
422+ libiconv ];
423423
424424 buildFlags = [ "all" ]
425425 ++ optional qtFaststartProgram "tools/qt-faststart"; # Build qt-faststart executable
@@ -427,14 +427,6 @@ stdenv.mkDerivation rec {
427427 # Hacky framework patching technique borrowed from the phantomjs2 package
428428 postInstall = optionalString qtFaststartProgram ''
429429 cp -a tools/qt-faststart $out/bin/
430− '' + optionalString stdenv.isDarwin ''
431− FILES=($(ls $out/bin/*))
432− FILES+=($(ls $out/lib/*.dylib))
433− for f in ''${FILES[@]}; do
434− if [ ! -h "$f" ]; then
435− install_name_tool -change ${cf-private}/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation "$f"
436− fi
437− done
438430 '';
439431
440432 enableParallelBuilding = true;
pkgs/development/libraries/fltk/1.4.nix+14−18
@@ -1,11 +1,13 @@
11{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
22, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
3−, libtiff, freetype, cf-private, Cocoa, AGL, GLUT
3+, libtiff, freetype, Cocoa, AGL, GLUT
44}:
55
66let
77 version = "1.4.x-r13121";
8−in stdenv.mkDerivation {
8+in
9+
10+stdenv.mkDerivation {
911 name = "fltk-${version}";
1012
1113 src = fetchurl {
@@ -13,19 +15,16 @@ in stdenv.mkDerivation {
1315 sha256 = "1v8wxvxcbk99i82x2v5fpqg5vj8n7g8a38g30ry7nzcjn5sf3r63";
1416 };
1517
16− preConfigure = "make clean";
17−
1818 patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
1919
2020 nativeBuildInputs = [ pkgconfig ];
21+ buildInputs = [ libGLU_combined libjpeg zlib libpng libXft ]
22+ ++ stdenv.lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
2123
22− buildInputs = [
23− libGLU_combined
24− libjpeg
25− zlib
26− libpng
27− libXft
28− ];
24+ propagatedBuildInputs = [ xorgproto ]
25+ ++ (if stdenv.isDarwin
26+ then [ freetype libtiff ]
27+ else [ xlibsWrapper libXi freeglut ]);
2928
3029 configureFlags = [
3130 "--enable-gl"
@@ -35,18 +34,15 @@ in stdenv.mkDerivation {
3534 "--enable-xft"
3635 ];
3736
38− propagatedBuildInputs = [ xorgproto ]
39− ++ (if stdenv.isDarwin
40− then [ Cocoa AGL GLUT freetype libtiff cf-private /* Needed for NSDefaultRunLoopMode */ ]
41− else [ xlibsWrapper libXi freeglut ]);
37+ preConfigure = "make clean";
4238
4339 enableParallelBuilding = true;
4440
45− meta = {
41+ meta = with stdenv.lib; {
4642 description = "A C++ cross-platform lightweight GUI library";
4743 homepage = http://www.fltk.org;
48− platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
49− license = stdenv.lib.licenses.gpl2;
44+ platforms = platforms.linux ++ platforms.darwin;
45+ license = licenses.gpl2;
5046 };
5147
5248}
pkgs/development/libraries/fltk/default.nix+13−18
@@ -1,11 +1,13 @@
11{ stdenv, fetchurl, pkgconfig, xlibsWrapper, xorgproto, libXi
22, freeglut, libGLU_combined, libjpeg, zlib, libXft, libpng
3−, libtiff, freetype, cf-private, Cocoa, AGL, GLUT
3+, libtiff, freetype, Cocoa, AGL, GLUT
44}:
55
66let
77 version = "1.3.5";
8−in stdenv.mkDerivation {
8+in
9+
10+stdenv.mkDerivation {
911 name = "fltk-${version}";
1012
1113 src = fetchurl {
@@ -16,14 +18,13 @@ in stdenv.mkDerivation {
1618 patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
1719
1820 nativeBuildInputs = [ pkgconfig ];
21+ buildInputs = [ libGLU_combined libjpeg zlib libpng libXft ]
22+ ++ stdenv.lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
1923
20− buildInputs = [
21− libGLU_combined
22− libjpeg
23− zlib
24− libpng
25− libXft
26− ];
24+ propagatedBuildInputs = [ xorgproto ]
25+ ++ (if stdenv.isDarwin
26+ then [ freetype libtiff ]
27+ else [ xlibsWrapper libXi freeglut ]);
2728
2829 configureFlags = [
2930 "--enable-gl"
@@ -33,18 +34,12 @@ in stdenv.mkDerivation {
3334 "--enable-xft"
3435 ];
3536
36− propagatedBuildInputs = [ xorgproto ]
37− ++ (if stdenv.isDarwin
38− then [ Cocoa AGL GLUT freetype libtiff cf-private /* Needed for NSDefaultRunLoopMode */ ]
39− else [ xlibsWrapper libXi freeglut ]);
40−
4137 enableParallelBuilding = true;
4238
43− meta = {
39+ meta = with stdenv.lib; {
4440 description = "A C++ cross-platform lightweight GUI library";
4541 homepage = http://www.fltk.org;
46− platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
47− license = stdenv.lib.licenses.gpl2;
42+ platforms = platforms.linux ++ platforms.darwin;
43+ license = licenses.gpl2;
4844 };
49−
5045}
pkgs/development/libraries/glfw/3.x.nix+3−8
@@ -1,5 +1,5 @@
11{ stdenv, lib, fetchFromGitHub, cmake, libGL, libXrandr, libXinerama, libXcursor, libX11
2−, cf-private, Cocoa, Kernel, fixDarwinDylibNames
2+, Cocoa, Kernel, fixDarwinDylibNames
33}:
44
55stdenv.mkDerivation rec {
@@ -19,13 +19,8 @@ stdenv.mkDerivation rec {
1919
2020 nativeBuildInputs = [ cmake ];
2121
22− buildInputs = [
23− libX11 libXrandr libXinerama libXcursor
24− ] ++ lib.optionals stdenv.isDarwin [
25− Cocoa Kernel fixDarwinDylibNames
26− # Needed for NSDefaultRunLoopMode symbols.
27− cf-private
28− ];
22+ buildInputs = [ libX11 libXrandr libXinerama libXcursor ]
23+ ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel fixDarwinDylibNames ];
2924
3025 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
3126
pkgs/development/libraries/glib/default.nix−3
@@ -81,9 +81,6 @@ stdenv.mkDerivation rec {
8181 utillinuxMinimal # for libmount
8282 ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
8383 AppKit Carbon Cocoa CoreFoundation CoreServices Foundation
84− # Needed for CFURLCreateFromFSRef, etc. which have deen deprecated
85− # since 10.9 and are not part of swift-corelibs CoreFoundation.
86− darwin.cf-private
8784 ]);
8885
8986 nativeBuildInputs = [
pkgs/development/libraries/gsettings-qt/default.nix+5−1
@@ -1,4 +1,7 @@
1−{ stdenv, fetchbzr, pkgconfig, qmake, qtbase, qtdeclarative, glib, gobject-introspection }:
1+{ stdenv, fetchbzr, pkgconfig
2+, qmake, qtbase, qtdeclarative, wrapQtAppsHook
3+, glib, gobject-introspection
4+}:
25
36stdenv.mkDerivation rec {
47 name = "gsettings-qt-${version}";
@@ -14,6 +17,7 @@ stdenv.mkDerivation rec {
1417 pkgconfig
1518 qmake
1619 gobject-introspection
20+ wrapQtAppsHook
1721 ];
1822
1923 buildInputs = [
pkgs/development/libraries/kde-frameworks/default.nix+3−12
@@ -45,17 +45,9 @@ let
4545 if [ "$hookName" != postHook ]; then
4646 postHooks+=("source @dev@/nix-support/setup-hook")
4747 else
48− # Propagate $${out} output
49− propagatedUserEnvPkgs="$propagatedUserEnvPkgs @${out}@"
50−
51− if [ -z "$outputDev" ]; then
52− echo "error: \$outputDev is unset!" >&2
53− exit 1
54− fi
55−
5648 # Propagate $dev so that this setup hook is propagated
5749 # But only if there is a separate $dev output
58− if [ "$outputDev" != out ]; then
50+ if [ "''${outputDev:?}" != out ]; then
5951 propagatedBuildInputs="$propagatedBuildInputs @dev@"
6052 fi
6153 fi
@@ -75,10 +67,9 @@ let
7567 inherit (srcs."${name}") src version;
7668
7769 outputs = args.outputs or [ "bin" "dev" "out" ];
78− hasBin = lib.elem "bin" outputs;
79− hasDev = lib.elem "dev" outputs;
70+ hasSeparateDev = lib.elem "dev" outputs;
8071
81− defaultSetupHook = if hasBin && hasDev then propagateBin else null;
72+ defaultSetupHook = if hasSeparateDev then propagateBin else null;
8273 setupHook = args.setupHook or defaultSetupHook;
8374
8475 meta = {
pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh+59−5
@@ -1,16 +1,16 @@
1−_ecmEnvHook() {
1+ecmEnvHook() {
22 addToSearchPath XDG_DATA_DIRS "$1/share"
33 addToSearchPath XDG_CONFIG_DIRS "$1/etc/xdg"
44}
5−addEnvHooks "$targetOffset" _ecmEnvHook
5+addEnvHooks "$targetOffset" ecmEnvHook
66
7−_ecmPreConfigureHook() {
7+ecmPostHook() {
88 # Because we need to use absolute paths here, we must set *all* the paths.
99 cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}"
1010 cmakeFlags+=" -DKDE_INSTALL_BINDIR=${!outputBin}/bin"
1111 cmakeFlags+=" -DKDE_INSTALL_SBINDIR=${!outputBin}/sbin"
1212 cmakeFlags+=" -DKDE_INSTALL_LIBDIR=${!outputLib}/lib"
13− cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/lib/libexec"
13+ cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/libexec"
1414 cmakeFlags+=" -DKDE_INSTALL_CMAKEPACKAGEDIR=${!outputDev}/lib/cmake"
1515 cmakeFlags+=" -DKDE_INSTALL_INCLUDEDIR=${!outputInclude}/include"
1616 cmakeFlags+=" -DKDE_INSTALL_LOCALSTATEDIR=/var"
@@ -51,4 +51,58 @@ _ecmPreConfigureHook() {
5151 cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputBin}/$qtQmlPrefix"
5252 fi
5353}
54−preConfigureHooks+=(_ecmPreConfigureHook)
54+postHooks+=(ecmPostHook)
55+
56+xdgDataSubdirs=(
57+ "doc" "config.kcfg" "kconf_update" "kservices5" "kservicetypes5" \
58+ "kxmlgui5" "knotifications5" "icons" "locale" "sounds" "templates" \
59+ "wallpapers" "applications" "desktop-directories" "mime" "appdata" "dbus-1" \
60+)
61+
62+
63+ecmHostPathSeen=( )
64+
65+ecmUnseenHostPath() {
66+ for pkg in "${ecmHostPathSeen[@]}"
67+ do
68+ if [ "${pkg:?}" == "$1" ]
69+ then
70+ return 1
71+ fi
72+ done
73+
74+ ecmHostPathSeen+=("$1")
75+ return 0
76+}
77+
78+ecmHostPathHook() {
79+ ecmUnseenHostPath "$1" || return 0
80+
81+ local xdgConfigDir="$1/etc/xdg"
82+ if [ -d "$xdgConfigDir" ]
83+ then
84+ qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir")
85+ fi
86+
87+ for xdgDataSubdir in "${xdgDataSubdirs[@]}"
88+ do
89+ if [ -d "$1/share/$xdgDataSubdir" ]
90+ then
91+ qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$1/share")
92+ break
93+ fi
94+ done
95+
96+ local manDir="$1/man"
97+ if [ -d "$manDir" ]
98+ then
99+ qtWrapperArgs+=(--prefix MANPATH : "$manDir")
100+ fi
101+
102+ local infoDir="$1/info"
103+ if [ -d "$infoDir" ]
104+ then
105+ qtWrapperArgs+=(--prefix INFOPATH : "$infoDir")
106+ fi
107+}
108+addEnvHooks "$hostOffset" ecmHostPathHook
pkgs/development/libraries/kde-frameworks/kinit/default.nix+1−3
@@ -9,6 +9,7 @@ let inherit (lib) getLib; in
99mkDerivation {
1010 name = "kinit";
1111 meta = { maintainers = [ lib.maintainers.ttuegel ]; };
12+ outputs = [ "out" "dev" ];
1213 nativeBuildInputs = [ extra-cmake-modules kdoctools ];
1314 buildInputs = [
1415 kconfig kcrash ki18n kio kservice kwindowsystem
@@ -19,9 +20,6 @@ mkDerivation {
1920 ''-DNIXPKGS_KF5_PARTS=\"${getLib kparts}/lib/libKF5Parts.so.5\"''
2021 ''-DNIXPKGS_KF5_PLASMA=\"${getLib plasma-framework}/lib/libKF5Plasma.so.5\"''
2122 ];
22− postFixup = ''
23− moveToOutput "lib/libexec/kf5/start_kdeinit" "$bin"
24− '';
2523 setupHook = writeScript "setup-hook.sh" ''
2624 kinitFixupOutputHook() {
2725 if [ $prefix != ''${!outputBin} ] && [ -d $prefix/lib ]; then
pkgs/development/libraries/libgdata/default.nix+57−8
@@ -1,20 +1,69 @@
1−{ stdenv, fetchurl, pkgconfig, intltool, libxml2, glib, json-glib, gcr
2−, gobject-introspection, liboauth, gnome3, p11-kit, openssl, uhttpmock }:
1+{ stdenv
2+, fetchurl
3+, pkgconfig
4+, meson
5+, ninja
6+, vala
7+, gettext
8+, libxml2
9+, glib
10+, json-glib
11+, gcr
12+, gobject-introspection
13+, liboauth
14+, gnome3
15+, p11-kit
16+, openssl
17+, uhttpmock
18+, libsoup
19+}:
320
421stdenv.mkDerivation rec {
522 pname = "libgdata";
6− version = "0.17.9";
23+ version = "0.17.10";
24+
25+ outputs = [ "out" "dev" "installedTests" ];
726
827 src = fetchurl {
928 url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
10− sha256 = "0fj54yqxdapdppisqm1xcyrpgcichdmipq0a0spzz6009ikzgi45";
29+ sha256 = "04mh2p5x2iidfx0d1cablxbi3hvna8cmlddc1mm4387n0grx3ly1";
1130 };
1231
13− nativeBuildInputs = [ pkgconfig intltool gobject-introspection ];
32+ patches = [
33+ ./installed-tests-path.patch
34+ ];
35+
36+ nativeBuildInputs = [
37+ gettext
38+ gobject-introspection
39+ meson
40+ ninja
41+ pkgconfig
42+ vala
43+ ];
44+
45+ buildInputs = [
46+ gcr
47+ glib
48+ gnome3.gnome-online-accounts
49+ liboauth
50+ libsoup
51+ libxml2
52+ openssl
53+ p11-kit
54+ uhttpmock
55+ ];
1456
15− buildInputs = [ gnome3.libsoup libxml2 glib liboauth gcr gnome3.gnome-online-accounts p11-kit openssl uhttpmock ];
57+ propagatedBuildInputs = [
58+ json-glib
59+ ];
1660
17− propagatedBuildInputs = [ json-glib ];
61+ mesonFlags = [
62+ "-Dgtk_doc=false"
63+ "-Dinstalled_test_bindir=${placeholder ''installedTests''}/libexec"
64+ "-Dinstalled_test_datadir=${placeholder ''installedTests''}/share"
65+ "-Dinstalled_tests=true"
66+ ];
1867
1968 passthru = {
2069 updateScript = gnome3.updateScript {
@@ -26,7 +75,7 @@ stdenv.mkDerivation rec {
2675 meta = with stdenv.lib; {
2776 description = "GData API library";
2877 homepage = https://wiki.gnome.org/Projects/libgdata;
29− maintainers = with maintainers; [ raskin lethalman ];
78+ maintainers = with maintainers; [ raskin lethalman ] ++ gnome3.maintainers;
3079 platforms = platforms.linux;
3180 license = licenses.lgpl21Plus;
3281 };
pkgs/development/libraries/libgdata/installed-tests-path.patchnew file+94
@@ -0,0 +1,94 @@
1+diff --git a/gdata/tests/meson.build b/gdata/tests/meson.build
2+index 52154e7a..1a44d1d8 100644
3+--- a/gdata/tests/meson.build
4++++ b/gdata/tests/meson.build
5+@@ -1,5 +1,12 @@
6+-tests_execdir = gdata_libexecdir / 'installed-tests' / gdata_name
7+-tests_metadir = gdata_datadir / 'installed-tests' / gdata_name
8++tests_bindir = get_option('installed_test_bindir') / 'installed-tests' / gdata_name
9++if tests_bindir == ''
10++ test_bindir = gdata_libexecdir / 'installed-tests' / gdata_name
11++endif
12++
13++tests_datadir = get_option('installed_test_datadir') / 'installed-tests' / gdata_name
14++if tests_datadir == ''
15++ tests_datadir = gdata_datadir / 'installed-tests' / gdata_name
16++endif
17+
18+ tests_sources = files(
19+ 'common.c',
20+@@ -48,7 +55,7 @@ foreach test_name, extra_args: tests
21+ dependencies: common_deps + extra_args.get('dependencies', []),
22+ sources: tests_sources,
23+ install: install_tests,
24+- install_dir: tests_execdir,
25++ install_dir: tests_bindir,
26+ )
27+
28+ test(
29+@@ -63,7 +70,7 @@ if install_tests
30+ foreach test_name, extra_args: tests
31+ tests_conf = {
32+ 'TEST_TYPE': 'session',
33+- 'TEST_ABS_PATH': gdata_prefix / tests_execdir / test_name,
34++ 'TEST_ABS_PATH': tests_bindir / test_name,
35+ }
36+
37+ configure_file (
38+@@ -71,13 +78,13 @@ if install_tests
39+ output: test_name + '.test',
40+ configuration: tests_conf,
41+ install: true,
42+- install_dir: tests_metadir,
43++ install_dir: tests_datadir,
44+ )
45+ endforeach
46+
47+ install_subdir(
48+ 'traces',
49+- install_dir: tests_execdir,
50++ install_dir: tests_bindir,
51+ )
52+
53+ test_data = [
54+@@ -96,6 +103,6 @@ if install_tests
55+
56+ install_data(
57+ test_data,
58+- install_dir: tests_execdir,
59++ install_dir: tests_bindir,
60+ )
61+ endif
62+diff --git a/meson.build b/meson.build
63+index 7d2f5254..bed3e189 100644
64+--- a/meson.build
65++++ b/meson.build
66+@@ -20,9 +20,9 @@ gdata_api_version_minor = 0
67+
68+ # Define the install directories
69+ gdata_prefix = get_option('prefix')
70+-gdata_datadir = get_option('datadir')
71+-gdata_libexecdir = get_option('libexecdir')
72+-gdata_includedir = get_option('includedir')
73++gdata_datadir = gdata_prefix / get_option('datadir')
74++gdata_libexecdir = gdata_prefix / get_option('libexecdir')
75++gdata_includedir = gdata_prefix / get_option('includedir')
76+
77+ gdata_include_subdir = gdata_name / 'gdata'
78+
79+diff --git a/meson_options.txt b/meson_options.txt
80+index 25cc6b55..6fc2cfa3 100644
81+--- a/meson_options.txt
82++++ b/meson_options.txt
83+@@ -43,3 +43,11 @@ option('vapi',
84+ type: 'boolean',
85+ value: true,
86+ description: 'Enable creation of vapi files')
87++
88++option('installed_test_datadir', type: 'string',
89++ value: '',
90++ description: 'Installation directory for data files in tests')
91++
92++option('installed_test_bindir', type: 'string',
93++ value: '',
94++ description: 'Installation directory for binary files in tests')
pkgs/development/libraries/librime/default.nix+3−3
@@ -3,13 +3,13 @@
33
44stdenv.mkDerivation rec {
55 pname = "librime";
6− version = "1.5.0";
6+ version = "1.5.3";
77
88 src = fetchFromGitHub {
99 owner = "rime";
1010 repo = "librime";
1111 rev = "${version}";
12− sha256 = "10wvh1l4317yzcys4rzlkw42i6cj5p8g62r1xzyjw32ky2d0ndxl";
12+ sha256 = "0xskhdhk7dgpc71r39pfzxi5vrlzy90aqj1gzv8nnapq91p2awhv";
1313 };
1414
1515 nativeBuildInputs = [ cmake ];
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
1919 enableParallelBuilding = true;
2020
2121 meta = with stdenv.lib; {
22− homepage = https://rime.im/;
22+ homepage = "https://rime.im/";
2323 description = "Rime Input Method Engine, the core library";
2424 license = licenses.bsd3;
2525 maintainers = with maintainers; [ sifmelcara ];
pkgs/development/libraries/libui/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchgit, cmake, pkgconfig, gtk3, cf-private, Cocoa }:
1+{ stdenv, fetchgit, cmake, pkgconfig, gtk3, Cocoa }:
22
33let
44 shortName = "libui";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616
1717 nativeBuildInputs = [ cmake pkgconfig ];
1818 buildInputs = stdenv.lib.optional stdenv.isLinux gtk3
19− ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa cf-private /* For NSDefaultRunLoopMode */ ];
19+ ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
2020
2121 preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
2222 sed -i 's/set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")//' ./CMakeLists.txt
pkgs/development/libraries/libxkbcommon/default.nix+4−11
@@ -1,11 +1,12 @@
11{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, yacc, xkeyboard_config, libxcb, libX11, doxygen }:
22
33stdenv.mkDerivation rec {
4− name = "libxkbcommon-0.8.0";
4+ pname = "libxkbcommon";
5+ version = "0.8.4";
56
67 src = fetchurl {
7− url = "https://xkbcommon.org/download/${name}.tar.xz";
8− sha256 = "0vgy84vfbig5bqznr137h5arjidnfwrxrdli0pxyn2jfn1fjcag8";
8+ url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
9+ sha256 = "12vc91ydhphd5sddz15560r41l7k0i7mq6nma8kkbzdp6bwwzpb0";
910 };
1011
1112 outputs = [ "out" "dev" "doc" ];
@@ -13,14 +14,6 @@ stdenv.mkDerivation rec {
1314 nativeBuildInputs = [ meson ninja pkgconfig yacc doxygen ];
1415 buildInputs = [ xkeyboard_config libxcb ];
1516
16− patches = [
17− # darwin compatibility
18− (fetchpatch {
19− url = https://github.com/xkbcommon/libxkbcommon/commit/edb1c662394578a54b7bbed231d918925e5d8150.patch;
20− sha256 = "0ydjlir32r3xfsbqhnsx1bz6ags2m908yhf9i09i1s7sgcimbcx5";
21− })
22− ];
23−
2417 mesonFlags = [
2518 "-Denable-wayland=false"
2619 "-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
pkgs/development/libraries/libyaml/default.nix+4−21
@@ -1,31 +1,14 @@
1−{ stdenv, fetchurl, fetchpatch }:
1+{ stdenv, fetchurl }:
22
3−let
4−
5− version = "0.2.1";
6−
7− # https://github.com/yaml/pyyaml/issues/214
8− p1 = fetchpatch {
9− url = https://github.com/yaml/libyaml/commit/8ee83c0da22fe9aa7dea667be8f899a7e32ffb83.patch;
10− sha256 = "00jh39zww6s4gyhxfmlxwb6lz90nl3p51k5h1qm6z3ymik5vljmz";
11− };
12− p2 = fetchpatch {
13− url = https://github.com/yaml/libyaml/commit/56f4b17221868593d6903ee58d6d679b690cf4df.patch;
14− sha256 = "0najcay1y4kgfpsidj7dnyafnwjbav5jyawhyv215zl9gg3386n0";
15− };
16−
17−in
18−
19−stdenv.mkDerivation {
20− name = "libyaml-${version}";
3+stdenv.mkDerivation rec {
4+ pname = "libyaml";
5+ version = "0.2.2";
216
227 src = fetchurl {
238 url = "https://pyyaml.org/download/libyaml/yaml-${version}.tar.gz";
249 sha256 = "1karpcfgacgppa82wm2drcfn2kb6q2wqfykf5nrhy20sci2i2a3q";
2510 };
2611
27− patches = [ p1 p2 ]; # remove when the next release comes out
28−
2912 meta = with stdenv.lib; {
3013 homepage = https://pyyaml.org/;
3114 description = "A YAML 1.1 parser and emitter written in C";
pkgs/development/libraries/opencv/3.x.nix+2−2
@@ -31,7 +31,7 @@
3131, enableDC1394 ? false, libdc1394
3232, enableDocs ? false, doxygen, graphviz-nox
3333
34−, cf-private, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2
34+, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2
3535}:
3636
3737let
@@ -206,7 +206,7 @@ stdenv.mkDerivation rec {
206206 ++ lib.optionals enableTesseract [ tesseract leptonica ]
207207 ++ lib.optional enableTbb tbb
208208 ++ lib.optional enableCuda cudatoolkit
209− ++ lib.optionals stdenv.isDarwin [ cf-private AVFoundation Cocoa VideoDecodeAcceleration bzip2 ]
209+ ++ lib.optionals stdenv.isDarwin [ bzip2 AVFoundation Cocoa VideoDecodeAcceleration ]
210210 ++ lib.optionals enableDocs [ doxygen graphviz-nox ];
211211
212212 propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
pkgs/development/libraries/opencv/4.x.nix+2−2
@@ -31,7 +31,7 @@
3131, enableDC1394 ? false, libdc1394
3232, enableDocs ? false, doxygen, graphviz-nox
3333
34−, cf-private, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2
34+, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2
3535}:
3636
3737let
@@ -213,7 +213,7 @@ stdenv.mkDerivation rec {
213213 ++ lib.optionals enableTesseract [ tesseract leptonica ]
214214 ++ lib.optional enableTbb tbb
215215 ++ lib.optional enableCuda cudatoolkit
216− ++ lib.optionals stdenv.isDarwin [ cf-private AVFoundation Cocoa VideoDecodeAcceleration bzip2 ]
216+ ++ lib.optionals stdenv.isDarwin [ bzip2 AVFoundation Cocoa VideoDecodeAcceleration ]
217217 ++ lib.optionals enableDocs [ doxygen graphviz-nox ];
218218
219219 propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
pkgs/development/libraries/opencv/default.nix+2−2
@@ -10,7 +10,7 @@
1010, enableFfmpeg ? false, ffmpeg
1111, enableGStreamer ? false, gst_all_1
1212, enableEigen ? true, eigen
13−, cf-private, Cocoa, QTKit
13+, Cocoa, QTKit
1414}:
1515
1616let
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
5454 ++ lib.optional enableFfmpeg ffmpeg
5555 ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
5656 ++ lib.optional enableEigen eigen
57− ++ lib.optionals stdenv.isDarwin [ Cocoa QTKit cf-private /* For NSDefaultRunLoopMode */ ]
57+ ++ lib.optionals stdenv.isDarwin [ Cocoa QTKit ]
5858 ;
5959
6060 propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
pkgs/development/libraries/pcl/default.nix+2−2
@@ -1,6 +1,6 @@
11{ stdenv, fetchFromGitHub, cmake
22, qhull, flann, boost, vtk, eigen, pkgconfig, qtbase
3−, libusb1, libpcap, libXt, libpng, Cocoa, AGL, cf-private, OpenGL
3+, libusb1, libpcap, libXt, libpng, Cocoa, AGL, OpenGL
44}:
55
66stdenv.mkDerivation rec {
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
1818 nativeBuildInputs = [ pkgconfig cmake ];
1919 buildInputs = [ qhull flann boost eigen libusb1 libpcap
2020 libpng vtk qtbase libXt ]
21+ ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa AGL ];
2122
22− ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa AGL cf-private ];
2323 cmakeFlags = stdenv.lib.optionals stdenv.isDarwin [
2424 "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
2525 ];
pkgs/development/libraries/qt-4.x/4.8/default.nix+2−2
@@ -14,7 +14,7 @@
1414, examples ? false
1515, demos ? false
1616# darwin support
17−, cf-private, libobjc, ApplicationServices, OpenGL, Cocoa, AGL, libcxx
17+, libobjc, ApplicationServices, OpenGL, Cocoa, AGL, libcxx
1818}:
1919
2020let
@@ -189,7 +189,7 @@ stdenv.mkDerivation rec {
189189 postgresql sqlite libjpeg libmng libtiff icu ]
190190 ++ lib.optionals (mysql != null) [ mysql.connector-c ]
191191 ++ lib.optionals gtkStyle [ gtk2 gdk_pixbuf ]
192− ++ lib.optionals stdenv.isDarwin [ cf-private ApplicationServices OpenGL Cocoa AGL libcxx libobjc ];
192+ ++ lib.optionals stdenv.isDarwin [ ApplicationServices OpenGL Cocoa AGL libcxx libobjc ];
193193
194194 nativeBuildInputs = [ perl pkgconfig which ];
195195
pkgs/development/libraries/qt-5/5.11/default.nix+27−17
@@ -17,10 +17,10 @@ top-level attribute to `top-level/all-packages.nix`.
1717
1818{
1919 newScope,
20− stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
20+ stdenv, fetchurl, fetchFromGitHub, makeSetupHook, makeWrapper,
2121 bison, cups ? null, harfbuzz, libGL, perl,
2222 gstreamer, gst-plugins-base, gtk3, dconf,
23− cf-private, llvmPackages_5,
23+ llvmPackages_5,
2424
2525 # options
2626 developerBuild ? false,
@@ -34,6 +34,8 @@ let
3434
3535 qtCompatVersion = "5.11";
3636
37+ stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
38+
3739 mirror = "https://download.qt.io";
3840 srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
3941 # Community port of the now unmaintained upstream qtwebkit.
@@ -64,16 +66,18 @@ let
6466 qtwebkit = [ ./qtwebkit.patch ];
6567 };
6668
67− mkDerivation =
68− import ../mkDerivation.nix {
69− inherit (stdenv) lib;
70− stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
71− }
72− { inherit debug; };
73−
7469 qtModule =
7570 import ../qtModule.nix
76− { inherit mkDerivation perl; inherit (stdenv) lib; }
71+ {
72+ inherit perl;
73+ inherit (stdenv) lib;
74+ # Use a variant of mkDerivation that does not include wrapQtApplications
75+ # to avoid cyclic dependencies between Qt modules.
76+ mkDerivation =
77+ import ../mkDerivation.nix
78+ { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
79+ stdenvActual.mkDerivation;
80+ }
7781 { inherit self srcs patches; };
7882
7983 addPackages = self: with self;
@@ -81,7 +85,11 @@ let
8185 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
8286 in {
8387
84− inherit mkDerivation;
88+ mkDerivationWith =
89+ import ../mkDerivation.nix
90+ { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
91+
92+ mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
8593
8694 qtbase = callPackage ../modules/qtbase.nix {
8795 inherit (srcs.qtbase) src version;
@@ -92,17 +100,13 @@ let
92100 };
93101
94102 qtcharts = callPackage ../modules/qtcharts.nix {};
95− qtconnectivity = callPackage ../modules/qtconnectivity.nix {
96− inherit cf-private;
97− };
103+ qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
98104 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
99105 qtdoc = callPackage ../modules/qtdoc.nix {};
100106 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
101107 qtimageformats = callPackage ../modules/qtimageformats.nix {};
102108 qtlocation = callPackage ../modules/qtlocation.nix { };
103− qtmacextras = callPackage ../modules/qtmacextras.nix {
104− inherit cf-private;
105− };
109+ qtmacextras = callPackage ../modules/qtmacextras.nix {};
106110 qtmultimedia = callPackage ../modules/qtmultimedia.nix {
107111 inherit gstreamer gst-plugins-base;
108112 };
@@ -146,6 +150,12 @@ let
146150 fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
147151 };
148152 } ../hooks/qmake-hook.sh;
153+
154+ wrapQtAppsHook = makeSetupHook {
155+ deps =
156+ [ self.qtbase.dev makeWrapper ]
157+ ++ optional stdenv.isLinux self.qtwayland.dev;
158+ } ../hooks/wrap-qt-apps-hook.sh;
149159 };
150160
151161 self = makeScope newScope addPackages;
pkgs/development/libraries/qt-5/5.12/default.nix+27−17
@@ -17,10 +17,10 @@ top-level attribute to `top-level/all-packages.nix`.
1717
1818{
1919 newScope,
20− stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
20+ stdenv, fetchurl, fetchFromGitHub, makeSetupHook, makeWrapper,
2121 bison, cups ? null, harfbuzz, libGL, perl,
2222 gstreamer, gst-plugins-base, gtk3, dconf,
23− cf-private, llvmPackages_5,
23+ llvmPackages_5,
2424
2525 # options
2626 developerBuild ? false,
@@ -34,6 +34,8 @@ let
3434
3535 qtCompatVersion = "5.12";
3636
37+ stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
38+
3739 mirror = "https://download.qt.io";
3840 srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
3941 # Community port of the now unmaintained upstream qtwebkit.
@@ -69,16 +71,18 @@ let
6971 qttools = [ ./qttools.patch ];
7072 };
7173
72− mkDerivation =
73− import ../mkDerivation.nix {
74− inherit (stdenv) lib;
75− stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
76− }
77− { inherit debug; };
78−
7974 qtModule =
8075 import ../qtModule.nix
81− { inherit mkDerivation perl; inherit (stdenv) lib; }
76+ {
77+ inherit perl;
78+ inherit (stdenv) lib;
79+ # Use a variant of mkDerivation that does not include wrapQtApplications
80+ # to avoid cyclic dependencies between Qt modules.
81+ mkDerivation =
82+ import ../mkDerivation.nix
83+ { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
84+ stdenvActual.mkDerivation;
85+ }
8286 { inherit self srcs patches; };
8387
8488 addPackages = self: with self;
@@ -86,7 +90,11 @@ let
8690 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
8791 in {
8892
89− inherit mkDerivation;
93+ mkDerivationWith =
94+ import ../mkDerivation.nix
95+ { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
96+
97+ mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
9098
9199 qtbase = callPackage ../modules/qtbase.nix {
92100 inherit (srcs.qtbase) src version;
@@ -97,17 +105,13 @@ let
97105 };
98106
99107 qtcharts = callPackage ../modules/qtcharts.nix {};
100− qtconnectivity = callPackage ../modules/qtconnectivity.nix {
101− inherit cf-private;
102− };
108+ qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
103109 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
104110 qtdoc = callPackage ../modules/qtdoc.nix {};
105111 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
106112 qtimageformats = callPackage ../modules/qtimageformats.nix {};
107113 qtlocation = callPackage ../modules/qtlocation.nix {};
108− qtmacextras = callPackage ../modules/qtmacextras.nix {
109− inherit cf-private;
110− };
114+ qtmacextras = callPackage ../modules/qtmacextras.nix {};
111115 qtmultimedia = callPackage ../modules/qtmultimedia.nix {
112116 inherit gstreamer gst-plugins-base;
113117 };
@@ -151,6 +155,12 @@ let
151155 fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
152156 };
153157 } ../hooks/qmake-hook.sh;
158+
159+ wrapQtAppsHook = makeSetupHook {
160+ deps =
161+ [ self.qtbase.dev makeWrapper ]
162+ ++ optional stdenv.isLinux self.qtwayland.dev;
163+ } ../hooks/wrap-qt-apps-hook.sh;
154164 };
155165
156166 self = makeScope newScope addPackages;
pkgs/development/libraries/qt-5/5.6/default.nix+23−12
@@ -26,10 +26,9 @@ existing packages here and modify it as necessary.
2626
2727{
2828 newScope,
29− stdenv, fetchurl, fetchpatch, makeSetupHook,
29+ stdenv, fetchurl, fetchpatch, makeSetupHook, makeWrapper,
3030 bison, cups ? null, harfbuzz, libGL, perl,
3131 gstreamer, gst-plugins-base,
32− cf-private,
3332
3433 # options
3534 developerBuild ? false,
@@ -105,14 +104,18 @@ let
105104 ];
106105 };
107106
108− mkDerivation =
109− import ../mkDerivation.nix
110− { inherit stdenv; inherit (stdenv) lib; }
111− { inherit debug; };
112−
113107 qtModule =
114108 import ../qtModule.nix
115− { inherit mkDerivation perl; inherit (stdenv) lib; }
109+ {
110+ inherit perl;
111+ inherit (stdenv) lib;
112+ # Use a variant of mkDerivation that does not include wrapQtApplications
113+ # to avoid cyclic dependencies between Qt modules.
114+ mkDerivation =
115+ import ../mkDerivation.nix
116+ { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
117+ stdenv.mkDerivation;
118+ }
116119 { inherit self srcs patches; };
117120
118121 addPackages = self: with self;
@@ -120,7 +123,11 @@ let
120123 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
121124 in {
122125
123− inherit mkDerivation;
126+ mkDerivationWith =
127+ import ../mkDerivation.nix
128+ { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
129+
130+ mkDerivation = mkDerivationWith stdenv.mkDerivation;
124131
125132 qtbase = callPackage ../modules/qtbase.nix {
126133 inherit bison cups harfbuzz libGL;
@@ -133,9 +140,7 @@ let
133140 /* qtactiveqt = not packaged */
134141 /* qtandroidextras = not packaged */
135142 /* qtcanvas3d = not packaged */
136− qtconnectivity = callPackage ../modules/qtconnectivity.nix {
137− inherit cf-private;
138− };
143+ qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
139144 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
140145 qtdoc = callPackage ../modules/qtdoc.nix {};
141146 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
@@ -176,6 +181,12 @@ let
176181 deps = [ self.qtbase.dev ];
177182 substitutions = { inherit (stdenv) isDarwin; };
178183 } ../hooks/qmake-hook.sh;
184+
185+ wrapQtAppsHook = makeSetupHook {
186+ deps =
187+ [ self.qtbase.dev makeWrapper ]
188+ ++ optional stdenv.isLinux self.qtwayland.dev;
189+ } ../hooks/wrap-qt-apps-hook.sh;
179190 };
180191
181192 self = makeScope newScope addPackages;
pkgs/development/libraries/qt-5/5.9/default.nix+24−15
@@ -17,10 +17,9 @@ top-level attribute to `top-level/all-packages.nix`.
1717
1818{
1919 newScope,
20− stdenv, fetchurl, fetchpatch, makeSetupHook,
20+ stdenv, fetchurl, fetchpatch, makeSetupHook, makeWrapper,
2121 bison, cups ? null, harfbuzz, libGL, perl,
2222 gstreamer, gst-plugins-base, gtk3, dconf,
23− cf-private,
2423
2524 # options
2625 developerBuild ? false,
@@ -68,14 +67,18 @@ let
6867
6968 };
7069
71− mkDerivation =
72− import ../mkDerivation.nix
73− { inherit stdenv; inherit (stdenv) lib; }
74− { inherit debug; };
75−
7670 qtModule =
7771 import ../qtModule.nix
78− { inherit mkDerivation perl; inherit (stdenv) lib; }
72+ {
73+ inherit perl;
74+ inherit (stdenv) lib;
75+ # Use a variant of mkDerivation that does not include wrapQtApplications
76+ # to avoid cyclic dependencies between Qt modules.
77+ mkDerivation =
78+ import ../mkDerivation.nix
79+ { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
80+ stdenv.mkDerivation;
81+ }
7982 { inherit self srcs patches; };
8083
8184 addPackages = self: with self;
@@ -83,7 +86,11 @@ let
8386 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
8487 in {
8588
86− inherit mkDerivation;
89+ mkDerivationWith =
90+ import ../mkDerivation.nix
91+ { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
92+
93+ mkDerivation = mkDerivationWith stdenv.mkDerivation;
8794
8895 qtbase = callPackage ../modules/qtbase.nix {
8996 inherit (srcs.qtbase) src version;
@@ -94,17 +101,13 @@ let
94101 };
95102
96103 qtcharts = callPackage ../modules/qtcharts.nix {};
97− qtconnectivity = callPackage ../modules/qtconnectivity.nix {
98− inherit cf-private;
99− };
104+ qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
100105 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
101106 qtdoc = callPackage ../modules/qtdoc.nix {};
102107 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
103108 qtimageformats = callPackage ../modules/qtimageformats.nix {};
104109 qtlocation = callPackage ../modules/qtlocation.nix {};
105− qtmacextras = callPackage ../modules/qtmacextras.nix {
106− inherit cf-private;
107− };
110+ qtmacextras = callPackage ../modules/qtmacextras.nix {};
108111 qtmultimedia = callPackage ../modules/qtmultimedia.nix {
109112 inherit gstreamer gst-plugins-base;
110113 };
@@ -145,6 +148,12 @@ let
145148 fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
146149 };
147150 } ../hooks/qmake-hook.sh;
151+
152+ wrapQtAppsHook = makeSetupHook {
153+ deps =
154+ [ self.qtbase.dev makeWrapper ]
155+ ++ optional stdenv.isLinux self.qtwayland.dev;
156+ } ../hooks/wrap-qt-apps-hook.sh;
148157 };
149158
150159 self = makeScope newScope addPackages;
pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh+12−10
@@ -19,12 +19,14 @@ export QMAKEPATH
1919QMAKEMODULES=
2020export QMAKEMODULES
2121
22−addToQMAKEPATH() {
23− if [ -d "$1/mkspecs" ]; then
22+qmakePathHook() {
23+ if [ -d "$1/mkspecs" ]
24+ then
2425 QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs"
2526 QMAKEPATH="${QMAKEPATH}${QMAKEPATH:+:}$1"
2627 fi
2728}
29+envBuildHostHooks+=(qmakePathHook)
2830
2931# Propagate any runtime dependency of the building package.
3032# Each dependency is propagated to the user environment and as a build
@@ -32,18 +34,18 @@ addToQMAKEPATH() {
3234# package depending on the building package. (This is necessary in case
3335# the building package does not provide runtime dependencies itself and so
3436# would not be propagated to the user environment.)
35−qtEnvHook() {
36− addToQMAKEPATH "$1"
37− if providesQtRuntime "$1"; then
38− if [ "z${!outputBin}" != "z${!outputDev}" ]; then
39− propagatedBuildInputs+=" $1"
40− fi
41− propagatedUserEnvPkgs+=" $1"
37+qtEnvHostTargetHook() {
38+ if providesQtRuntime "$1" && [ "z${!outputBin}" != "z${!outputDev}" ]
39+ then
40+ propagatedBuildInputs+=" $1"
4241 fi
4342}
44−envHostTargetHooks+=(qtEnvHook)
43+envHostTargetHooks+=(qtEnvHostTargetHook)
4544
4645postPatchMkspecs() {
46+ # Prevent this hook from running multiple times
47+ dontPatchMkspecs=1
48+
4749 local bin="${!outputBin}"
4850 local dev="${!outputDev}"
4951 local doc="${!outputDoc}"
pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.shnew file+106
@@ -0,0 +1,106 @@
1+# Inherit arguments given in mkDerivation
2+qtWrapperArgs=( $qtWrapperArgs )
3+
4+qtHostPathSeen=()
5+
6+qtUnseenHostPath() {
7+ for pkg in "${qtHostPathSeen[@]}"
8+ do
9+ if [ "${pkg:?}" == "$1" ]
10+ then
11+ return 1
12+ fi
13+ done
14+
15+ qtHostPathSeen+=("$1")
16+ return 0
17+}
18+
19+qtHostPathHook() {
20+ qtUnseenHostPath "$1" || return 0
21+
22+ local pluginDir="$1/${qtPluginPrefix:?}"
23+ if [ -d "$pluginDir" ]
24+ then
25+ qtWrapperArgs+=(--prefix QT_PLUGIN_PATH : "$pluginDir")
26+ fi
27+
28+ local qmlDir="$1/${qtQmlPrefix:?}"
29+ if [ -d "$qmlDir" ]
30+ then
31+ qtWrapperArgs+=(--prefix QML2_IMPORT_PATH : "$qmlDir")
32+ fi
33+}
34+addEnvHooks "$hostOffset" qtHostPathHook
35+
36+makeQtWrapper() {
37+ local original="$1"
38+ local wrapper="$2"
39+ shift 2
40+ makeWrapper "$original" "$wrapper" "${qtWrapperArgs[@]}" "$@"
41+}
42+
43+wrapQtApp() {
44+ local program="$1"
45+ shift 1
46+ wrapProgram "$program" "${qtWrapperArgs[@]}" "$@"
47+}
48+
49+qtOwnPathsHook() {
50+ local xdgDataDir="${!outputBin}/share"
51+ if [ -d "$xdgDataDir" ]
52+ then
53+ qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$xdgDataDir")
54+ fi
55+
56+ local xdgConfigDir="${!outputBin}/etc/xdg"
57+ if [ -d "$xdgConfigDir" ]
58+ then
59+ qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir")
60+ fi
61+
62+ qtHostPathHook "${!outputBin}"
63+}
64+
65+preFixupPhases+=" qtOwnPathsHook"
66+
67+isQtApp () {
68+ readelf -d "$1" 2>/dev/null | grep -q -F 'libQt5Core'
69+}
70+
71+# Note: $qtWrapperArgs still gets defined even if $dontWrapQtApps is set.
72+wrapQtAppsHook() {
73+ # skip this hook when requested
74+ [ -z "$dontWrapQtApps" ] || return 0
75+
76+ # guard against running multiple times (e.g. due to propagation)
77+ [ -z "$wrapQtAppsHookHasRun" ] || return 0
78+ wrapQtAppsHookHasRun=1
79+
80+ local targetDirs=( "$prefix/bin" )
81+ echo "wrapping Qt applications in ${targetDirs[@]}"
82+
83+ for targetDir in "${targetDirs[@]}"
84+ do
85+ [ -d "$targetDir" ] || continue
86+
87+ find "$targetDir" -executable -print0 | while IFS= read -r -d '' file
88+ do
89+ isQtApp "$file" || continue
90+
91+ if [ -f "$file" ]
92+ then
93+ echo "wrapping $file"
94+ wrapQtApp "$file"
95+ elif [ -h "$file" ]
96+ then
97+ target="$(readlink -e "$file")"
98+ echo "wrapping $file -> $target"
99+ rm "$file"
100+ makeQtWrapper "$target" "$file"
101+ fi
102+ done
103+ done
104+}
105+
106+fixupOutputHooks+=(wrapQtAppsHook)
pkgs/development/libraries/qt-5/mkDerivation.nix+5−3
@@ -1,8 +1,8 @@
1−{ stdenv, lib }:
1+{ lib, debug, wrapQtAppsHook }:
22
33let inherit (lib) optional; in
44
5−{ debug }:
5+mkDerivation:
66
77args:
88
@@ -24,7 +24,9 @@ let
2424
2525 enableParallelBuilding = args.enableParallelBuilding or true;
2626
27+ nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ wrapQtAppsHook ];
28+
2729 };
2830in
2931
30−stdenv.mkDerivation (args // args_)
32+mkDerivation (args // args_)
pkgs/development/libraries/qt-5/modules/qtbase.nix−2
@@ -78,8 +78,6 @@ stdenv.mkDerivation {
7878 [ libinput ]
7979 ++ lib.optional withGtk3 gtk3
8080 )
81− # Needed for OBJC_CLASS_$_NSDate symbols.
82− ++ lib.optional stdenv.isDarwin darwin.cf-private
8381 ++ lib.optional developerBuild gdb
8482 ++ lib.optional (cups != null) cups
8583 ++ lib.optional (mysql != null) mysql.connector-c
pkgs/development/libraries/qt-5/modules/qtconnectivity.nix+2−2
@@ -1,8 +1,8 @@
1−{ qtModule, stdenv, qtbase, qtdeclarative, bluez, cf-private }:
1+{ qtModule, stdenv, qtbase, qtdeclarative, bluez }:
22
33qtModule {
44 name = "qtconnectivity";
55 qtInputs = [ qtbase qtdeclarative ];
6− buildInputs = if stdenv.isDarwin then [ cf-private ] else [ bluez ];
6+ buildInputs = stdenv.lib.optional stdenv.isLinux bluez;
77 outputs = [ "out" "dev" "bin" ];
88}
pkgs/development/libraries/qt-5/modules/qtmacextras.nix+2−4
@@ -1,10 +1,8 @@
1−{ stdenv, qtModule, qtbase, cf-private }:
1+{ stdenv, qtModule, qtbase }:
22
33qtModule {
44 name = "qtmacextras";
5− qtInputs = [ qtbase ]
6− # Needed for _OBJC_CLASS_$_NSData symbols.
7− ++ stdenv.lib.optional stdenv.isDarwin cf-private;
5+ qtInputs = [ qtbase ];
86 meta = with stdenv.lib; {
97 maintainers = with maintainers; [ periklis ];
108 platforms = platforms.darwin;
pkgs/development/libraries/qt-5/modules/qtspeech.nix+1−1
@@ -3,5 +3,5 @@
33qtModule {
44 name = "qtspeech";
55 qtInputs = [ ];
6− outputs = [ "out" "dev" "bin" ];
6+ outputs = [ "out" "dev" ];
77}
pkgs/development/libraries/qt-5/modules/qtwebengine.nix−8
@@ -200,14 +200,6 @@ EOF
200200 (runCommand "MacOS_SDK_sandbox.h" {} ''
201201 install -Dm444 "${lib.getDev darwin.apple_sdk.sdk}"/include/sandbox.h "$out"/include/sandbox.h
202202 '')
203−
204− # For:
205− # _NSDefaultRunLoopMode
206− # _OBJC_CLASS_$_NSDate
207− # _OBJC_CLASS_$_NSDictionary
208− # _OBJC_CLASS_$_NSRunLoop
209− # _OBJC_CLASS_$_NSURL
210− darwin.cf-private
211203 ]);
212204
213205 __impureHostDeps = optional stdenv.isDarwin "/usr/lib/libsandbox.1.dylib";
pkgs/development/libraries/qt-5/modules/qtwebkit.nix+1−1
@@ -28,7 +28,7 @@ qtModule {
2828 ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
2929 ++ optional usingAnnulenWebkitFork qtwebchannel;
3030 buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
31− ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ cf-private ICU OpenGL ])
31+ ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ])
3232 ++ optional usingAnnulenWebkitFork hyphen;
3333 nativeBuildInputs = [
3434 bison2 flex gdb gperf perl pkgconfig python2 ruby
pkgs/development/libraries/qt-5/modules/qtwebview.nix+2−8
@@ -1,20 +1,14 @@
11{ darwin, stdenv, qtModule, qtdeclarative, qtwebengine }:
22
33with stdenv.lib;
4−
4+
55qtModule {
66 name = "qtwebview";
77 qtInputs = [ qtdeclarative qtwebengine ];
88 buildInputs = optional (stdenv.isDarwin) [
99 darwin.apple_sdk.frameworks.CoreFoundation
1010 darwin.apple_sdk.frameworks.WebKit
11−
12− # For:
13− # _OBJC_CLASS_$_NSArray
14− # _OBJC_CLASS_$_NSDate
15− # _OBJC_CLASS_$_NSURL
16− darwin.cf-private
1711 ];
1812 outputs = [ "out" "dev" "bin" ];
1913 NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation -framework WebKit";
20−}
14+}
pkgs/development/libraries/sfml/default.nix+2−5
@@ -1,6 +1,6 @@
11{ stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
22, glew, libXrandr, libXrender, udev, xcbutilimage
3−, cf-private, IOKit, Foundation, AppKit, OpenAL
3+, IOKit, Foundation, AppKit, OpenAL
44}:
55
66let
@@ -19,10 +19,7 @@ stdenv.mkDerivation rec {
1919 buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
2020 ++ stdenv.lib.optional stdenv.isLinux udev
2121 ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
22− ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL
23− # Needed for _NSDefaultRunLoopMode, _OBJC_CLASS_$_NSArray, _OBJC_CLASS_$_NSDate
24− cf-private
25− ];
22+ ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
2623
2724 cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
2825 "-DSFML_MISC_INSTALL_PREFIX=share/SFML"
pkgs/development/libraries/tk/generic.nix+2−4
@@ -32,11 +32,9 @@ stdenv.mkDerivation {
3232 ++ stdenv.lib.optional enableAqua "--enable-aqua";
3333
3434 nativeBuildInputs = [ pkgconfig ];
35+ buildInputs = lib.optional enableAqua (with darwin.apple_sdk.frameworks; [ Cocoa ]);
3536
36− propagatedBuildInputs = [ tcl libXft ]
37− ++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
38− Cocoa cf-private
39− ]);
37+ propagatedBuildInputs = [ tcl libXft ];
4038
4139 doCheck = false; # fails. can't find itself
4240
pkgs/development/libraries/vtk/default.nix+8−8
@@ -2,7 +2,7 @@
22, qtLib ? null
33# Darwin support
44, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL
5−, ApplicationServices, CoreText, IOSurface, cf-private, ImageIO, xpc, libobjc }:
5+, ApplicationServices, CoreText, IOSurface, ImageIO, xpc, libobjc }:
66
77with stdenv.lib;
88
@@ -20,13 +20,13 @@ stdenv.mkDerivation rec {
2020 sha256 = "1hrjxkcvs3ap0bdhk90vymz5pgvxmg7q6sz8ab3wsyddbshr1abq";
2121 };
2222
23− buildInputs =
24− if !stdenv.isDarwin
25− then [ cmake libGLU_combined libX11 xorgproto libXt ] ++ optional (qtLib != null) qtLib
26− else [ cmake qtLib xpc CoreServices DiskArbitration IOKit cf-private
27− CFNetwork Security ApplicationServices CoreText IOSurface ImageIO
28− OpenGL GLUT ];
29− propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ Cocoa libobjc ];
23+ buildInputs = [ cmake ]
24+ ++ optional (qtLib != null) qtLib
25+ ++ optionals stdenv.isLinux [ libGLU_combined libX11 xorgproto libXt ]
26+ ++ optionals stdenv.isDarwin [ xpc Cocoa CoreServices DiskArbitration IOKit
27+ CFNetwork Security ApplicationServices CoreText
28+ IOSurface ImageIO OpenGL GLUT ];
29+ propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ libobjc ];
3030
3131
3232 preBuild = ''
pkgs/development/libraries/wxwidgets/3.0/mac.nix+2−9
@@ -1,6 +1,6 @@
11{ stdenv, fetchzip, expat, libiconv, libjpeg, libpng, libtiff, zlib
22# darwin only attributes
3−, cf-private, derez, rez, setfile
3+, derez, rez, setfile
44, AGL, Cocoa, Kernel
55}:
66
@@ -16,15 +16,9 @@ stdenv.mkDerivation rec {
1616 buildInputs = [
1717 expat libiconv libjpeg libpng libtiff zlib
1818 derez rez setfile
19− Cocoa Kernel
20−
21− # Needed for CFURLGetFSRef, etc. which have deen deprecated
22− # since 10.9 and are not part of swift-corelibs CoreFoundation.
23− cf-private
19+ AGL Cocoa Kernel
2420 ];
2521
26− propagatedBuildInputs = [ AGL ];
27−
2822 postPatch = ''
2923 substituteInPlace configure --replace "-framework System" -lSystem
3024 '';
@@ -71,6 +65,5 @@ stdenv.mkDerivation rec {
7165 homepage = https://www.wxwidgets.org/;
7266 description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
7367 longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
74− broken = true;
7568 };
7669}
pkgs/development/python-modules/numpy/default.nix+3−1
@@ -1,4 +1,4 @@
1−{ lib, fetchPypi, python, buildPythonPackage, gfortran, pytest, blas, writeTextFile }:
1+{ lib, fetchPypi, python, buildPythonPackage, gfortran, pytest, blas, writeTextFile, isPyPy }:
22
33let
44 blasImplementation = lib.nameFromURL blas.name "-";
@@ -45,6 +45,8 @@ in buildPythonPackage rec {
4545
4646 enableParallelBuilding = true;
4747
48+ doCheck = !isPyPy; # numpy 1.16+ hits a bug in pypy's ctypes, using either numpy or pypy HEAD fixes this (https://github.com/numpy/numpy/issues/13807)
49+
4850 checkPhase = ''
4951 runHook preCheck
5052 pushd dist
pkgs/development/python-modules/pytest/default.nix+2−1
@@ -1,6 +1,6 @@
11{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py
22, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
3−, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging
3+, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy
44}:
55buildPythonPackage rec {
66 version = "4.6.3";
@@ -22,6 +22,7 @@ buildPythonPackage rec {
2222 ++ stdenv.lib.optionals (!isPy3k) [ funcsigs ]
2323 ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ];
2424
25+ doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
2526 checkPhase = ''
2627 runHook preCheck
2728 $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths"
pkgs/development/python-modules/watchdog/default.nix+1−1
@@ -17,7 +17,7 @@ buildPythonPackage rec {
1717 };
1818
1919 buildInputs = stdenv.lib.optionals stdenv.isDarwin
20− [ pkgs.darwin.apple_sdk.frameworks.CoreServices pkgs.darwin.cf-private ];
20+ [ pkgs.darwin.apple_sdk.frameworks.CoreServices ];
2121 propagatedBuildInputs = [ argh pathtools pyyaml ];
2222
2323 doCheck = false;
pkgs/development/r-modules/wrapper-rstudio.nix+5−4
@@ -1,4 +1,4 @@
1−{ lib, runCommand, R, rstudio, makeWrapper, recommendedPackages, packages, qtbase }:
1+{ lib, runCommand, R, rstudio, wrapQtAppsHook, recommendedPackages, packages, qtbase }:
22
33let
44 qtVersion = with lib.versions; "${major qtbase.version}.${minor qtbase.version}";
@@ -7,7 +7,8 @@ runCommand (rstudio.name + "-wrapper") {
77 preferLocalBuild = true;
88 allowSubstitutes = false;
99
10− nativeBuildInputs = [makeWrapper];
10+ nativeBuildInputs = [wrapQtAppsHook];
11+ dontWrapQtApps = true;
1112
1213 buildInputs = [R rstudio] ++ recommendedPackages ++ packages;
1314
@@ -29,6 +30,6 @@ echo -n ".libPaths(c(.libPaths(), \"" >> $out/$fixLibsR
2930echo -n $R_LIBS_SITE | sed -e 's/:/", "/g' >> $out/$fixLibsR
3031echo -n "\"))" >> $out/$fixLibsR
3132echo >> $out/$fixLibsR
32−makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio --set R_PROFILE_USER $out/$fixLibsR \
33− --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
33+makeQtWrapper ${rstudio}/bin/rstudio $out/bin/rstudio \
34+ --set R_PROFILE_USER $out/$fixLibsR
3435''
pkgs/development/tools/analysis/flow/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, ocamlPackages, cf-private, CoreServices }:
1+{ stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
22
33stdenv.mkDerivation rec {
44 pname = "flow";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
1717 '';
1818
1919 buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild dtoa core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec ppx_tools_versioned visitors wtf8 ])
20− ++ stdenv.lib.optionals stdenv.isDarwin [ cf-private CoreServices ];
20+ ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
2121
2222 meta = with stdenv.lib; {
2323 description = "A static type checker for JavaScript";
pkgs/development/tools/analysis/hopper/default.nix+12−14
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgs, makeWrapper, lib }:
1+{ stdenv, fetchurl, pkgs, lib }:
22
33stdenv.mkDerivation rec {
44 pname = "hopper";
@@ -16,22 +16,20 @@ stdenv.mkDerivation rec {
1616libbsd.out libffi.out gmpxx.out python27Full.out python27Packages.libxml2 qt5.qtbase zlib xlibs.libX11.out xorg_sys_opengl.out xlibs.libXrender.out gcc-unwrapped.lib
1717 ];
1818
19− nativeBuildInputs = [ makeWrapper ];
19+ nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
20+
21+ qtWrapperArgs = [ ''--suffix LD_LIBRARY_PATH : ${ldLibraryPath}'' ];
2022
2123 installPhase = ''
22− mkdir -p $out/bin
23− mkdir -p $out/lib
24− mkdir -p $out/share
25− cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
26− cp -r $sourceRoot/opt/hopper-${rev}/lib $out
27− cp -r $sourceRoot/usr/share $out/share
24+ mkdir -p $out/bin
25+ mkdir -p $out/lib
26+ mkdir -p $out/share
27+ cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
28+ cp -r $sourceRoot/opt/hopper-${rev}/lib $out
29+ cp -r $sourceRoot/usr/share $out/share
2830 patchelf \
29− --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
30− $out/bin/hopper
31− # Details: https://nixos.wiki/wiki/Qt
32− wrapProgram $out/bin/hopper \
33− --suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
34− --suffix QT_PLUGIN_PATH : ${pkgs.qt5.qtbase}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins
31+ --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
32+ $out/bin/hopper
3533 '';
3634
3735 meta = {
pkgs/development/tools/cargo-web/default.nix+2−6
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub, openssl, perl, pkgconfig, rustPlatform
2−, CoreServices, Security, cf-private
2+, CoreServices, Security
33}:
44
55rustPlatform.buildRustPackage rec {
@@ -16,11 +16,7 @@ rustPlatform.buildRustPackage rec {
1616 cargoSha256 = "1f4sj260q4rlzbajwimya1yhh90hmmbhr47yfg9i8xcv5cg0cqjn";
1717
1818 nativeBuildInputs = [ openssl perl pkgconfig ];
19− buildInputs = stdenv.lib.optionals stdenv.isDarwin [
20− CoreServices Security
21− # Needed for CFURLResourceIsReachable symbols.
22− cf-private
23− ];
19+ buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
2420
2521 meta = with stdenv.lib; {
2622 description = "A Cargo subcommand for the client-side Web";
pkgs/development/tools/qtcreator/default.nix+8−8
@@ -10,7 +10,7 @@ let
1010 revision = "1";
1111
1212 # Fetch clang from qt vendor, this contains submodules like this:
13− # clang<-clang-tools-extra<-clazy.
13+ # clang<-clang-tools-extra<-clazy.
1414 clang_qt_vendor = llvmPackages_8.clang-unwrapped.overrideAttrs (oldAttrs: rec {
1515 src = fetchgit {
1616 url = "https://code.qt.io/clang/clang.git";
@@ -32,15 +32,15 @@ stdenv.mkDerivation rec {
3232
3333 buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative llvmPackages_8.libclang clang_qt_vendor llvmPackages_8.llvm ];
3434
35− nativeBuildInputs = [ qmake makeWrapper ];
35+ nativeBuildInputs = [ qmake ];
3636
37− # 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to
37+ # 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to
3838 # find clang libc++ library include paths. By default it's not covering paths
3939 # like libc++-version, which is default name for libc++ folder in nixos.
40− patches = [ ./0001-Fix-clang-libcpp-regexp.patch
40+ patches = [ ./0001-Fix-clang-libcpp-regexp.patch
4141
42− # Fix clazy plugin name. This plugin was renamed with clang8
43− # release, and patch didn't make it into 4.9.1 release. Should be removed
42+ # Fix clazy plugin name. This plugin was renamed with clang8
43+ # release, and patch didn't make it into 4.9.1 release. Should be removed
4444 # on qtcreator update, if this problem is fixed.
4545 (fetchpatch {
4646 url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
5151 url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangtools/clangtidyclazyrunner.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
5252 sha256 = "1rl0rc2l297lpfhhawvkkmj77zb081hhp0bbi7nnykf3q9ch0clh";
5353 })
54− ];
54+ ];
5555
5656 doCheck = true;
5757
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
7070 --replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
7171 --replace '$$clean_path($${LLVM_BINDIR})' '${clang_qt_vendor}/bin'
7272
73− # Fix include path to find clang and clang-c include directories.
73+ # Fix include path to find clang and clang-c include directories.
7474 substituteInPlace src/plugins/clangtools/clangtools.pro \
7575 --replace 'INCLUDEPATH += $$LLVM_INCLUDEPATH' 'INCLUDEPATH += $$LLVM_INCLUDEPATH ${clang_qt_vendor}'
7676
pkgs/development/tools/tora/default.nix+3−4
@@ -53,10 +53,9 @@ in mkDerivation rec {
5353
5454 NIX_CFLAGS_COMPILE = [ "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql" ];
5555
56− postFixup = ''
57− wrapProgram $out/bin/tora \
58− --prefix PATH : ${lib.getBin graphviz}/bin
59− '';
56+ qtWrapperArgs = [
57+ ''--prefix PATH : ${lib.getBin graphviz}/bin''
58+ ];
6059
6160 meta = with lib; {
6261 description = "Tora SQL tool";
pkgs/development/tools/watchman/default.nix+12−13
@@ -1,12 +1,11 @@
1−{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre,
2− libtool, pkgconfig, openssl,
3− confFile ? config.watchman.confFile or null,
4− withApple ? stdenv.isDarwin, CoreServices, CoreFoundation
1+{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre
2+, libtool, pkgconfig, openssl
3+, confFile ? config.watchman.confFile or null
4+, withApple ? stdenv.isDarwin, CoreServices
55}:
66
77stdenv.mkDerivation rec {
88 name = "watchman-${version}";
9−
109 version = "4.9.0";
1110
1211 src = fetchFromGitHub {
@@ -16,18 +15,18 @@ stdenv.mkDerivation rec {
1615 sha256 = "0fdaj5pmicm6j17d5q7px800m5rmam1a400x3hv1iiifnmhgnkal";
1716 };
1817
19− buildInputs = [ pcre openssl ]
20− ++ lib.optionals withApple [ CoreFoundation CoreServices ];
2118 nativeBuildInputs = [ autoconf automake pkgconfig libtool ];
19+ buildInputs = [ pcre openssl ]
20+ ++ lib.optionals withApple [ CoreServices ];
2221
2322 configureFlags = [
24− "--enable-lenient"
25− "--enable-conffile=${if confFile == null then "no" else confFile}"
26− "--with-pcre=yes"
23+ "--enable-lenient"
24+ "--enable-conffile=${if confFile == null then "no" else confFile}"
25+ "--with-pcre=yes"
2726
28− # For security considerations re: --disable-statedir, see:
29− # https://github.com/facebook/watchman/issues/178
30− "--disable-statedir"
27+ # For security considerations re: --disable-statedir, see:
28+ # https://github.com/facebook/watchman/issues/178
29+ "--disable-statedir"
3130 ];
3231
3332 prePatch = ''
pkgs/games/chessx/default.nix−3
@@ -32,9 +32,6 @@ stdenv.mkDerivation rec {
3232 cp -pr release/chessx "$out/bin"
3333 cp -pr unix/chessx.desktop "$out/share/applications"
3434
35− wrapProgram $out/bin/chessx \
36− --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
37−
3835 runHook postInstall
3936 '';
4037
pkgs/games/flightgear/default.nix+4−5
@@ -62,13 +62,12 @@ stdenv.mkDerivation rec {
6262 postInstall = ''
6363 mkdir -p "$out/share/applications/"
6464 cp "${desktopItem}"/share/applications/* "$out/share/applications/" #*/
65−
66− for f in $out/bin/* #*/
67− do
68− wrapProgram $f --set FG_ROOT "${data}/share/FlightGear"
69− done
7065 '';
7166
67+ qtWrapperArgs = [
68+ ''--set FG_ROOT "${data}/share/FlightGear"''
69+ ];
70+
7271 enableParallelBuilding = true;
7372
7473 meta = with stdenv.lib; {
pkgs/games/gargoyle/default.nix+2−2
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub, substituteAll, jam, cctools, pkgconfig
2−, SDL, SDL_mixer, SDL_sound, cf-private, gtk2, libvorbis, smpeg }:
2+, SDL, SDL_mixer, SDL_sound, gtk2, libvorbis, smpeg }:
33
44let
55
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
3232 nativeBuildInputs = [ jam pkgconfig ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
3333
3434 buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
35− ++ stdenv.lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
35+ ++ stdenv.lib.optionals stdenv.isDarwin [ smpeg libvorbis ];
3636
3737 buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
3838
pkgs/games/nethack/default.nix+6−7
@@ -1,5 +1,5 @@
11{ stdenv, lib, fetchurl, coreutils, ncurses, gzip, flex, bison
2−, less, makeWrapper
2+, less
33, buildPackages
44, x11Mode ? false, qtMode ? false, libXaw, libXext, libXpm, bdftopcf, mkfontdir, pkgconfig, qt5
55}:
@@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
3737 ++ lib.optionals x11Mode [ mkfontdir bdftopcf ]
3838 ++ lib.optionals qtMode [
3939 pkgconfig mkfontdir qt5.qtbase.dev
40− qt5.qtmultimedia.dev makeWrapper
40+ qt5.qtmultimedia.dev qt5.wrapQtAppsHook
4141 bdftopcf
4242 ];
4343
@@ -97,6 +97,10 @@ in stdenv.mkDerivation rec {
9797
9898 enableParallelBuilding = true;
9999
100+ preFixup = ''
101+ wrapQtApp "$out/games/nethack"
102+ '';
103+
100104 postInstall = ''
101105 mkdir -p $out/games/lib/nethackuserdir
102106 for i in xlogfile logfile perm record save; do
@@ -137,11 +141,6 @@ in stdenv.mkDerivation rec {
137141 ${lib.optionalString (!(x11Mode || qtMode)) "install -Dm 555 util/dlb -t $out/libexec/nethack/"}
138142 '';
139143
140− postFixup = lib.optionalString qtMode ''
141− wrapProgram $out/bin/nethack-qt \
142− --prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}"
143− '';
144−
145144 meta = with stdenv.lib; {
146145 description = "Rogue-like game";
147146 homepage = http://nethack.org/;
pkgs/misc/emulators/dolphin-emu/master.nix+2−2
@@ -5,7 +5,7 @@
55, soundtouch, sfml, vulkan-loader ? null, libpulseaudio ? null
66
77# - Inputs used for Darwin
8−, CoreBluetooth, cf-private, ForceFeedback, IOKit, OpenGL, libpng, hidapi }:
8+, CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }:
99
1010let
1111 desktopItem = makeDesktopItem {
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
4141 ] ++ stdenv.lib.optionals stdenv.isLinux [
4242 bluez udev libevdev alsaLib vulkan-loader
4343 ] ++ stdenv.lib.optionals stdenv.isDarwin [
44− CoreBluetooth cf-private OpenGL ForceFeedback IOKit
44+ CoreBluetooth OpenGL ForceFeedback IOKit
4545 ];
4646
4747 cmakeFlags = [
pkgs/misc/emulators/mgba/default.nix+2−4
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, pkgconfig
1+{ stdenv, fetchFromGitHub, makeDesktopItem, wrapQtAppsHook, pkgconfig
22, cmake, epoxy, libzip, ffmpeg, imagemagick, SDL2, qtbase, qtmultimedia, libedit
33, qttools, minizip }:
44
@@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
2525 };
2626
2727 enableParallelBuilding = true;
28− nativeBuildInputs = [ makeWrapper pkgconfig cmake ];
28+ nativeBuildInputs = [ wrapQtAppsHook pkgconfig cmake ];
2929
3030 buildInputs = [
3131 libzip epoxy ffmpeg imagemagick SDL2 qtbase qtmultimedia libedit minizip
@@ -34,8 +34,6 @@ in stdenv.mkDerivation rec {
3434
3535 postInstall = ''
3636 cp -r ${desktopItem}/share/applications $out/share
37− wrapProgram $out/bin/mgba-qt --suffix QT_PLUGIN_PATH : \
38− ${qtbase.bin}/${qtbase.qtPluginPrefix}
3937 '';
4038
4139 meta = with stdenv.lib; {
pkgs/misc/jackaudio/default.nix+2−2
@@ -3,7 +3,7 @@
33, bash, libsamplerate, libsndfile, readline, eigen, celt
44, wafHook
55# Darwin Dependencies
6−, aften, AudioUnit, CoreAudio, cf-private, libobjc, Accelerate
6+, aften, AudioUnit, CoreAudio, libobjc, Accelerate
77
88# Optional Dependencies
99, dbus ? null, libffado ? null, alsaLib ? null
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
4141 buildInputs = [ libsamplerate libsndfile readline eigen celt
4242 optDbus optPythonDBus optLibffado optAlsaLib optLibopus
4343 ] ++ optionals stdenv.isDarwin [
44− aften AudioUnit CoreAudio Accelerate cf-private libobjc
44+ aften AudioUnit CoreAudio Accelerate libobjc
4545 ];
4646
4747 prePatch = ''
pkgs/os-specific/darwin/cf-private/setup-hook.sh → pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.shrenamed+3−6
@@ -1,12 +1,9 @@
1−prependSearchPath() {
2− NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks ${NIX_CFLAGS_COMPILE}"
3−}
4−
5−linkWithRealCF() {
1+linkSystemCoreFoundationFramework() {
2+ NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks $NIX_CFLAGS_COMPILE"
63 # gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not
74 # in the opensource release
85 # if the package needs private headers, we assume they also want to link with system CF
96 NIX_LDFLAGS+=" /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
107}
118
12−preConfigureHooks+=(prependSearchPath linkWithRealCF)
9+preConfigureHooks+=(linkSystemCoreFoundationFramework)
pkgs/os-specific/darwin/apple-sdk/default.nix+6−2
@@ -156,7 +156,7 @@ in rec {
156156 __propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ];
157157
158158 propagatedBuildInputs = with frameworks; [
159− OpenGL ApplicationServices Carbon IOKit pkgs.darwin.CF CoreGraphics CoreServices CoreText
159+ OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText
160160 ];
161161
162162 installPhase = ''
@@ -187,6 +187,10 @@ in rec {
187187 ];
188188 });
189189
190+ CoreFoundation = stdenv.lib.overrideDerivation super.CoreFoundation (drv: {
191+ setupHook = ./cf-setup-hook.sh;
192+ });
193+
190194 CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: {
191195 __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
192196 "/System/Library/Frameworks/CoreImage.framework"
@@ -222,7 +226,7 @@ in rec {
222226
223227 bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
224228 inherit frameworks libs;
225− inherit (pkgs.darwin) CF cf-private libobjc;
229+ inherit (pkgs.darwin) libobjc;
226230 });
227231
228232 frameworks = bareFrameworks // overrides bareFrameworks;
pkgs/os-specific/darwin/apple-sdk/frameworks.nix+40−39
@@ -2,81 +2,81 @@
22# Epic weird knot-tying happening here.
33# TODO: clean up the process for generating this and include it
44
5−{ frameworks, libs, CF, libobjc, cf-private }:
5+{ frameworks, libs, libobjc, }:
66
77with frameworks; with libs; {
88 AGL = [ Carbon OpenGL ];
99 AVFoundation = [ ApplicationServices CoreGraphics ];
1010 AVKit = [];
1111 Accounts = [];
12− AddressBook = [ Carbon CF ];
12+ AddressBook = [ Carbon ];
1313 AppKit = [ AudioToolbox AudioUnit Foundation QuartzCore ];
1414 AppKitScripting = [];
1515 AppleScriptKit = [];
1616 AppleScriptObjC = [];
17− AudioToolbox = [ CoreAudio CF CoreMIDI ];
18− AudioUnit = [ AudioToolbox Carbon CoreAudio CF ];
17+ AudioToolbox = [ CoreAudio CoreMIDI ];
18+ AudioUnit = [ AudioToolbox Carbon CoreAudio ];
1919 AudioVideoBridging = [ Foundation ];
2020 Automator = [];
21− CFNetwork = [ CF ];
21+ CFNetwork = [];
2222 CalendarStore = [];
2323 Cocoa = [ AppKit ];
2424 Collaboration = [];
2525 # Impure version of CoreFoundation, this should not be used unless another
2626 # framework includes headers that are not available in the pure version.
2727 CoreFoundation = [];
28− CoreAudio = [ CF IOKit ];
28+ CoreAudio = [ IOKit ];
2929 CoreAudioKit = [ AudioUnit ];
3030 CoreData = [];
31− CoreGraphics = [ Accelerate CF IOKit IOSurface SystemConfiguration ];
32− CoreImage = [ ];
31+ CoreGraphics = [ Accelerate IOKit IOSurface SystemConfiguration ];
32+ CoreImage = [];
3333 CoreLocation = [];
34− CoreMIDI = [ CF ];
34+ CoreMIDI = [];
3535 CoreMIDIServer = [];
36− CoreMedia = [ ApplicationServices AudioToolbox AudioUnit CoreAudio CF CoreGraphics CoreVideo ];
37− CoreMediaIO = [ CF CoreMedia ];
38− CoreText = [ CF CoreGraphics ];
39− CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ];
36+ CoreMedia = [ ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo ];
37+ CoreMediaIO = [ CoreMedia ];
38+ CoreText = [ CoreGraphics ];
39+ CoreVideo = [ ApplicationServices CoreGraphics IOSurface OpenGL ];
4040 CoreWLAN = [ SecurityFoundation ];
4141 DVDPlayback = [];
42− DirectoryService = [ CF ];
43− DiscRecording = [ CF CoreServices IOKit ];
42+ DirectoryService = [];
43+ DiscRecording = [ CoreServices IOKit ];
4444 DiscRecordingUI = [];
45− DiskArbitration = [ CF IOKit ];
45+ DiskArbitration = [ IOKit ];
4646 EventKit = [];
4747 ExceptionHandling = [];
4848 FWAUserLib = [];
49− ForceFeedback = [ CF IOKit ];
50− Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ];
51− GLKit = [ CF ];
49+ ForceFeedback = [ IOKit ];
50+ Foundation = [ libobjc CoreFoundation Security ApplicationServices SystemConfiguration ];
51+ GLKit = [];
5252 GLUT = [ OpenGL ];
5353 GSS = [];
5454 GameController = [];
5555 GameKit = [ Foundation ];
5656 Hypervisor = [];
57− ICADevices = [ Carbon CF IOBluetooth ];
57+ ICADevices = [ Carbon IOBluetooth ];
5858 IMServicePlugIn = [];
5959 IOBluetoothUI = [ IOBluetooth ];
60− IOKit = [ CF ];
61− IOSurface = [ CF IOKit xpc ];
60+ IOKit = [];
61+ IOSurface = [ IOKit xpc ];
6262 ImageCaptureCore = [];
63− ImageIO = [ CF CoreGraphics ];
63+ ImageIO = [ CoreGraphics ];
6464 InputMethodKit = [ Carbon ];
6565 InstallerPlugins = [];
6666 InstantMessage = [];
6767 JavaFrameEmbedding = [];
68− JavaScriptCore = [ CF ];
68+ JavaScriptCore = [];
6969 Kerberos = [];
70− Kernel = [ CF IOKit ];
70+ Kernel = [ IOKit ];
7171 LDAP = [];
72− LatentSemanticMapping = [ Carbon CF ];
72+ LatentSemanticMapping = [ Carbon ];
7373 MapKit = [];
74− MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ];
75− MediaToolbox = [ AudioToolbox AudioUnit CF CoreMedia ];
74+ MediaAccessibility = [ CoreGraphics CoreText QuartzCore ];
75+ MediaToolbox = [ AudioToolbox AudioUnit CoreMedia ];
7676 Metal = [];
7777 MetalKit = [ ModelIO Metal ];
7878 ModelIO = [ ];
79− NetFS = [ CF ];
79+ NetFS = [];
8080 OSAKit = [ Carbon ];
8181 OpenAL = [];
8282 OpenCL = [ IOSurface OpenGL ];
@@ -85,37 +85,38 @@ with frameworks; with libs; {
8585 PreferencePanes = [];
8686 PubSub = [];
8787 QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ];
88− QuickLook = [ ApplicationServices CF ];
88+ QuickLook = [ ApplicationServices ];
8989 SceneKit = [];
9090 ScreenSaver = [];
9191 Scripting = [];
9292 ScriptingBridge = [];
93− Security = [ CF IOKit ];
93+ Security = [ IOKit ];
9494 SecurityFoundation = [];
9595 SecurityInterface = [ Security ];
96− ServiceManagement = [ CF Security ];
96+ ServiceManagement = [ Security ];
9797 Social = [];
9898 SpriteKit = [];
9999 StoreKit = [];
100100 SyncServices = [];
101− SystemConfiguration = [ CF Security ];
101+ SystemConfiguration = [ Security ];
102102 TWAIN = [ Carbon ];
103103 Tcl = [];
104− VideoDecodeAcceleration = [ CF CoreVideo ];
105− VideoToolbox = [ CF CoreMedia CoreVideo ];
104+ VideoDecodeAcceleration = [ CoreVideo ];
105+ VideoToolbox = [ CoreMedia CoreVideo ];
106106 WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL ];
107107
108108 # Umbrellas
109109 Accelerate = [ CoreWLAN IOBluetooth ];
110− ApplicationServices = [ CF CoreServices CoreText ImageIO ];
111− Carbon = [ ApplicationServices CF CoreServices Foundation IOKit Security QuartzCore ];
110+ ApplicationServices = [ CoreServices CoreText ImageIO ];
111+ Carbon = [ ApplicationServices CoreServices Foundation IOKit Security QuartzCore ];
112112 CoreBluetooth = [];
113− CoreServices = [ CFNetwork CoreAudio CoreData CF DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
113+ # TODO: figure out which part of the umbrella depends on CoreFoundation and move it there.
114+ CoreServices = [ CFNetwork CoreFoundation CoreAudio CoreData DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
114115 IOBluetooth = [ IOKit ];
115116 JavaVM = [];
116117 OpenDirectory = [];
117118 Quartz = [ QuickLook QTKit ];
118− QuartzCore = [ ApplicationServices CF CoreVideo OpenCL CoreImage Metal ];
119+ QuartzCore = [ ApplicationServices CoreVideo OpenCL CoreImage Metal ];
119120 QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
120121
121122 vmnet = [];
pkgs/os-specific/darwin/cf-private/default.nixdeleted−58
@@ -1,58 +0,0 @@
1−{ CF, apple_sdk }:
2−
3−# cf-private is a bit weird, but boils down to CF with a weird setup-hook that
4−# makes a build link against the system CoreFoundation rather than our pure one.
5−# The reason it exists is that although our CF headers and build are pretty legit
6−# now, the underlying runtime is quite different. Apple's in a bit of flux around CF
7−# right now, and support three different backends for it: swift, "C", and an ObjC
8−# one. The former two can be built from public sources, but the ObjC one isn't really
9−# public. Unfortunately, it's also one of the core underpinnings of a lot of Mac-
10−# specific behavior, and defines a lot of symbols that some Objective C apps depend
11−# on, even though one might expect those symbols to derive from Foundation. So if
12−# your app relies on NSArray and several other basic ObjC types, it turns out that
13−# because of their magic "toll-free bridging" support, the symbols for those types
14−# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have
15−# this hack in place to let people link properly anyway. Phew!
16−#
17−# This can be revisited if Apple ever decide to release the ObjC backend in a publicly
18−# buildable form.
19−#
20−# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to
21−# an existing package was annoying. We need a buildEnv that knows how to add those
22−CF.overrideAttrs (orig: {
23− # PLEASE if you add things to this derivation, explain in reasonable detail why
24− # you're adding them and when the workaround can go away. This whole derivation is
25− # a workaround and if you don't explain what you're working around, it makes it
26− # very hard for people to clean it up later.
27−
28− name = "${orig.name}-private";
29− setupHook = ./setup-hook.sh;
30−
31− # TODO: consider re-adding https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch
32− # once the missing headers are in and see if that fixes all need for this.
33−
34− # This can go away once https://bugs.swift.org/browse/SR-8741 happens, which is
35− # looking more likely these days with the friendly people at Apple! We only need
36− # the header because the setup hook takes care of linking us against a version
37− # of the framework with the functionality built into it. The main user I know of
38− # this is watchman, who can almost certainly switch to the pure CF once the header
39− # and functionality is merged in.
40− installPhase = orig.installPhase + ''
41− basepath="Library/Frameworks/CoreFoundation.framework/Headers"
42−
43− # Append the include at top level or nobody will notice the header we're about to add
44− sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \
45− "$out/$basepath/CoreFoundation.h"
46−
47− cp ${apple_sdk.frameworks.CoreFoundation}/$basepath/CFFileDescriptor.h $out/$basepath/CFFileDescriptor.h
48− '' +
49− # This one is less likely to go away, but I'll mention it anyway. The issue is at
50− # https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase
51− ''
52− path="$basepath/CFURLEnumerator.h"
53− sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \
54− "$out/$basepath/CoreFoundation.h"
55−
56− cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
57− '';
58−})
pkgs/os-specific/darwin/trash/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, perl, cf-private, AppKit, Cocoa, ScriptingBridge }:
1+{ stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
22
33stdenv.mkDerivation rec {
44 version = "0.9.2";
@@ -11,12 +11,7 @@ stdenv.mkDerivation rec {
1111 sha256 = "1d3rc03vgz32faj7qi18iiggxvxlqrj9lsk5jkpa9r1mcs5d89my";
1212 };
1313
14− buildInputs = [
15− perl
16− Cocoa AppKit ScriptingBridge
17− # Neded for OBJC_CLASS_$_NSMutableArray symbols.
18− cf-private
19− ];
14+ buildInputs = [ perl Cocoa AppKit ScriptingBridge ];
2015
2116 patches = [ ./trash.diff ];
2217
pkgs/os-specific/linux/apparmor/cross.patchnew file+19
@@ -0,0 +1,19 @@
1+--- a/parser/libapparmor_re/Makefile 2018-10-14 07:38:06.000000000 +0800
2++++ b/parser/libapparmor_re/Makefile 2019-06-28 16:16:33.741916660 +0800
3+@@ -10,6 +10,7 @@
4+
5+ TARGET=libapparmor_re.a
6+
7++AR ?= ar
8+ CFLAGS ?= -g -Wall -O2 ${EXTRA_CFLAGS} -std=gnu++0x
9+ CXXFLAGS := ${CFLAGS} ${INCLUDE_APPARMOR}
10+
11+@@ -22,7 +23,7 @@
12+ UNITTESTS = tst_parse
13+
14+ libapparmor_re.a: parse.o expr-tree.o hfa.o chfa.o aare_rules.o
15+- ar ${ARFLAGS} $@ $^
16++ ${AR} ${ARFLAGS} $@ $^
17+
18+ expr-tree.o: expr-tree.cc expr-tree.h
19+
pkgs/os-specific/linux/apparmor/default.nix+4−2
@@ -49,7 +49,9 @@ let
4949 sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4";
5050 })
5151 # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12)
52− ];
52+ ] ++ [
53+ ./cross.patch
54+ ];
5355
5456 # Set to `true` after the next FIXME gets fixed or this gets some
5557 # common derivation infra. Too much copy-paste to fix one by one.
@@ -185,7 +187,7 @@ let
185187 '';
186188 inherit patches;
187189 postPatch = "cd ./parser";
188− makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include'';
190+ makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar'';
189191 installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
190192
191193 inherit doCheck;
pkgs/servers/x11/quartz-wm/default.nix+1−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, xorg, pixman, pkgconfig, AppKit, Foundation, Xplugin, cf-private }:
1+{ stdenv, fetchurl, xorg, pixman, pkgconfig, AppKit, Foundation, Xplugin }:
22
33let version = "1.3.1";
44in stdenv.mkDerivation {
@@ -20,8 +20,6 @@ in stdenv.mkDerivation {
2020 pixman
2121 pkgconfig
2222 AppKit Xplugin Foundation
23− # Needed for CFNotificationCenterAddObserver symbols.
24− cf-private
2523 ];
2624 meta = with stdenv.lib; {
2725 license = licenses.apsl20;
pkgs/servers/x11/xorg/overrides.nix+2−6
@@ -5,7 +5,7 @@
55 libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
66 mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook,
77 mcpp, epoxy, openssl, pkgconfig, llvm_6,
8− cf-private, ApplicationServices, Carbon, Cocoa, Xplugin
8+ ApplicationServices, Carbon, Cocoa, Xplugin
99}:
1010
1111let
@@ -469,11 +469,7 @@ self: super:
469469 sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117";
470470 };
471471 nativeBuildInputs = [ pkgconfig ];
472− buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]
473− ++ stdenv.lib.optionals stdenv.isDarwin [
474− # Needed for NSDefaultRunLoopMode symbols.
475− cf-private
476− ];
472+ buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
477473 postPatch = stdenv.lib.optionalString stdenv.isLinux "sed '1i#include <malloc.h>' -i include/os.h";
478474 meta.platforms = stdenv.lib.platforms.unix;
479475 } else throw "unsupported xorg abiCompat ${abiCompat} for ${attrs_passed.name}";
pkgs/servers/x11/xquartz/default.nix+1−6
@@ -1,7 +1,6 @@
11{ stdenv, buildEnv, makeFontsConf, gnused, writeScript, xorg, bashInteractive, xterm, makeWrapper, ruby
22, quartz-wm, fontconfig, xlsfonts, xfontsel
33, ttf_bitstream_vera, freefont_ttf, liberation_ttf
4−, cf-private
54, shell ? "${bashInteractive}/bin/bash"
65}:
76
@@ -98,11 +97,7 @@ let
9897in stdenv.mkDerivation {
9998 name = "xquartz-${stdenv.lib.getVersion xorg.xorgserver}";
10099
101− buildInputs = [
102− ruby makeWrapper
103− # Needed for NSDefaultRunLoopMode symbols.
104− cf-private
105− ];
100+ nativeBuildInputs = [ ruby makeWrapper ];
106101
107102 unpackPhase = "sourceRoot=.";
108103
pkgs/tools/graphics/nifskope/default.nix+4−8
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, substituteAll, libGLU, makeWrapper }:
1+{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, substituteAll, libGLU, wrapQtAppsHook }:
22
33stdenv.mkDerivation rec {
44 name = "nifskope-${version}";
@@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
2020 })
2121 ];
2222
23− buildInputs = [ qtbase qttools libGLU.dev makeWrapper ];
24− nativeBuildInputs = [ qmake ];
23+ buildInputs = [ qtbase qttools libGLU.dev ];
24+ nativeBuildInputs = [ qmake wrapQtAppsHook ];
2525
2626 preConfigure = ''
2727 shopt -s globstar
@@ -33,9 +33,7 @@ stdenv.mkDerivation rec {
3333 enableParallelBuilding = true;
3434
3535 # Inspired by install/linux-install/nifskope.spec.in.
36− installPhase = let
37− qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
38− in ''
36+ installPhase = ''
3937 runHook preInstall
4038
4139 d=$out/share/nifskope
@@ -53,8 +51,6 @@ stdenv.mkDerivation rec {
5351
5452 find $out/share -type f -exec chmod -x {} \;
5553
56− wrapProgram $out/bin/NifSkope --prefix QT_PLUGIN_PATH : "${qtbase}/lib/qt-${qtVersion}/plugins"
57−
5854 runHook postInstall
5955 '';
6056
pkgs/tools/misc/contacts/default.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, xcbuildHook, cf-private, Foundation, AddressBook }:
1+{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }:
22
33stdenv.mkDerivation rec {
44 version = "1.1a-3";
@@ -10,12 +10,7 @@ stdenv.mkDerivation rec {
1010 };
1111
1212 nativeBuildInputs = [ xcbuildHook ];
13−
14− buildInputs = [
15− Foundation AddressBook
16− # Needed for OBJC_CLASS_$_NSArray symbols.
17− cf-private
18− ];
13+ buildInputs = [ Foundation AddressBook ];
1914
2015 installPhase = ''
2116 mkdir -p $out/bin
pkgs/tools/misc/noti/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, buildGoPackage, fetchFromGitHub, cf-private, Cocoa }:
1+{ stdenv, buildGoPackage, fetchFromGitHub, Cocoa }:
22
33buildGoPackage rec {
44 name = "noti-${version}";
@@ -11,7 +11,7 @@ buildGoPackage rec {
1111 sha256 = "1chsqfqk0pnhx5k2nr4c16cpb8m6zv69l1jvv4v4903zgfzcm823";
1212 };
1313
14− buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Cocoa cf-private /* For OBJC_CLASS_$_NSDate */ ];
14+ buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
1515 # TODO: Remove this when we update apple_sdk
1616 NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [ "-fno-objc-arc" ];
1717
pkgs/tools/misc/partition-manager/default.nix+3−7
@@ -1,7 +1,7 @@
11{ mkDerivation, fetchurl, lib
2−, extra-cmake-modules, kdoctools, wrapGAppsHook
2+, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
33, kconfig, kcrash, kinit, kpmcore
4−, eject, libatasmart , utillinux, makeWrapper, qtbase
4+, eject, libatasmart , utillinux, qtbase
55}:
66
77let
@@ -17,16 +17,12 @@ in mkDerivation rec {
1717
1818 enableParallelBuilding = true;
1919
20− nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook makeWrapper ];
20+ nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook ];
2121
2222 # refer to kpmcore for the use of eject
2323 buildInputs = [ eject libatasmart utillinux ];
2424 propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
2525
26− postInstall = ''
27− wrapProgram "$out/bin/partitionmanager" --prefix QT_PLUGIN_PATH : "${kpmcore}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
28− '';
29−
3026 meta = with lib; {
3127 description = "KDE Partition Manager";
3228 license = licenses.gpl2;
pkgs/tools/misc/watchexec/default.nix+1−5
@@ -13,11 +13,7 @@ rustPlatform.buildRustPackage rec {
1313
1414 cargoSha256 = "1sqwplvpg0n9j0h9j94m7a6ylgqi4y4wyx489y09z9gm7aqgrsjc";
1515
16− buildInputs = stdenv.lib.optionals stdenv.isDarwin [
17− CoreServices
18− # This is needed to avoid an undefined symbol error "_CFURLResourceIsReachable"
19− darwin.cf-private
20− ];
16+ buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
2117
2218 meta = with stdenv.lib; {
2319 description = "Executes commands in response to file modifications";
pkgs/tools/misc/yubikey-manager-qt/default.nix+13−22
@@ -1,6 +1,6 @@
11{ stdenv
22, fetchurl
3−, makeWrapper
3+, wrapQtAppsHook
44, pcsclite
55, pyotherside
66, pythonPackages
@@ -16,16 +16,9 @@
1616, yubikey-personalization
1717}:
1818
19−let
20− qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
19+let inherit (stdenv) lib; in
2120
22− inherit (stdenv) lib;
23−
24− qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
25− qtbase.bin qtdeclarative.bin pyotherside qtquickcontrols qtquickcontrols2.bin qtgraphicaleffects
26− ];
27−
28−in stdenv.mkDerivation rec {
21+stdenv.mkDerivation rec {
2922 pname = "yubikey-manager-qt";
3023 version = "1.1.2";
3124
@@ -34,7 +27,7 @@ in stdenv.mkDerivation rec {
3427 sha256 = "01ax8zjrahs2sjbgsys2ahh57sdcap0ij3y1r1bbvsgzr7xxm2q8";
3528 };
3629
37− nativeBuildInputs = [ makeWrapper python3.pkgs.wrapPython qmake ];
30+ nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
3831
3932 postPatch = ''
4033 substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
@@ -46,22 +39,20 @@ in stdenv.mkDerivation rec {
4639
4740 pythonPath = [ yubikey-manager ];
4841
42+ dontWrapQtApps = true;
4943 postInstall = ''
5044 buildPythonPath "$pythonPath"
5145
52− wrapProgram $out/bin/ykman-gui \
46+ wrapQtApp $out/bin/ykman-gui \
5347 --prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
54− --prefix PYTHONPATH : "$program_PYTHONPATH" \
55− --set QML2_IMPORT_PATH "${qml2ImportPath}" \
56− --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
57− --prefix QT_PLUGIN_PATH : "${qtsvg.bin}/${qtbase.qtPluginPrefix}"
48+ --prefix PYTHONPATH : "$program_PYTHONPATH"
5849
59− mkdir -p $out/share/applications
60− cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
61− mkdir -p $out/share/ykman-gui/icons
62− cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
63− substituteInPlace $out/share/applications/ykman-gui.desktop \
64− --replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
50+ mkdir -p $out/share/applications
51+ cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
52+ mkdir -p $out/share/ykman-gui/icons
53+ cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
54+ substituteInPlace $out/share/applications/ykman-gui.desktop \
55+ --replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
6556 '';
6657
6758 meta = with lib; {
pkgs/tools/security/keybase/default.nix+2−6
@@ -1,4 +1,4 @@
1−{ stdenv, lib, buildGoPackage, fetchFromGitHub, cf-private
1+{ stdenv, lib, buildGoPackage, fetchFromGitHubtchurl
22, AVFoundation, AudioToolbox, ImageIO, CoreMedia
33, Foundation, CoreGraphics, MediaToolbox
44}:
@@ -19,11 +19,7 @@ buildGoPackage rec {
1919 sha256 = "00mxyy4jhdbcvbwabf4yvq4h5mpnlfp2z93gy2266kz6gkd5myzk";
2020 };
2121
22− buildInputs = lib.optionals stdenv.isDarwin [
23− AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox
24− # Needed for OBJC_CLASS_$_NSData symbols.
25− cf-private
26− ];
22+ buildInputs = lib.optionals stdenv.isDarwin [ AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox ];
2723 buildFlags = [ "-tags production" ];
2824
2925 meta = with stdenv.lib; {
pkgs/tools/security/nitrokey-app/default.nix+3−8
@@ -1,5 +1,5 @@
1−{ stdenv, makeWrapper, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkgconfig
2−, qtbase, qttranslations, qtsvg }:
1+{ stdenv, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkgconfig
2+, qtbase, qttranslations, qtsvg, wrapQtAppsHook }:
33
44stdenv.mkDerivation rec {
55 name = "nitrokey-app-${version}";
@@ -29,15 +29,10 @@ stdenv.mkDerivation rec {
2929 nativeBuildInputs = [
3030 cmake
3131 pkgconfig
32− makeWrapper
32+ wrapQtAppsHook
3333 ];
3434 cmakeFlags = "-DCMAKE_BUILD_TYPE=Release";
3535
36− postFixup = ''
37− wrapProgram $out/bin/nitrokey-app \
38− --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
39− '';
40−
4136 meta = with stdenv.lib; {
4237 description = "Provides extra functionality for the Nitrokey Pro and Storage";
4338 longDescription = ''
pkgs/tools/security/pinentry/mac.nix+2−7
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, xcbuildHook, libiconv, Cocoa, ncurses, cf-private }:
1+{ stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }:
22
33stdenv.mkDerivation rec {
44 name = "pinentry-mac-0.9.4";
@@ -11,12 +11,7 @@ stdenv.mkDerivation rec {
1111 };
1212
1313 nativeBuildInputs = [ xcbuildHook ];
14−
15− buildInputs = [
16− libiconv Cocoa ncurses
17− # Needed for OBJC_CLASS_$_NSArray symbols.
18− cf-private
19− ];
14+ buildInputs = [ libiconv ncurses Cocoa ];
2015
2116 installPhase = ''
2217 mkdir -p $out/Applications
pkgs/tools/text/mdbook/default.nix+1−5
@@ -13,11 +13,7 @@ rustPlatform.buildRustPackage rec {
1313
1414 cargoSha256 = "1xpsc4qff2lrq15mz1gvmw6n5vl88sfwpjbsnp5ja5k1im156lam";
1515
16− buildInputs = stdenv.lib.optionals stdenv.isDarwin [
17− CoreServices
18− # This is needed to avoid an undefined symbol error for "_CFURLResourceIsReachable"
19− darwin.cf-private
20− ];
16+ buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
2117
2218 meta = with stdenv.lib; {
2319 description = "Create books from MarkDown";
pkgs/tools/video/atomicparsley/default.nix+2−6
@@ -1,4 +1,4 @@
1−{ stdenv, fetchhg, autoreconfHook, zlib, cf-private, Cocoa }:
1+{ stdenv, fetchhg, autoreconfHook, zlib, Cocoa }:
22
33stdenv.mkDerivation rec {
44 name = "atomicparsley-${version}";
@@ -12,11 +12,7 @@ stdenv.mkDerivation rec {
1212 nativeBuildInputs = [ autoreconfHook ];
1313
1414 buildInputs = [ zlib ]
15− ++ stdenv.lib.optionals stdenv.isDarwin [
16− Cocoa
17− # Needed for OBJC_CLASS_$_NSDictionary symbols.
18− cf-private
19− ];
15+ ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
2016
2117 configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
2218 # AC_FUNC_MALLOC is broken on cross builds.
pkgs/top-level/all-packages.nix+13−56
@@ -526,8 +526,7 @@ in
526526
527527 alacritty = callPackage ../applications/misc/alacritty {
528528 inherit (xorg) libXcursor libXxf86vm libXi;
529− inherit (darwin) cf-private;
530− inherit (darwin.apple_sdk.frameworks) AppKit CoreFoundation CoreGraphics CoreServices CoreText Foundation OpenGL;
529+ inherit (darwin.apple_sdk.frameworks) AppKit CoreGraphics CoreServices CoreText Foundation OpenGL;
531530 };
532531
533532 aldo = callPackage ../applications/radio/aldo { };
@@ -615,7 +614,6 @@ in
615614 };
616615
617616 atomicparsley = callPackage ../tools/video/atomicparsley {
618− inherit (darwin) cf-private;
619617 inherit (darwin.apple_sdk.frameworks) Cocoa;
620618 };
621619
@@ -1337,7 +1335,6 @@ in
13371335 codec2 = callPackage ../development/libraries/codec2 { };
13381336
13391337 contacts = callPackage ../tools/misc/contacts {
1340− inherit (darwin) cf-private;
13411338 inherit (darwin.apple_sdk.frameworks) Foundation AddressBook;
13421339 xcbuildHook = xcbuild6Hook;
13431340 };
@@ -1752,7 +1749,6 @@ in
17521749 noteshrink = callPackage ../tools/misc/noteshrink { };
17531750
17541751 noti = callPackage ../tools/misc/noti {
1755− inherit (darwin) cf-private;
17561752 inherit (darwin.apple_sdk.frameworks) Cocoa;
17571753 };
17581754
@@ -2566,7 +2562,6 @@ in
25662562 dolphinEmu = callPackage ../misc/emulators/dolphin-emu { };
25672563 dolphinEmuMaster = callPackage ../misc/emulators/dolphin-emu/master.nix {
25682564 inherit (darwin.apple_sdk.frameworks) CoreBluetooth ForceFeedback IOKit OpenGL;
2569− inherit (darwin) cf-private;
25702565 };
25712566
25722567 doomseeker = qt5.callPackage ../applications/misc/doomseeker { };
@@ -3987,7 +3982,6 @@ in
39873982 kexpand = callPackage ../development/tools/kexpand { };
39883983
39893984 keybase = callPackage ../tools/security/keybase {
3990− inherit (darwin) cf-private;
39913985 # Reasoning for the inherited apple_sdk.frameworks:
39923986 # 1. specific compiler errors about: AVFoundation, AudioToolbox, MediaToolbox
39933987 # 2. the rest are added from here: https://github.com/keybase/client/blob/68bb8c893c5214040d86ea36f2f86fbb7fac8d39/go/chat/attachments/preview_darwin.go#L7
@@ -5301,7 +5295,6 @@ in
53015295 };
53025296
53035297 pinentry_mac = callPackage ../tools/security/pinentry/mac.nix {
5304− inherit (darwin) cf-private;
53055298 inherit (darwin.apple_sdk.frameworks) Cocoa;
53065299 xcbuildHook = xcbuild6Hook;
53075300 };
@@ -6577,7 +6570,6 @@ in
65776570
65786571 watchman = callPackage ../development/tools/watchman {
65796572 inherit (darwin.apple_sdk.frameworks) CoreServices;
6580− CoreFoundation = darwin.cf-private;
65816573 };
65826574
65836575 wavefunctioncollapse = callPackage ../tools/graphics/wavefunctioncollapse {};
@@ -8047,7 +8039,6 @@ in
80478039
80488040 cargo-web = callPackage ../development/tools/cargo-web {
80498041 inherit (darwin.apple_sdk.frameworks) CoreServices Security;
8050− inherit (darwin) cf-private;
80518042 };
80528043
80538044 carnix = (callPackage ../build-support/rust/carnix.nix { }).carnix { };
@@ -9229,7 +9220,6 @@ in
92299220
92309221 flow = callPackage ../development/tools/analysis/flow {
92319222 inherit (darwin.apple_sdk.frameworks) CoreServices;
9232− inherit (darwin) cf-private;
92339223 };
92349224
92359225 foreman = callPackage ../tools/system/foreman { };
@@ -10386,7 +10376,6 @@ in
1038610376 vid-stab = if stdenv.isDarwin then null else vid-stab;
1038710377 x265 = if stdenv.isDarwin then null else x265;
1038810378 xavs = if stdenv.isDarwin then null else xavs;
10389− inherit (darwin) cf-private;
1039010379 inherit (darwin.apple_sdk.frameworks)
1039110380 Cocoa CoreServices CoreAudio AVFoundation MediaToolbox
1039210381 VideoDecodeAcceleration;
@@ -10414,11 +10403,9 @@ in
1041410403 flite = callPackage ../development/libraries/flite { };
1041510404
1041610405 fltk13 = callPackage ../development/libraries/fltk {
10417− inherit (darwin) cf-private;
1041810406 inherit (darwin.apple_sdk.frameworks) Cocoa AGL GLUT;
1041910407 };
1042010408 fltk14 = callPackage ../development/libraries/fltk/1.4.nix {
10421− inherit (darwin) cf-private;
1042210409 inherit (darwin.apple_sdk.frameworks) Cocoa AGL GLUT;
1042310410 };
1042410411 fltk = res.fltk13;
@@ -10581,7 +10568,6 @@ in
1058110568 glfw = glfw3;
1058210569 glfw2 = callPackage ../development/libraries/glfw/2.x.nix { };
1058310570 glfw3 = callPackage ../development/libraries/glfw/3.x.nix {
10584− inherit (darwin) cf-private;
1058510571 inherit (darwin.apple_sdk.frameworks) Cocoa Kernel;
1058610572 };
1058710573
@@ -12057,7 +12043,6 @@ in
1205712043 libuecc = callPackage ../development/libraries/libuecc { };
1205812044
1205912045 libui = callPackage ../development/libraries/libui {
12060− inherit (darwin) cf-private;
1206112046 inherit (darwin.apple_sdk.frameworks) Cocoa;
1206212047 };
1206312048
@@ -12518,12 +12503,10 @@ in
1251812503 openct = callPackage ../development/libraries/openct { };
1251912504
1252012505 opencv = callPackage ../development/libraries/opencv {
12521− inherit (darwin) cf-private;
1252212506 inherit (darwin.apple_sdk.frameworks) Cocoa QTKit;
1252312507 };
1252412508
1252512509 opencv3 = callPackage ../development/libraries/opencv/3.x.nix {
12526− inherit (darwin) cf-private;
1252712510 inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration;
1252812511 };
1252912512
@@ -12532,7 +12515,6 @@ in
1253212515 };
1253312516
1253412517 opencv4 = callPackage ../development/libraries/opencv/4.x.nix {
12535− inherit (darwin) cf-private;
1253612518 inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration;
1253712519 };
1253812520
@@ -12618,7 +12600,6 @@ in
1261812600 pcg_c = callPackage ../development/libraries/pcg-c { };
1261912601
1262012602 pcl = libsForQt5.callPackage ../development/libraries/pcl {
12621− inherit (darwin) cf-private;
1262212603 inherit (darwin.apple_sdk.frameworks) Cocoa AGL OpenGL;
1262312604 };
1262412605
@@ -12765,7 +12746,7 @@ in
1276512746 # XXX: mariadb doesn't built on fbsd as of nov 2015
1276612747 mysql = if (!stdenv.isFreeBSD) then mysql else null;
1276712748
12768− inherit (pkgs.darwin) cf-private libobjc;
12749+ inherit (pkgs.darwin) libobjc;
1276912750 inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL Cocoa AGL;
1277012751 };
1277112752
@@ -12785,13 +12766,12 @@ in
1278512766 qt56 = recurseIntoAttrs (makeOverridable
1278612767 (import ../development/libraries/qt-5/5.6) {
1278712768 inherit newScope;
12788− inherit stdenv fetchurl fetchpatch makeSetupHook;
12769+ inherit stdenv fetchurl fetchpatch makeSetupHook makeWrapper;
1278912770 bison = bison2; # error: too few arguments to function 'int yylex(...
1279012771 inherit cups;
1279112772 harfbuzz = harfbuzzFull;
1279212773 inherit libGL;
1279312774 inherit perl;
12794− inherit (darwin) cf-private;
1279512775 inherit (gst_all_1) gstreamer gst-plugins-base;
1279612776 });
1279712777
@@ -12800,13 +12780,12 @@ in
1280012780 qt59 = recurseIntoAttrs (makeOverridable
1280112781 (import ../development/libraries/qt-5/5.9) {
1280212782 inherit newScope;
12803− inherit stdenv fetchurl fetchpatch makeSetupHook;
12783+ inherit stdenv fetchurl fetchpatch makeSetupHook makeWrapper;
1280412784 bison = bison2; # error: too few arguments to function 'int yylex(...
1280512785 inherit cups;
1280612786 harfbuzz = harfbuzzFull;
1280712787 inherit libGL;
1280812788 inherit perl;
12809− inherit (darwin) cf-private;
1281012789 inherit (gst_all_1) gstreamer gst-plugins-base;
1281112790 inherit gtk3;
1281212791 inherit (gnome3) dconf;
@@ -12817,13 +12796,12 @@ in
1281712796 qt511 = recurseIntoAttrs (makeOverridable
1281812797 (import ../development/libraries/qt-5/5.11) {
1281912798 inherit newScope;
12820− inherit stdenv fetchurl fetchFromGitHub makeSetupHook;
12799+ inherit stdenv fetchurl fetchFromGitHub makeSetupHook makeWrapper;
1282112800 bison = bison2; # error: too few arguments to function 'int yylex(...
1282212801 inherit cups;
1282312802 harfbuzz = harfbuzzFull;
1282412803 inherit libGL;
1282512804 inherit perl;
12826− inherit (darwin) cf-private;
1282712805 inherit gtk3;
1282812806 inherit (gnome3) dconf;
1282912807 inherit (gst_all_1) gstreamer gst-plugins-base;
@@ -12835,13 +12813,12 @@ in
1283512813 qt512 = recurseIntoAttrs (makeOverridable
1283612814 (import ../development/libraries/qt-5/5.12) {
1283712815 inherit newScope;
12838− inherit stdenv fetchurl fetchFromGitHub makeSetupHook;
12816+ inherit stdenv fetchurl fetchFromGitHub makeSetupHook makeWrapper;
1283912817 bison = bison2; # error: too few arguments to function 'int yylex(...
1284012818 inherit cups;
1284112819 harfbuzz = harfbuzzFull;
1284212820 inherit libGL;
1284312821 inherit perl;
12844− inherit (darwin) cf-private;
1284512822 inherit gtk3;
1284612823 inherit (gnome3) dconf;
1284712824 inherit (gst_all_1) gstreamer gst-plugins-base;
@@ -13099,7 +13076,6 @@ in
1309913076 schroedinger = callPackage ../development/libraries/schroedinger { };
1310013077
1310113078 SDL = callPackage ../development/libraries/SDL ({
13102− inherit (darwin) cf-private;
1310313079 inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa;
1310413080 } // lib.optionalAttrs stdenv.hostPlatform.isAndroid {
1310513081 # libGLU doesn’t work with Android’s SDL
@@ -13123,7 +13099,6 @@ in
1312313099 SDL_ttf = callPackage ../development/libraries/SDL_ttf { };
1312413100
1312513101 SDL2 = callPackage ../development/libraries/SDL2 {
13126− inherit (darwin) cf-private;
1312713102 inherit (darwin.apple_sdk.frameworks) AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL;
1312813103 };
1312913104
@@ -13175,7 +13150,6 @@ in
1317513150
1317613151 sfml = callPackage ../development/libraries/sfml {
1317713152 inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL;
13178− inherit (darwin) cf-private;
1317913153 };
1318013154 csfml = callPackage ../development/libraries/csfml { };
1318113155
@@ -13620,7 +13594,7 @@ in
1362013594 vte-ng = callPackage ../development/libraries/vte/ng.nix { };
1362113595
1362213596 vtk = callPackage ../development/libraries/vtk {
13623− inherit (darwin) cf-private libobjc;
13597+ inherit (darwin) libobjc;
1362413598 inherit (darwin.apple_sdk.libs) xpc;
1362513599 inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices DiskArbitration
1362613600 IOKit CFNetwork Security ApplicationServices
@@ -13736,7 +13710,6 @@ in
1373613710 wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
1373713711 inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel;
1373813712 inherit (darwin.stubs) setfile rez derez;
13739− inherit (darwin) cf-private;
1374013713 };
1374113714
1374213715 wxSVG = callPackage ../development/libraries/wxSVG {
@@ -14913,13 +14886,10 @@ in
1491314886
1491414887 xqilla = callPackage ../development/tools/xqilla { };
1491514888
14916− xquartz = callPackage ../servers/x11/xquartz {
14917− inherit (darwin) cf-private;
14918− };
14889+ xquartz = callPackage ../servers/x11/xquartz { };
1491914890
1492014891 quartz-wm = callPackage ../servers/x11/quartz-wm {
1492114892 stdenv = clangStdenv;
14922− inherit (darwin) cf-private;
1492314893 inherit (darwin.apple_sdk.frameworks) AppKit Foundation;
1492414894 inherit (darwin.apple_sdk.libs) Xplugin;
1492514895 };
@@ -14929,7 +14899,6 @@ in
1492914899 # have created a cycle.
1493014900 xorg = recurseIntoAttrs ((lib.callPackageWith __splicedPackages ../servers/x11/xorg {
1493114901 }).overrideScope' (lib.callPackageWith __splicedPackages ../servers/x11/xorg/overrides.nix {
14932− inherit (darwin) cf-private;
1493314902 inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa;
1493414903 inherit (darwin.apple_sdk.libs) Xplugin;
1493514904 inherit (buildPackages.darwin) bootstrap_cmds;
@@ -17529,7 +17498,6 @@ in
1752917498 imagemagick = null;
1753017499 acl = null;
1753117500 gpm = null;
17532− inherit (darwin) cf-private;
1753317501 inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO;
1753417502 };
1753517503
@@ -17548,7 +17516,6 @@ in
1754817516 imagemagick = null;
1754917517 acl = null;
1755017518 gpm = null;
17551− inherit (darwin) cf-private;
1755217519 inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO;
1755317520 };
1755417521
@@ -17559,7 +17526,6 @@ in
1755917526 }));
1756017527
1756117528 emacsMacport = callPackage ../applications/editors/emacs/macport.nix {
17562− inherit (darwin) cf-private;
1756317529 inherit (darwin.apple_sdk.frameworks)
1756417530 AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit
1756517531 ImageCaptureCore GSS ImageIO;
@@ -18156,7 +18122,6 @@ in
1815618122 gegl = gegl_0_4;
1815718123 lcms = lcms2;
1815818124 inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
18159− inherit (darwin) cf-private;
1816018125 };
1816118126
1816218127 gimp-with-plugins = callPackage ../applications/graphics/gimp/wrapper.nix {
@@ -18764,10 +18729,7 @@ in
1876418729 kipi-plugins = libsForQt5.callPackage ../applications/graphics/kipi-plugins { };
1876518730
1876618731 kitty = callPackage ../applications/misc/kitty {
18767− harfbuzz = if stdenv.isDarwin then harfbuzz.override {
18768− withCoreText = true;
18769− } else harfbuzz;
18770− inherit (darwin) cf-private;
18732+ harfbuzz = harfbuzz.override { withCoreText = stdenv.isDarwin; };
1877118733 inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation IOKit Kernel OpenGL;
1877218734 };
1877318735
@@ -20388,7 +20350,7 @@ in
2038820350 syncthing-tray = callPackage ../applications/misc/syncthing-tray { };
2038920351
2039020352 synergy = callPackage ../applications/misc/synergy {
20391− inherit (darwin) cf-private;
20353+ stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
2039220354 inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver;
2039320355 };
2039420356
@@ -20462,7 +20424,6 @@ in
2046220424
2046320425 aminal = callPackage ../applications/misc/aminal {
2046420426 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa Kernel;
20465− inherit (darwin) cf-private;
2046620427 };
2046720428
2046820429 termite-unwrapped = callPackage ../applications/misc/termite { };
@@ -20659,7 +20620,6 @@ in
2065920620 };
2066020621
2066120622 vim = callPackage ../applications/editors/vim {
20662− inherit (darwin) cf-private;
2066320623 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
2066420624 };
2066520625
@@ -20671,7 +20631,7 @@ in
2067120631
2067220632 vim_configurable = vimUtils.makeCustomizable (callPackage ../applications/editors/vim/configurable.nix {
2067320633 inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Foundation CoreData;
20674− inherit (darwin) libobjc cf-private;
20634+ inherit (darwin) libobjc;
2067520635 gtk2 = if stdenv.isDarwin then gtk2-x11 else gtk2;
2067620636 gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3;
2067720637 });
@@ -21327,7 +21287,6 @@ in
2132721287
2132821288 zola = callPackage ../applications/misc/zola {
2132921289 inherit (darwin.apple_sdk.frameworks) CoreServices;
21330− inherit (darwin) cf-private;
2133121290 };
2133221291
2133321292 zoom-us = libsForQt59.callPackage ../applications/networking/instant-messengers/zoom-us { };
@@ -21602,7 +21561,7 @@ in
2160221561 garden-of-coloured-lights = callPackage ../games/garden-of-coloured-lights { allegro = allegro4; };
2160321562
2160421563 gargoyle = callPackage ../games/gargoyle {
21605− inherit (darwin) cctools cf-private;
21564+ inherit (darwin) cctools;
2160621565 };
2160721566
2160821567 gav = callPackage ../games/gav { };
@@ -23080,13 +23039,11 @@ in
2308023039 ns-3 = callPackage ../development/libraries/science/networking/ns3 { };
2308123040
2308223041 root = callPackage ../applications/science/misc/root {
23083− inherit (darwin) cf-private;
2308423042 inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
2308523043 stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
2308623044 };
2308723045
2308823046 root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix {
23089− inherit (darwin) cf-private;
2309023047 inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
2309123048 stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
2309223049 });
@@ -23422,7 +23379,7 @@ in
2342223379 jack2 = callPackage ../misc/jackaudio {
2342323380 libopus = libopus.override { withCustomModes = true; };
2342423381 inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio Accelerate;
23425− inherit (darwin) cf-private libobjc;
23382+ inherit (darwin) libobjc;
2342623383 };
2342723384 libjack2 = jack2.override { prefix = "lib"; };
2342823385 jack2Full = jack2; # TODO: move to aliases.nix
pkgs/top-level/darwin-packages.nix+6−3
@@ -10,6 +10,10 @@ in
1010
1111 callPackage = newScope (darwin.apple_sdk.frameworks // darwin);
1212
13+ stdenvNoCF = stdenv.override {
14+ extraBuildInputs = [];
15+ };
16+
1317 apple_sdk = callPackage ../os-specific/darwin/apple-sdk { };
1418
1519 binutils-unwrapped = callPackage ../os-specific/darwin/binutils {
@@ -32,9 +36,8 @@ in
3236 libcxxabi = pkgs.libcxxabi;
3337 };
3438
35− cf-private = callPackage ../os-specific/darwin/cf-private {
36− inherit (darwin) CF apple_sdk;
37− };
39+ # TODO: remove alias.
40+ cf-private = darwin.apple_sdk.frameworks.CoreFoundation;
3841
3942 DarwinTools = callPackage ../os-specific/darwin/DarwinTools { };
4043