kernel-builder/menuconfig: Use pkg-config wrapper
This works around an issue with upstream Nixpkgs and the way pkg-config
is now (admitedly rightly so) prefixed.
In actuality, the kernel build should be fixed upstream, but this would
be a non-trivial thing to get into the kernel.
, buildPackages
, writeTextFile
+, writeShellScriptBin
, perl
, bc
@@ -88,6 +89,12 @@ let
'';
};
+ # Inspired from #91991
+ # https://github.com/NixOS/nixpkgs/pull/91991
+ pkgconfig-helper = writeShellScriptBin "pkg-config" ''
+ exec ${buildPackages.pkgconfig}/bin/${buildPackages.pkgconfig.targetPrefix}pkg-config "$@"
+ '';
+
# Shortcuts
inherit (stdenv.lib) optionals optional optionalString;
inherit (stdenv.hostPlatform) platform;
@@ -235,7 +242,7 @@ let kernel = stdenv.mkDerivation {
menuconfig = kernel.overrideAttrs({nativeBuildInputs ? [] , ...}: {
nativeBuildInputs = nativeBuildInputs ++ [
ncurses
- pkgconfig
+ pkgconfig-helper
];
buildFlags = [ "nconfig" "V=1" ];
