nixpkgs/pkgs/applications/misc/phoc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
2.0 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, stdenvNoCC
2024-07-25 18:40:21 +03:00
, fetchFromGitLab
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook3
, libinput
2024-04-30 15:18:26 +03:00
, gobject-introspection
, gnome
2022-03-17 00:16:40 +03:00
, gnome-desktop
, glib
, gtk3
, json-glib
, wayland
, libdrm
, libxkbcommon
, wlroots
2023-09-29 18:20:50 +03:00
, xorg
, directoryListingUpdater
, nixosTests
2024-02-01 11:05:39 +03:00
, testers
2024-07-25 18:40:21 +03:00
, gmobile
}:
stdenv.mkDerivation (finalAttrs: {
pname = "phoc";
2024-07-25 18:40:21 +03:00
version = "0.41.0";
2024-07-25 18:40:21 +03:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
group = "World";
owner = "Phosh";
repo = "phoc";
rev = "v${finalAttrs.version}";
hash = "sha256-T2gKvP3WyrGNOiCwiX93UjMuSTnnZ+nykEAFhq0BF4U=";
};
nativeBuildInputs = [
2024-04-30 15:18:26 +03:00
gobject-introspection
meson
ninja
pkg-config
python3
wrapGAppsHook3
];
buildInputs = [
libdrm.dev
libxkbcommon
libinput
glib
gtk3
2022-03-17 00:16:40 +03:00
gnome-desktop
# For keybindings settings schemas
gnome.mutter
json-glib
wayland
finalAttrs.wlroots
2023-09-29 18:20:50 +03:00
xorg.xcbutilwm
2024-07-25 18:40:21 +03:00
gmobile
];
mesonFlags = ["-Dembed-wlroots=disabled"];
# 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";
})
];
});
passthru = {
tests.phosh = nixosTests.phosh;
2024-02-01 11:05:39 +03:00
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
updateScript = directoryListingUpdater { };
};
meta = with lib; {
description = "Wayland compositor for mobile phones like the Librem 5";
mainProgram = "phoc";
homepage = "https://gitlab.gnome.org/World/Phosh/phoc";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ masipcat zhaofengli ];
platforms = platforms.linux;
};
})