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.

132 lines
2.7 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, directoryListingUpdater
, meson
, ninja
, pkg-config
, python3
2024-02-06 03:10:14 +00:00
, wrapGAppsHook4
, libadwaita
, libhandy
, libxkbcommon
2021-08-11 22:54:15 +00:00
, libgudev
, callaudiod
, pulseaudio
2022-11-19 11:26:35 +00:00
, evince
, glib
, gtk4
, 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
}:
2024-02-06 03:10:14 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "phosh";
2024-04-05 08:22:28 +00:00
version = "0.37.1";
src = fetchurl {
# Release tarball which includes subprojects gvc and libcall-ui
2024-02-06 03:10:14 +00:00
url = with finalAttrs; "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz";
2024-04-05 08:22:28 +00:00
hash = "sha256-74H4GLFIIs97iVE8IWPxS9hALkBGkcKmrMe6/uxtPuM=";
};
nativeBuildInputs = [
libadwaita
meson
ninja
pkg-config
python3
2024-02-06 03:10:14 +00:00
wrapGAppsHook4
];
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
gtk4
pam
systemd
upower
wayland
feedbackd
];
nativeCheckInputs = [
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
2024-02-06 03:10:14 +00:00
# https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1363
2022-09-04 05:22:01 +00:00
"-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
2024-02-06 03:10:14 +00:00
# Save some time building if tests are disabled
"-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
2022-09-04 05:22:01 +00:00
];
2021-05-23 21:24:28 +00:00
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"
)
'';
passthru = {
providedSessions = [ "phosh" ];
2022-08-02 19:34:37 +00:00
tests.phosh = nixosTests.phosh;
updateScript = directoryListingUpdater { };
};
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";
2024-02-06 03:10:14 +00:00
changelog = "https://gitlab.gnome.org/World/Phosh/phosh/-/blob/v${finalAttrs.version}/debian/changelog";
license = licenses.gpl3Plus;
2023-03-03 13:47:15 +00:00
maintainers = with maintainers; [ masipcat tomfitzhenry zhaofengli ];
platforms = platforms.linux;
2023-11-27 01:17:53 +00:00
mainProgram = "phosh-session";
};
2024-02-06 03:10:14 +00:00
})