2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchurl
|
2021-05-03 20:48:10 +00:00
|
|
|
, fetchpatch
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, libinput
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2022-03-30 09:31:56 +00:00
|
|
|
, gnome-desktop
|
2021-05-03 20:48:10 +00:00
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, wayland
|
|
|
|
, libdrm
|
|
|
|
, libxkbcommon
|
|
|
|
, wlroots
|
2023-10-09 19:29:22 +00:00
|
|
|
, xorg
|
|
|
|
, nixosTests
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
phocWlroots = wlroots.overrideAttrs (old: {
|
|
|
|
patches = (old.patches or []) ++ [
|
2022-09-11 15:47:08 +00:00
|
|
|
# Revert "layer-shell: error on 0 dimension without anchors"
|
|
|
|
# https://source.puri.sm/Librem5/phosh/-/issues/422
|
2021-05-03 20:48:10 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://gitlab.gnome.org/World/Phosh/phoc/-/raw/acb17171267ae0934f122af294d628ad68b09f88/subprojects/packagefiles/wlroots/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
|
|
|
|
hash = "sha256-uNJaYwkZImkzNUEqyLCggbXAoIRX5h2eJaGbSHj1B+o=";
|
2021-05-03 20:48:10 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "phoc";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.31.0";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchurl {
|
|
|
|
# This tarball includes the meson wrapped subproject 'gmobile'.
|
|
|
|
url = "https://storage.puri.sm/releases/phoc/phoc-${version}.tar.xz";
|
|
|
|
hash = "sha256-P7Bs9JMv6KNKo4d2ID0/Ba4+Nel6DMn8o4I7EDvY4vY=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libdrm.dev
|
|
|
|
libxkbcommon
|
|
|
|
libinput
|
|
|
|
glib
|
|
|
|
gtk3
|
2022-03-30 09:31:56 +00:00
|
|
|
gnome-desktop
|
2021-05-03 20:48:10 +00:00
|
|
|
# For keybindings settings schemas
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.mutter
|
2021-05-03 20:48:10 +00:00
|
|
|
wayland
|
|
|
|
phocWlroots
|
2023-10-09 19:29:22 +00:00
|
|
|
xorg.xcbutilwm
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = ["-Dembed-wlroots=disabled"];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x build-aux/post_install.py
|
|
|
|
patchShebangs build-aux/post_install.py
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests.phosh = nixosTests.phosh;
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Wayland compositor for mobile phones like the Librem 5";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/World/Phosh/phoc";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-03-04 12:14:45 +00:00
|
|
|
maintainers = with maintainers; [ masipcat tomfitzhenry zhaofengli ];
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|