Skip to content

libv4l: don't pull qtbase into cross-compiled builds#487060

Merged
doronbehar merged 1 commit intoNixOS:masterfrom
eryngion:fix-lib4l-qt-dependecy-in-cross
Feb 7, 2026
Merged

libv4l: don't pull qtbase into cross-compiled builds#487060
doronbehar merged 1 commit intoNixOS:masterfrom
eryngion:fix-lib4l-qt-dependecy-in-cross

Conversation

@eryngion
Copy link

@eryngion eryngion commented Feb 4, 2026

libv4l definition explicitly disables withUtils which in its turn disables withQt, but without this change the cross-compiled version still pulls in qtbase as a build-time dependency:

/nix/store/4d39hzhiafjd9a7bhwgx71pf107jam7f-qtwebengine-aarch64-unknown-linux-gnu-5.15.19.drv
└───/nix/store/vqipnyd68wllhxm06aa0a1a57rs4vrsk-ffmpeg-aarch64-unknown-linux-gnu-7.1.3.drv
    └───/nix/store/yp8hidwx2mx1ih08aqqp7pah0dgs3r5h-v4l-utils-aarch64-unknown-linux-gnu-1.32.0.drv
        └───/nix/store/s2bqx6qwch94g60axz84zs6d3cp9sjx2-qtbase-6.10.1.drv
            └───/nix/store/vkw73c46w1lkcx5vl5wa0519scahnadq-qttranslations-6.10.1.drv
                └───/nix/store/5wpq717cais7avynrwvx2p7hhcn51b9w-qttools-6.10.1.drv
                    └───/nix/store/48w6gal7n8r59bnkwiqg8n94l81zvs8x-qtbase-6.10.1.drv

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci bot requested review from Yarny0 and codyopel February 4, 2026 22:26
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle! labels Feb 4, 2026
@eryngion eryngion force-pushed the fix-lib4l-qt-dependecy-in-cross branch from 4b54f27 to 3e979f9 Compare February 4, 2026 22:27
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

LGTM mostly.

@eryngion eryngion force-pushed the fix-lib4l-qt-dependecy-in-cross branch from 3e979f9 to 1550bba Compare February 4, 2026 23:35
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Feb 5, 2026
Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

Hi @eryngion, and thanks for your contribution!

I did some tests, on my x86_64-linux machine:

  • v4l-utils yields the same derivation hash as before
  • libv4l yields the same derivation hash as before
  • pkgsCross.aarch64-multiplatform.v4l-utils builds without error
  • pkgsCross.aarch64-multiplatform.libv4l builds without error

I can't test those cross-compiled packages, unfortunatelly, but I expect them to work.

I approve this pull request being merged.

It is good that you picked staging as the target branch, since v4l-utils usually causes mass rebuild. However, in this case, only cross-compilation is affected, so I suggest to retarget the pull request to master. Please have a look at https://github.com/NixOS/nixpkgs/blob/00c21e4c93d963c50d4c0c89bfa84ed6e0694df2/CONTRIBUTING.md#rebasing-between-branches-ie-from-master-to-staging, as changing the target branch can lead to a mess if not done right.

@eryngion
Copy link
Author

eryngion commented Feb 5, 2026

There's one more reason I chose staging: I have a couple of other PRs that can target only staging and it'll be mildly useful to have this commit in the same branch. Yeah, it'll get merged back from master too, but it'll take slightly more time.

So, if you don't mind, I'd prefer staging. But again: not a big deal.

Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

I'm not sure if that's really worth it, since master is merged into staging every 6 hours (actually via staging-next, so it would be 12h at most), and merging things into master instead of staging reduces the potential of conflicts for later contributions.
However, in the long run, it will not make a difference. I approve this pull request.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Feb 7, 2026
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2774

@eryngion eryngion force-pushed the fix-lib4l-qt-dependecy-in-cross branch from 1550bba to cf8640a Compare February 7, 2026 14:20
github-actions[bot]

This comment was marked as outdated.

@eryngion
Copy link
Author

eryngion commented Feb 7, 2026

I've rebased it onto master but changing the target on GitHub is no longer available for me.

@Yarny0
Copy link
Contributor

Yarny0 commented Feb 7, 2026

I've rebased it onto master but changing the target on GitHub is no longer available for me.

Uh-oh! Sometimes it's best to rebase onto a merge-base of master, staging-next and staging -- that way there won't be any stray commits, no matter what the target branch is. If you can't change the target branch, it might help to change the pull request to draft state.
Otherwise, I'm out of ideas (short of closing and recreating the pull request, of course). Maybe someone else has an idea.

@doronbehar doronbehar force-pushed the fix-lib4l-qt-dependecy-in-cross branch from cf8640a to 07e4e2b Compare February 7, 2026 18:07
@github-actions github-actions bot dismissed their stale review February 7, 2026 18:08

Review dismissed automatically

@doronbehar
Copy link
Contributor

I don't have a general advice on how to deal with these kind of situation. What I did now was done with gh and I dropped the commits with git rebase --interactive.

@eryngion eryngion marked this pull request as draft February 7, 2026 18:14
@eryngion eryngion changed the base branch from staging to master February 7, 2026 18:57
@nixpkgs-ci nixpkgs-ci bot closed this Feb 7, 2026
@nixpkgs-ci nixpkgs-ci bot reopened this Feb 7, 2026
github-actions[bot]

This comment was marked as outdated.

@eryngion eryngion force-pushed the fix-lib4l-qt-dependecy-in-cross branch from 07e4e2b to cf8640a Compare February 7, 2026 18:59
@github-actions github-actions bot dismissed their stale review February 7, 2026 18:59

Review dismissed automatically

@eryngion eryngion marked this pull request as ready for review February 7, 2026 19:01
@eryngion
Copy link
Author

eryngion commented Feb 7, 2026

Updating base branch with gh have worked, thanks for the suggestion. There was no need to drop commit though: they were only shown because the PR still targeted staging.

@Yarny0
Copy link
Contributor

Yarny0 commented Feb 7, 2026

Thanks @eryngion , for your hard work! I have no objections and reaffirm my approval.

@doronbehar doronbehar added this pull request to the merge queue Feb 7, 2026
Merged via the queue into NixOS:master with commit 8f063e6 Feb 7, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants