From 3cecdee81e74ee3e7b5b4ad23daf264247fd3c36 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sun, 31 Aug 2025 02:05:17 +0800 Subject: [PATCH] linuxPackages.evdi: Fix flags 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 --- pkgs/os-specific/linux/evdi/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index efb6dd966ec1..4baba4c5f7d8 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -26,12 +26,17 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-xB3AHg9t/X8vw5p7ohFQ+WuMjb1P8DAP3pROiwWkVPs="; }; - env.NIX_CFLAGS_COMPILE = toString [ + env.CFLAGS = toString [ "-Wno-error" "-Wno-error=discarded-qualifiers" # for Linux 4.19 compatibility "-Wno-error=sign-compare" ]; + postBuild = '' + # Don't use makeFlags for userspace stuff + make library pyevdi + ''; + nativeBuildInputs = kernel.moduleBuildDependencies; buildInputs = [ @@ -43,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = kernelModuleMakeFlags ++ [ "KVER=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "module" ]; hardeningDisable = [