From 6f2ee4181e72e90ddc828ad9104e19e06ee2bf8d Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 12 Jun 2025 11:24:45 -0700 Subject: [PATCH] freebsd.drm-kmod: split debug output --- .../bsd/freebsd/pkgs/drm-kmod/package.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/drm-kmod/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/drm-kmod/package.nix index fa2c60fbda78..3807b9f01c9b 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/drm-kmod/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/drm-kmod/package.nix @@ -21,7 +21,7 @@ let fetchOptions = (lib.importJSON ./versions.json).${branch}; in -mkDerivation { +mkDerivation rec { # this derivation is tricky; it is not an in-tree FreeBSD build but it is meant to be built # at the same time as the in-tree FreeBSD code, so it expects the same environment. Therefore, # it is appropriate to use the freebsd mkDerivation. @@ -31,6 +31,11 @@ mkDerivation { src = fetchFromGitHub fetchOptions; + outputs = [ + "out" + "debug" + ]; + extraNativeBuildInputs = [ xargs-j ]; hardeningDisable = [ @@ -53,11 +58,18 @@ mkDerivation { SYSDIR = "${sys.src}/sys"; KMODDIR = "${placeholder "out"}/kernel"; + KERN_DEBUGDIR = "${placeholder "debug"}/lib/debug"; + KERN_DEBUGDIR_KODIR = "${KERN_DEBUGDIR}/kernel"; + KERN_DEBUGDIR_KMODDIR = "${KERN_DEBUGDIR}/kernel"; preBuild = '' mkdir -p linuxkpi/dummy/include ''; + makeFlags = [ + "DEBUG_FLAGS=-g" + ]; + meta = { description = "Linux drm driver, ported to FreeBSD"; platforms = lib.platforms.freebsd;