Merge pull request #121726 from primeos/wayland-scanner-fix-cross-compilation

wayland{.bin,-scanner}: Add a pkg-config file for cross-compilation
This commit is contained in:
Michael Weiss 2021-05-05 21:59:13 +02:00 committed by GitHub
commit 62b0f89f4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
, meson
, pkg-config
, ninja
, wayland
, wayland-scanner
, expat
, libxml2
, withLibraries ? stdenv.isLinux
@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
pkg-config
ninja
] ++ lib.optionals isCross [
wayland # For wayland-scanner during the build
wayland-scanner
] ++ lib.optionals withDocumentation [
(graphviz-nox.override { pango = null; }) # To avoid an infinite recursion
doxygen
@ -85,6 +85,18 @@ stdenv.mkDerivation rec {
docbook_xml_dtd_42
];
postFixup = ''
# The pkg-config file is required for cross-compilation:
mkdir -p $bin/lib/pkgconfig/
cat <<EOF > $bin/lib/pkgconfig/wayland-scanner.pc
wayland_scanner=$bin/bin/wayland-scanner
Name: Wayland Scanner
Description: Wayland scanner
Version: ${version}
EOF
'';
meta = with lib; {
description = "Core Wayland window system code and protocol";
longDescription = ''