2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
2023-02-02 18:25:31 +00:00
|
|
|
, gitUpdater
|
2021-05-03 20:48:10 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
2023-02-02 18:25:31 +00:00
|
|
|
, libadwaita
|
2021-05-03 20:48:10 +00:00
|
|
|
, libhandy
|
|
|
|
, libxkbcommon
|
2021-09-18 10:52:07 +00:00
|
|
|
, libgudev
|
|
|
|
, callaudiod
|
2021-05-03 20:48:10 +00:00
|
|
|
, pulseaudio
|
2022-11-27 09:42:12 +00:00
|
|
|
, evince
|
2021-05-03 20:48:10 +00:00
|
|
|
, glib
|
2023-02-02 18:25:31 +00:00
|
|
|
, gtk4
|
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
|
|
|
, gcr
|
|
|
|
, pam
|
|
|
|
, systemd
|
|
|
|
, upower
|
|
|
|
, wayland
|
|
|
|
, dbus
|
2021-05-20 23:08:51 +00:00
|
|
|
, xvfb-run
|
2021-05-03 20:48:10 +00:00
|
|
|
, phoc
|
|
|
|
, feedbackd
|
|
|
|
, networkmanager
|
|
|
|
, polkit
|
|
|
|
, libsecret
|
2022-09-11 15:47:08 +00:00
|
|
|
, evolution-data-server
|
2022-11-21 17:40:18 +00:00
|
|
|
, nixosTests
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-05-03 20:48:10 +00:00
|
|
|
pname = "phosh";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.32.0";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-09-18 10:52:07 +00:00
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
group = "World";
|
|
|
|
owner = "Phosh";
|
2021-05-03 20:48:10 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
fetchSubmodules = true; # including gvc and libcall-ui which are designated as subprojects
|
2023-10-19 13:55:26 +00:00
|
|
|
sha256 = "sha256-4LsB/7zKRkoxNQQVxwrSSIqGP7KQ0WHBnSVY+ClWTxo=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
libadwaita
|
2021-05-03 20:48:10 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-11-27 09:42:12 +00:00
|
|
|
evince
|
2021-05-03 20:48:10 +00:00
|
|
|
phoc
|
|
|
|
libhandy
|
|
|
|
libsecret
|
|
|
|
libxkbcommon
|
2021-09-18 10:52:07 +00:00
|
|
|
libgudev
|
|
|
|
callaudiod
|
2022-09-11 15:47:08 +00:00
|
|
|
evolution-data-server
|
2021-05-03 20:48:10 +00:00
|
|
|
pulseaudio
|
|
|
|
glib
|
|
|
|
gcr
|
|
|
|
networkmanager
|
|
|
|
polkit
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.gnome-control-center
|
2022-03-30 09:31:56 +00:00
|
|
|
gnome-desktop
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.gnome-session
|
2023-02-02 18:25:31 +00:00
|
|
|
gtk4
|
2021-05-03 20:48:10 +00:00
|
|
|
pam
|
|
|
|
systemd
|
|
|
|
upower
|
|
|
|
wayland
|
|
|
|
feedbackd
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-03 20:48:10 +00:00
|
|
|
dbus
|
2021-05-20 23:08:51 +00:00
|
|
|
xvfb-run
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Temporarily disabled - Test is broken (SIGABRT)
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-09-11 15:47:08 +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"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
export NO_AT_BRIDGE=1
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
2022-12-02 08:20:57 +00:00
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2021-05-03 20:48:10 +00:00
|
|
|
meson test --print-errorlogs
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Depends on GSettings schemas in gnome-shell
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2021-05-20 23:08:51 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "${gnome.gnome-shell}/share/gsettings-schemas/${gnome.gnome-shell.name}"
|
2021-06-28 23:13:55 +00:00
|
|
|
--set GNOME_SESSION "${gnome.gnome-session}/bin/gnome-session"
|
2021-05-03 20:48:10 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
mkdir -p $out/share/wayland-sessions
|
|
|
|
ln -s $out/share/applications/sm.puri.Phosh.desktop $out/share/wayland-sessions/
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
providedSessions = [
|
2022-08-12 12:06:08 +00:00
|
|
|
"sm.puri.Phosh"
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
tests.phosh = nixosTests.phosh;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A pure Wayland shell prototype for GNOME on mobile devices";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/World/Phosh/phosh";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://gitlab.gnome.org/World/Phosh/phosh/-/blob/v${version}/debian/changelog";
|
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;
|
|
|
|
};
|
|
|
|
}
|