2021-04-30 01:54:24 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchpatch
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, libinput
|
2021-05-07 22:18:14 +01:00
|
|
|
, gnome
|
2022-03-16 21:16:40 +00:00
|
|
|
, gnome-desktop
|
2021-04-30 01:54:24 +01:00
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, wayland
|
|
|
|
, libdrm
|
|
|
|
, libxkbcommon
|
|
|
|
, wlroots
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
phocWlroots = wlroots.overrideAttrs (old: {
|
|
|
|
patches = (old.patches or []) ++ [
|
|
|
|
# Temporary fix. Upstream report: https://source.puri.sm/Librem5/phosh/-/issues/422
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
|
|
|
|
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/78fde4aaf1a74eb13a3f083cb6dfb29f578c3265/community/wlroots/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
|
|
|
|
sha256 = "1zjn7mwdj21z0jsc2mz90cnrzk97yqkiq58qqgpjav4h4dgpfb38";
|
|
|
|
})
|
2021-10-29 20:27:00 +01:00
|
|
|
|
|
|
|
# xwayland: Allow to retrieve _NET_STARTUP_ID
|
|
|
|
(fetchpatch {
|
|
|
|
name = "allow-to-retrieve-net-startup-id.patch";
|
|
|
|
url = "https://github.com/swaywm/wlroots/commit/66593071bc90a1cccaeedc636eb6f33c973f5362.patch";
|
|
|
|
sha256 = "sha256-yKf/twdUzrII5IakH7AH6LGyPDo9Nl/gIB0pTThSTfY=";
|
|
|
|
})
|
2022-03-26 01:32:06 +00:00
|
|
|
# xdg-activation: Allow to submit tokens
|
|
|
|
(fetchpatch {
|
|
|
|
name = "allow-to-submit-tokens.patch";
|
|
|
|
url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/4c59f7d46a949548caa55805b00922f846d58525.patch";
|
|
|
|
sha256 = "sha256-1kUIt6lV3HXN2BBBER8sjYVLTvgqELdSeFullJjNGo8=";
|
|
|
|
})
|
2021-10-29 20:27:00 +01:00
|
|
|
# xwayland: Allow to retrieve startup-id via _NET_STARTUP_INFO
|
|
|
|
(fetchpatch {
|
|
|
|
name = "allow-to-retrieve-startup-id-via-net-startup-info.patch";
|
|
|
|
url = "https://github.com/swaywm/wlroots/commit/235bb6f2fcb8ee4174215ba74b5bc2f191c5960a.patch";
|
|
|
|
sha256 = "sha256-7AWBq12tF/781CmgvTaOvTIiiJMywxRn6eWp+jacdak=";
|
|
|
|
})
|
2021-04-30 01:54:24 +01:00
|
|
|
];
|
|
|
|
});
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "phoc";
|
2022-03-26 01:32:06 +00:00
|
|
|
version = "0.13.0";
|
2021-04-30 01:54:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-08-11 23:56:37 +01:00
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
group = "World";
|
|
|
|
owner = "Phosh";
|
2021-04-30 01:54:24 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-26 01:32:06 +00:00
|
|
|
sha256 = "sha256-65u59S6ntvkoQUO5BvkHZVcbj6cHIU4CgHWjzFo6s94=";
|
2021-04-30 01:54:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libdrm.dev
|
|
|
|
libxkbcommon
|
|
|
|
libinput
|
|
|
|
glib
|
|
|
|
gtk3
|
2022-03-16 21:16:40 +00:00
|
|
|
gnome-desktop
|
2021-04-30 01:54:24 +01:00
|
|
|
# For keybindings settings schemas
|
2021-05-07 22:18:14 +01:00
|
|
|
gnome.mutter
|
2021-04-30 01:54:24 +01:00
|
|
|
wayland
|
|
|
|
phocWlroots
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = ["-Dembed-wlroots=disabled"];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x build-aux/post_install.py
|
|
|
|
patchShebangs build-aux/post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Wayland compositor for mobile phones like the Librem 5";
|
2021-08-11 23:56:37 +01:00
|
|
|
homepage = "https://gitlab.gnome.org/World/Phosh/phoc";
|
2021-04-30 01:54:24 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2021-12-21 05:24:30 +00:00
|
|
|
maintainers = with maintainers; [ masipcat zhaofengli ];
|
2021-04-30 01:54:24 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|