1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 libGL,
6 libinput,
7 pkgconf,
8 xkeyboard_config,
9 libgbm,
10 pango,
11 udev,
12 shaderc,
13 libglvnd,
14 vulkan-loader,
15 autoPatchelfHook,
16}:
17
18rustPlatform.buildRustPackage rec {
19 pname = "jay";
20 version = "1.10.0";
21
22 src = fetchFromGitHub {
23 owner = "mahkoh";
24 repo = "jay";
25 rev = "v${version}";
26 sha256 = "sha256-wrA/UGxhIUMc2T+0/UNKS9iN44pe9ap2l+xL8ZE5jsI=";
27 };
28
29 cargoHash = "sha256-2LfEktaHB+uIQSWeSFG+v7+7wfkGlDz54m7P4KttPLI=";
30
31 SHADERC_LIB_DIR = "${lib.getLib shaderc}/lib";
32
33 nativeBuildInputs = [
34 autoPatchelfHook
35 pkgconf
36 ];
37
38 buildInputs = [
39 libGL
40 xkeyboard_config
41 libgbm
42 pango
43 udev
44 libinput
45 shaderc
46 ];
47
48 runtimeDependencies = [
49 libglvnd
50 vulkan-loader
51 ];
52
53 postInstall = ''
54 install -D etc/jay.portal $out/share/xdg-desktop-portal/portals/jay.portal
55 install -D etc/jay-portals.conf $out/share/xdg-desktop-portal/jay-portals.conf
56 '';
57
58 meta = with lib; {
59 description = "Wayland compositor written in Rust";
60 homepage = "https://github.com/mahkoh/jay";
61 license = licenses.gpl3;
62 platforms = platforms.linux;
63 maintainers = with maintainers; [ dit7ya ];
64 mainProgram = "jay";
65 };
66}