2020-12-07 07:45:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, meson
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-12-07 07:45:13 +00:00
|
|
|
, substituteAll
|
|
|
|
, ninja
|
|
|
|
, libffi
|
|
|
|
, libxml2
|
|
|
|
, wayland
|
2020-04-24 23:36:52 +00:00
|
|
|
, expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0)
|
2020-08-20 17:08:02 +00:00
|
|
|
, withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform
|
2020-12-07 07:45:13 +00:00
|
|
|
, graphviz-nox
|
|
|
|
, doxygen
|
|
|
|
, libxslt
|
|
|
|
, xmlto
|
|
|
|
, python3
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, docbook_xml_dtd_42
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Require the optional to be enabled until upstream fixes or removes the configure flag
|
|
|
|
assert expat != null;
|
|
|
|
let
|
|
|
|
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
|
2020-12-07 07:45:13 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wayland";
|
2021-02-19 19:06:45 +00:00
|
|
|
version = "1.19.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
|
2021-02-19 19:06:45 +00:00
|
|
|
sha256 = "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
patches = [
|
2020-12-07 07:45:13 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-add-placeholder-for-nm.patch;
|
|
|
|
nm = "${stdenv.cc.targetPrefix}nm";
|
|
|
|
})
|
2020-11-12 09:05:59 +00:00
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
outputs = [ "out" ] ++ lib.optionals withDocumentation [ "doc" "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
|
|
|
mesonFlags = [ "-Ddocumentation=${lib.boolToString withDocumentation}" ];
|
|
|
|
|
|
|
|
postPatch = lib.optionalString withDocumentation ''
|
|
|
|
patchShebangs doc/doxygen/gen-doxygen.py
|
|
|
|
'';
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
depsBuildBuild = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2020-12-07 07:45:13 +00:00
|
|
|
meson
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-12-07 07:45:13 +00:00
|
|
|
ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals isCross [
|
|
|
|
wayland # For wayland-scanner during the build
|
|
|
|
] ++ lib.optionals withDocumentation [
|
|
|
|
(graphviz-nox.override { pango = null; }) # To avoid an infinite recursion
|
2020-12-07 07:45:13 +00:00
|
|
|
doxygen
|
|
|
|
libxslt
|
|
|
|
xmlto
|
|
|
|
python3
|
|
|
|
docbook_xml_dtd_45
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
buildInputs = [
|
|
|
|
libffi
|
|
|
|
expat
|
|
|
|
libxml2
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals withDocumentation [
|
2020-12-07 07:45:13 +00:00
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xml_dtd_42
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Core Wayland window system code and protocol";
|
|
|
|
longDescription = ''
|
|
|
|
Wayland is a project to define a protocol for a compositor to talk to its
|
|
|
|
clients as well as a library implementation of the protocol.
|
|
|
|
The wayland protocol is essentially only about input handling and buffer
|
|
|
|
management, but also handles drag and drop, selections, window management
|
|
|
|
and other interactions that must go through the compositor (but not
|
|
|
|
rendering).
|
|
|
|
'';
|
2020-12-07 07:45:13 +00:00
|
|
|
homepage = "https://wayland.freedesktop.org/";
|
|
|
|
license = lib.licenses.mit; # Expat version
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ primeos codyopel ];
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.version = version;
|
|
|
|
}
|