nixpkgs/pkgs/applications/window-managers/phosh/default.nix

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

140 lines
2.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook
, libhandy
, libxkbcommon
2021-08-11 22:54:15 +00:00
, libgudev
, callaudiod
, pulseaudio
2022-11-19 11:26:35 +00:00
, evince
, glib
, gtk3
, gnome
2022-03-16 21:16:40 +00:00
, gnome-desktop
, gcr
, pam
, systemd
, upower
, wayland
, dbus
2021-05-08 13:45:03 +00:00
, xvfb-run
, phoc
, feedbackd
, networkmanager
, polkit
, libsecret
2022-09-04 05:22:01 +00:00
, evolution-data-server
2022-08-02 19:34:37 +00:00
, nixosTests
}:
2021-08-11 22:54:15 +00:00
stdenv.mkDerivation rec {
pname = "phosh";
2022-11-19 11:26:35 +00:00
version = "0.22.0";
src = fetchFromGitLab {
2021-08-11 22:54:15 +00:00
domain = "gitlab.gnome.org";
group = "World";
owner = "Phosh";
repo = pname;
rev = "v${version}";
2021-08-11 22:54:15 +00:00
fetchSubmodules = true; # including gvc and libcall-ui which are designated as subprojects
2022-11-19 11:26:35 +00:00
sha256 = "sha256-q2AYm+zbL4/pRG1wn+MT6IYM8CZt15o48U9+piMPf74=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
python3
wrapGAppsHook
];
buildInputs = [
2022-11-19 11:26:35 +00:00
evince
phoc
libhandy
libsecret
libxkbcommon
2021-08-11 22:54:15 +00:00
libgudev
callaudiod
2022-09-04 05:22:01 +00:00
evolution-data-server
pulseaudio
glib
gcr
networkmanager
polkit
gnome.gnome-control-center
2022-03-16 21:16:40 +00:00
gnome-desktop
gnome.gnome-session
gtk3
pam
systemd
upower
wayland
feedbackd
];
checkInputs = [
dbus
2021-05-08 13:45:03 +00:00
xvfb-run
];
# Temporarily disabled - Test is broken (SIGABRT)
doCheck = false;
2022-09-04 05:22:01 +00:00
mesonFlags = [
"-Dsystemd=true"
"-Dcompositor=${phoc}/bin/phoc"
# https://github.com/NixOS/nixpkgs/issues/36468
"-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
];
2021-05-23 21:24:28 +00:00
postPatch = ''
chmod +x build-aux/post_install.py
patchShebangs build-aux/post_install.py
'';
checkPhase = ''
runHook preCheck
export NO_AT_BRIDGE=1
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
2022-11-21 02:03:50 +00:00
--config-file=${dbus}/share/dbus-1/session.conf \
meson test --print-errorlogs
runHook postCheck
'';
# Depends on GSettings schemas in gnome-shell
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${gnome.gnome-shell}/share/gsettings-schemas/${gnome.gnome-shell.name}"
2021-05-23 21:24:28 +00:00
--set GNOME_SESSION "${gnome.gnome-session}/bin/gnome-session"
)
'';
postFixup = ''
mkdir -p $out/share/wayland-sessions
ln -s $out/share/applications/sm.puri.Phosh.desktop $out/share/wayland-sessions/
'';
passthru = {
providedSessions = [
2022-08-02 13:05:26 +00:00
"sm.puri.Phosh"
];
2022-08-02 19:34:37 +00:00
tests.phosh = nixosTests.phosh;
};
meta = with lib; {
description = "A pure Wayland shell prototype for GNOME on mobile devices";
2021-08-11 22:54:15 +00:00
homepage = "https://gitlab.gnome.org/World/Phosh/phosh";
license = licenses.gpl3Plus;
2022-10-26 18:56:05 +00:00
maintainers = with maintainers; [ masipcat zhaofengli ];
platforms = platforms.linux;
};
}