Merge pull request #121727 from primeos/wayland-protocols-switch-to-meson

wayland-protocols: Switch to Meson
This commit is contained in:
Michael Weiss 2021-05-17 16:52:10 +02:00 committed by GitHub
commit d916642bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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";