2021-04-30 00:59:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, libhandy
|
|
|
|
, libxkbcommon
|
2021-08-11 22:54:15 +00:00
|
|
|
, libgudev
|
|
|
|
, callaudiod
|
2021-04-30 00:59:16 +00:00
|
|
|
, pulseaudio
|
|
|
|
, glib
|
|
|
|
, gtk3
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2022-03-16 21:16:40 +00:00
|
|
|
, gnome-desktop
|
2021-04-30 00:59:16 +00:00
|
|
|
, gcr
|
|
|
|
, pam
|
|
|
|
, systemd
|
|
|
|
, upower
|
|
|
|
, wayland
|
|
|
|
, dbus
|
2021-05-08 13:45:03 +00:00
|
|
|
, xvfb-run
|
2021-04-30 00:59:16 +00:00
|
|
|
, phoc
|
|
|
|
, feedbackd
|
|
|
|
, networkmanager
|
|
|
|
, polkit
|
|
|
|
, libsecret
|
|
|
|
}:
|
|
|
|
|
2021-08-11 22:54:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-04-30 00:59:16 +00:00
|
|
|
pname = "phosh";
|
2022-04-05 16:56:57 +00:00
|
|
|
version = "0.17.0";
|
2021-04-30 00:59:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-08-11 22:54:15 +00:00
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
group = "World";
|
|
|
|
owner = "Phosh";
|
2021-04-30 00:59:16 +00:00
|
|
|
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-04-05 16:56:57 +00:00
|
|
|
sha256 = "sha256-o/0NJZo1EPpXguN/tkUc+/9XaVTQWaLGe+2pU0B91Cg=";
|
2021-04-30 00:59:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
phoc
|
|
|
|
libhandy
|
|
|
|
libsecret
|
|
|
|
libxkbcommon
|
2021-08-11 22:54:15 +00:00
|
|
|
libgudev
|
|
|
|
callaudiod
|
2021-04-30 00:59:16 +00:00
|
|
|
pulseaudio
|
|
|
|
glib
|
|
|
|
gcr
|
|
|
|
networkmanager
|
|
|
|
polkit
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.gnome-control-center
|
2022-03-16 21:16:40 +00:00
|
|
|
gnome-desktop
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.gnome-session
|
2021-04-30 00:59:16 +00:00
|
|
|
gtk3
|
|
|
|
pam
|
|
|
|
systemd
|
|
|
|
upower
|
|
|
|
wayland
|
|
|
|
feedbackd
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dbus
|
2021-05-08 13:45:03 +00:00
|
|
|
xvfb-run
|
2021-04-30 00:59:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Temporarily disabled - Test is broken (SIGABRT)
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-05-23 21:24:28 +00:00
|
|
|
mesonFlags = [ "-Dsystemd=true" "-Dcompositor=${phoc}/bin/phoc" ];
|
|
|
|
|
2021-04-30 00:59:16 +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 \
|
|
|
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
|
|
|
meson test --print-errorlogs
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Depends on GSettings schemas in gnome-shell
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2021-05-07 21:18:14 +00:00
|
|
|
--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"
|
2021-04-30 00:59:16 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
mkdir -p $out/share/wayland-sessions
|
|
|
|
ln -s $out/share/applications/sm.puri.Phosh.desktop $out/share/wayland-sessions/
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
providedSessions = [
|
|
|
|
"sm.puri.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";
|
2021-04-30 00:59:16 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-08-12 06:12:36 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar masipcat zhaofengli ];
|
2021-04-30 00:59:16 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|