2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchurl
|
|
|
|
, directoryListingUpdater
|
2021-05-03 20:48:10 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
2024-02-29 20:09:43 +00:00
|
|
|
, wrapGAppsHook4
|
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
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-05-03 20:48:10 +00:00
|
|
|
pname = "phosh";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.39.0";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
src = fetchurl {
|
|
|
|
# Release tarball which includes subprojects gvc and libcall-ui
|
|
|
|
url = with finalAttrs; "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-n1ZegSJAUr1Lbn0+Mx64vHhl4bwSJEdnO1xN/QdEKlw=";
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
wrapGAppsHook4
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
# https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1363
|
2022-09-11 15:47:08 +00:00
|
|
|
"-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
|
2024-02-29 20:09:43 +00:00
|
|
|
# Save some time building if tests are disabled
|
|
|
|
"-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
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
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2024-02-29 20:09:43 +00:00
|
|
|
providedSessions = [ "phosh" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
tests.phosh = nixosTests.phosh;
|
2024-02-29 20:09:43 +00:00
|
|
|
updateScript = directoryListingUpdater { };
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "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";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://gitlab.gnome.org/World/Phosh/phosh/-/blob/v${finalAttrs.version}/debian/changelog";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [ masipcat zhaofengli ];
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "phosh-session";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
})
|