This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
60 lines
1.0 KiB
Nix
60 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
testers,
|
|
wayland,
|
|
meson,
|
|
pkg-config,
|
|
ninja,
|
|
wayland-scanner,
|
|
expat,
|
|
libxml2,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "wayland-scanner";
|
|
inherit (wayland) version src;
|
|
|
|
outputs = [
|
|
"out"
|
|
"bin"
|
|
"dev"
|
|
];
|
|
separateDebugInfo = true;
|
|
|
|
mesonFlags = [
|
|
(lib.mesonBool "documentation" false)
|
|
(lib.mesonBool "libraries" false)
|
|
(lib.mesonBool "tests" false)
|
|
];
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
pkg-config
|
|
ninja
|
|
]
|
|
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) wayland-scanner;
|
|
|
|
buildInputs = [
|
|
expat
|
|
libxml2
|
|
];
|
|
|
|
passthru = {
|
|
tests.pkg-config = testers.hasPkgConfigModules {
|
|
package = finalAttrs.finalPackage;
|
|
versionCheck = true;
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
inherit (wayland.meta) homepage license maintainers;
|
|
mainProgram = "wayland-scanner";
|
|
description = "C code generator for Wayland protocol XML files";
|
|
platforms = lib.platforms.unix;
|
|
pkgConfigModules = [ "wayland-scanner" ];
|
|
};
|
|
})
|