2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-02-29 20:09:43 +00:00
|
|
|
, stdenvNoCC
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchurl
|
2021-05-03 20:48:10 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2021-05-03 20:48:10 +00:00
|
|
|
, libinput
|
2024-05-15 15:35:15 +00:00
|
|
|
, gobject-introspection
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
, directoryListingUpdater
|
2023-10-09 19:29:22 +00:00
|
|
|
, nixosTests
|
2024-02-29 20:09:43 +00:00
|
|
|
, testers
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-05-03 20:48:10 +00:00
|
|
|
pname = "phoc";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.38.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'.
|
2024-02-29 20:09:43 +00:00
|
|
|
url = with finalAttrs; "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-OcRUnw1Fck9bMSgfMMcWqqR6a6yzyKjY8P3nqcwVULc=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
gobject-introspection
|
2021-05-03 20:48:10 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
finalAttrs.wlroots
|
2023-10-09 19:29:22 +00:00
|
|
|
xorg.xcbutilwm
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = ["-Dembed-wlroots=disabled"];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
# Patch wlroots to remove a check which crashes Phosh.
|
|
|
|
# This patch can be found within the phoc source tree.
|
|
|
|
wlroots = wlroots.overrideAttrs (old: {
|
|
|
|
patches = (old.patches or []) ++ [
|
|
|
|
(stdenvNoCC.mkDerivation {
|
|
|
|
name = "0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
|
|
|
|
inherit (finalAttrs) src;
|
|
|
|
preferLocalBuild = true;
|
|
|
|
allowSubstitutes = false;
|
|
|
|
installPhase = "cp subprojects/packagefiles/wlroots/$name $out";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru = {
|
|
|
|
tests.phosh = nixosTests.phosh;
|
2024-02-29 20:09:43 +00:00
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
updateScript = directoryListingUpdater { };
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Wayland compositor for mobile phones like the Librem 5";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "phoc";
|
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;
|
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
})
|