diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-08-21 02:58:13 +0200 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-08-20 20:58:13 -0400 |
commit | e6e03ba58d441c18f2ee17e4f0953a60c2908611 (patch) | |
tree | 03529cd581f418eec8d216a38e99ba11e04f7dd0 /pkgs/os-specific/linux/v4l-utils | |
parent | c5c47203dcc63aa49235b0f73124917cd94f1f31 (diff) |
libv4l: disable building Qt (#67134)
Since we added wrapQTAppHooks to qt5.mkDerivation, it pollutes the closure of everything it touches even when package is not building with Qt support. We had to revert to the standard deriver to avoid this.
Diffstat (limited to 'pkgs/os-specific/linux/v4l-utils')
-rw-r--r-- | pkgs/os-specific/linux/v4l-utils/default.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index 9bb6fcdd0a006..caa233af46952 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -1,12 +1,16 @@ -{ stdenv, lib, fetchurl, pkgconfig, perl, mkDerivation +{ stdenv, lib, fetchurl, pkgconfig, perl , libjpeg, udev , withUtils ? true -, withGUI ? true, alsaLib, libX11, qtbase, libGLU +, withGUI ? true, alsaLib, libX11, qtbase, libGLU, wrapQtAppsHook }: # See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT) -mkDerivation rec { +let + withQt = withUtils && withGUI; + +# we need to use stdenv.mkDerivation in order not to pollute the libv4l’s closure with Qt +in stdenv.mkDerivation rec { pname = "v4l-utils"; version = "1.16.6"; @@ -29,13 +33,13 @@ mkDerivation rec { ln -s "$dev/include/libv4l1-videodev.h" "$dev/include/videodev.h" ''; - nativeBuildInputs = [ pkgconfig perl ]; + nativeBuildInputs = [ pkgconfig perl ] ++ lib.optional withQt wrapQtAppsHook; - buildInputs = [ udev ] ++ lib.optionals (withUtils && withGUI) [ alsaLib libX11 qtbase libGLU ]; + buildInputs = [ udev ] ++ lib.optionals withQt [ alsaLib libX11 qtbase libGLU ]; propagatedBuildInputs = [ libjpeg ]; - NIX_CFLAGS_COMPILE = lib.optional (withUtils && withGUI) "-std=c++11"; + NIX_CFLAGS_COMPILE = lib.optional withQt "-std=c++11"; postPatch = '' patchShebangs . |