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

View file

@ -1,8 +1,6 @@
{ lib
, mkMesonDerivation
, meson
, ninja
, doxygen
# Configuration Options
@ -37,8 +35,6 @@ mkMesonDerivation (finalAttrs: {
];
nativeBuildInputs = [
meson
ninja
doxygen
];

View file

@ -1,8 +1,6 @@
{ lib
, mkMesonDerivation
, meson
, ninja
, doxygen
# Configuration Options
@ -32,8 +30,6 @@ mkMesonDerivation (finalAttrs: {
];
nativeBuildInputs = [
meson
ninja
doxygen
];

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
, nix-store
@ -56,12 +51,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
({ inherit editline readline; }.${readlineFlavor})
] ++ lib.optional enableMarkdown lowdown;

View file

@ -2,10 +2,6 @@
, stdenv
, mkMesonDerivation
, meson
, ninja
, pkg-config
, nix-store-c
, nix-expr
@ -37,12 +33,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-store-c
nix-expr

View file

@ -1,11 +1,7 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, bison
, flex
, cmake # for resolving toml11 dep
@ -64,9 +60,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
bison
flex
cmake

View file

@ -1,17 +1,11 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
, nix-store
, nlohmann_json
, libgit2
, man
# Configuration Options
@ -39,12 +33,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
libgit2
];

View file

@ -1,19 +1,12 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
, nix-store
, nix-fetchers
, nix-expr
, nlohmann_json
, libgit2
, man
# Configuration Options
@ -41,12 +34,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-store
nix-util

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util-c
, nix-store
@ -40,12 +35,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util-c
nix-store

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, openssl
@ -38,12 +33,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util
nix-store

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util-c
, nix-store
@ -38,12 +33,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util-c
nix-store

View file

@ -1,11 +1,7 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, unixtools
, nix-util
@ -53,11 +49,8 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
] ++ lib.optional embeddedSandboxShell unixtools.hexdump;
nativeBuildInputs =
lib.optional embeddedSandboxShell unixtools.hexdump;
buildInputs = [
boost

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
@ -37,12 +32,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util
];

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, boost
, brotli
@ -45,12 +40,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
brotli
libsodium

View file

@ -1,21 +1,12 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-store
, nix-expr
, nix-main
, nix-cmd
, rapidcheck
, gtest
, runCommand
# Configuration Options
, version
@ -90,12 +81,6 @@ mkMesonDerivation (finalAttrs: {
]
);
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-store
nix-expr

View file

@ -3,11 +3,7 @@
, mkMesonDerivation
, perl
, perlPackages
, meson
, ninja
, pkg-config
, nix-store
, darwin
, version
, curl
, bzip2
@ -36,9 +32,6 @@ perl.pkgs.toPerlModule (mkMesonDerivation (finalAttrs: {
]);
nativeBuildInputs = [
meson
ninja
pkg-config
perl
curl
];

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-store-test-support
, nix-expr
@ -39,12 +34,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-store-test-support
nix-expr

View file

@ -2,11 +2,6 @@
, buildPackages
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-expr
, nix-expr-c
@ -42,12 +37,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-expr
nix-expr-c

View file

@ -2,11 +2,6 @@
, buildPackages
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-fetchers
, nix-store-test-support
@ -41,12 +36,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-fetchers
nix-store-test-support

View file

@ -2,11 +2,6 @@
, buildPackages
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-flake
, nix-expr-test-support
@ -41,12 +36,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-flake
nix-expr-test-support

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util-test-support
, nix-store
@ -39,12 +34,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util-test-support
nix-store

View file

@ -2,11 +2,6 @@
, buildPackages
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-store
, nix-store-c
@ -43,12 +38,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-store
nix-store-c

View file

@ -1,11 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
@ -38,12 +33,6 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
nix-util
rapidcheck

View file

@ -2,11 +2,6 @@
, buildPackages
, stdenv
, mkMesonDerivation
, releaseTools
, meson
, ninja
, pkg-config
, nix-util
, nix-util-c
@ -41,12 +36,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
nix-util
nix-util-c