1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

packaging: Add mesonLayer

... and remove a few unused arguments.

This adds pkg-config to a two or three packages that don't use it,
but we shouldn't let that bother us. It's like our personal stdenv.
This commit is contained in:
Robert Hensing 2024-10-13 22:25:25 +02:00
parent d21026b6f1
commit 0aef34b790
24 changed files with 13 additions and 235 deletions

View file

@ -60,6 +60,16 @@ let
workDir = null;
};
mesonLayer = finalAttrs: prevAttrs:
{
mesonFlags = prevAttrs.mesonFlags or [];
nativeBuildInputs = [
pkgs.buildPackages.meson
pkgs.buildPackages.ninja
pkgs.buildPackages.pkg-config
] ++ prevAttrs.nativeBuildInputs or [];
};
# Work around weird `--as-needed` linker behavior with BSD, see
# https://github.com/mesonbuild/meson/issues/3593
bsdNoLinkAsNeeded = finalAttrs: prevAttrs:
@ -177,6 +187,7 @@ scope: {
miscGoodPractice
bsdNoLinkAsNeeded
localSourceLayer
mesonLayer
];
in stdenv.mkDerivation
(lib.extends