wayland-protocols: Switch to Meson

According to diffoscope this is fine (only the Nix store path changes).

Cross-compilation with doCheck=true is broken (requires pkg-config in
nativeBuildInputs but doesn't play nicely with checkInputs).
This commit is contained in:
Michael Weiss 2021-04-30 21:56:18 +02:00
parent 62b0f89f4e
commit a893df3f9f
No known key found for this signature in database
GPG key ID: 5BE487C4D4771D83

View file

@ -1,15 +1,29 @@
{ lib, stdenv, fetchurl, wayland-scanner }:
{ lib, stdenv, fetchurl
, pkg-config
, meson, ninja, wayland-scanner
, python3, wayland
}:
stdenv.mkDerivation rec {
pname = "wayland-protocols";
version = "1.21";
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
src = fetchurl {
url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
sha256 = "1rfdlkzz67qsb955zqb8jbw3m22pl6ppvrvfq8bqiqcb5n24b6dr";
};
nativeBuildInputs = [ wayland-scanner ];
postPatch = lib.optionalString doCheck ''
patchShebangs tests/
'';
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ meson ninja wayland-scanner ];
checkInputs = [ python3 wayland ];
mesonFlags = [ "-Dtests=${lib.boolToString doCheck}" ];
meta = {
description = "Wayland protocol extensions";