about summary refs log tree commit diff
path: root/pkgs/tools/wayland/wayland-proxy-virtwl/default.nix
blob: 47b59353af86d448480ab674a0be1fb33faec502 (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
45
46
47
48
49
50
{ lib
, fetchFromGitHub
, ocamlPackages
, pkg-config
, libdrm
}:

ocamlPackages.buildDunePackage rec {
  pname = "wayland-proxy-virtwl";
  version = "unstable-2022-09-22";

  src = fetchFromGitHub {
    owner = "talex5";
    repo = pname;
    rev = "5940346db2a4427f21c7b30a2593b179af36a935";
    sha256 = "0jnr5q52nb3yqr7ykvvb902xsad24cdi9imkslcsa5cnzb4095rw";
  };

  postPatch = ''
    # no need to vendor
    rm -r ocaml-wayland
  '';

  minimalOCamlVersion = "4.12";

  strictDeps = true;
  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [ libdrm ] ++ (with ocamlPackages; [
    dune-configurator
    ppx_cstruct
    wayland
    cmdliner
    logs
    cstruct-lwt
    ppx_cstruct
  ]);

  doCheck = true;

  meta = with lib; {
    homepage = "https://github.com/talex5/wayland-virtwl-proxy";
    description = "Proxy Wayland connections across a VM boundary";
    license = licenses.asl20;
    maintainers = [ maintainers.sternenseemann ];
    platforms = platforms.linux;
  };
}