Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions pkgs/os-specific/linux/v4l-utils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
withUtils ? true,
withGUI ? true,
alsa-lib,
qt5compat,
qtbase,
libGLU,
wrapQtAppsHook,
qt6Packages,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does qt5 -> qt6 have to do with fixing cross-compilation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjornfor It already qt6, I just streamlined it to plain callPackages (it correct if I remember right, and allow move to by-name hierarchy in future)

-   v4l-utils = qt6.callPackage ../os-specific/linux/v4l-utils { };
+   v4l-utils = callPackage ../os-specific/linux/v4l-utils { };

linuxHeaders,
buildPackages,
}:

# See libv4l in all-packages.nix for the libs only (overrides alsa, QT)
Expand Down Expand Up @@ -66,6 +66,10 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals stdenv.hostPlatform.isGnu [
(lib.mesonOption "gconvsysdir" "${glibc.out}/lib/gconv")
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# BPF support fail to cross compile, unable to find `linux/lirc.h`
(lib.mesonOption "bpf" "disabled")
];

postFixup = ''
Expand All @@ -82,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
perl
udevCheckHook
]
++ lib.optional withQt wrapQtAppsHook;
++ lib.optional withQt qt6Packages.wrapQtAppsHook;

buildInputs = [
json_c
Expand All @@ -93,8 +97,8 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional (!stdenv.hostPlatform.isGnu) argp-standalone
++ lib.optionals withQt [
alsa-lib
qt5compat
qtbase
qt6Packages.qt5compat
qt6Packages.qtbase
libGLU
];

Expand All @@ -115,6 +119,12 @@ stdenv.mkDerivation (finalAttrs: {
--replace-fail "get_option('datadir') / 'locale'" "get_option('localedir')"
'';

# Meson unable to find moc/uic/rcc in case of cross-compilation
# https://github.com/mesonbuild/meson/issues/13018
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
export PATH=${buildPackages.qt6Packages.qtbase}/libexec:$PATH
'';

enableParallelBuilding = true;

doInstallCheck = true;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11391,7 +11391,7 @@ with pkgs;
translateManpages = false;
};

v4l-utils = qt6.callPackage ../os-specific/linux/v4l-utils { };
v4l-utils = callPackage ../os-specific/linux/v4l-utils { };

windows = callPackages ../os-specific/windows { };

Expand Down
Loading