summary refs log tree commit diff
path: root/pkgs/development/libraries/wayland/default.nix
blob: 60d240552d4fd653bfe383350fd5dd42dee0d39f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib, stdenv, fetchurl, pkgconfig
, libffi, libxml2, wayland
, expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0)
}:

# Require the optional to be enabled until upstream fixes or removes the configure flag
assert expat != null;

stdenv.mkDerivation rec {
  pname = "wayland";
  version = "1.17.0";

  src = fetchurl {
    url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
    sha256 = "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj";
  };

  separateDebugInfo = true;

  configureFlags = [
    "--disable-documentation"
  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
    "--with-host-scanner"
  ];

  nativeBuildInputs = [
    pkgconfig
  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
    # for wayland-scanner during build
    wayland
  ];

  buildInputs = [ libffi /* docbook_xsl doxygen graphviz libxslt xmlto */ expat libxml2 ];

  meta = {
    description = "Reference implementation of the wayland protocol";
    homepage    = https://wayland.freedesktop.org/;
    license     = lib.licenses.mit;
    platforms   = lib.platforms.linux;
    maintainers = with lib.maintainers; [ codyopel ];
  };

  passthru.version = version;
}