Skip to content

linuxPackages.evdi: Fix flags#438688

Merged
alyssais merged 1 commit intoNixOS:masterfrom
dramforever:evdi-flags-fix
Aug 31, 2025
Merged

linuxPackages.evdi: Fix flags#438688
alyssais merged 1 commit intoNixOS:masterfrom
dramforever:evdi-flags-fix

Conversation

@dramforever
Copy link
Contributor

Since #402198 kernel modules are no longer built with wrapped compilers.

Firstly, NIX_CFLAGS_COMPILE is no longer effective, so we change that to CFLAGS, which is used in the Makefile for evdi.

Secondly, we still need to use the wrapped compiler for userspace stuff, so separate that out in postBuild.

Fixes #437311

Note: I do not have DisplayLink hardware. I have only inspected the build result. Please test.

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.

Add a 👍 reaction to pull requests you find important.

Since NixOS#402198 kernel modules are no longer built with wrapped compilers.

Firstly, NIX_CFLAGS_COMPILE is no longer effective, so we change that to
CFLAGS, which is used in the Makefile for evdi.

Secondly, we still need to use the wrapped compiler for userspace stuff,
so separate that out in postBuild.

Fixes NixOS#437311
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 30, 2025
@harmanhobbit
Copy link

This fixes it for me on a macbook air 2014 with kensington hub.

@dramforever thanks for working on this.

@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-ready-for-review/3032/5819

postBuild = ''
# Don't use makeFlags for userspace stuff
make library pyevdi
'';
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this would make sense to be in a separate package, like with ZFS…

env.NIX_CFLAGS_COMPILE = toString [
env.CFLAGS = toString [
"-Wno-error"
"-Wno-error=discarded-qualifiers" # for Linux 4.19 compatibility
Copy link
Member

Choose a reason for hiding this comment

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

We don't have Linux 4.19 any more, so hopefully would be possible to clean these up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are for 4.19 plus. The kernel module is filled with const mismatches and signedness mismatches like these.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, yikes.

@alyssais alyssais merged commit 3cecdee into NixOS:master Aug 31, 2025
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: linuxKernel.packages.linux_6_*.evdi

4 participants