phog: bring in-tree and patch to allow launching via sway
it looses the bar functionality (oh well)
This commit is contained in:
parent
c056191de1
commit
e8e63167d2
|
@ -1313,43 +1313,8 @@ in {
|
|||
# fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable"
|
||||
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
|
||||
phoc = mvToNativeInputs [ final.wayland-scanner final.glib ] prev.phoc;
|
||||
phog = (addInputs
|
||||
{
|
||||
depsBuildBuild = [
|
||||
final.pkg-config # needed by build-aux/post_install.py
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
final.glib
|
||||
final.wayland-scanner
|
||||
final.wrapGAppsHook
|
||||
];
|
||||
# buildInputs = (upstream.buildInputs or []) ++ [
|
||||
# # see `data/phog.in`
|
||||
# # final.squeekboard
|
||||
# final.bash
|
||||
# ];
|
||||
}
|
||||
prev.phog
|
||||
).overrideAttrs (upstream: {
|
||||
DESTDIR = null;
|
||||
# squeekboard takes 20min to compile because of emulation, so disable it.
|
||||
# postPatch = (upstream.postPatch or "") + ''
|
||||
# substituteInPlace data/phog.in \
|
||||
# --replace " & squeekboard" ""
|
||||
# '';
|
||||
postPatch = (upstream.postPatch or "") + ''
|
||||
sed -i /phog_plugins_dir/d build-aux/post_install.py
|
||||
substituteInPlace src/greetd.c \
|
||||
--replace '/usr/share/wayland-sessions' '/run/current-system/sw/share/wayland-sessions/' \
|
||||
--replace '/usr/share/xsessions' '/run/current-system/sw/share/xsessions'
|
||||
'';
|
||||
preFixup = (upstream.preFixup or "") + ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH : ${lib.makeBinPath [ final.bash final.squeekboard ]}
|
||||
--prefix XDG_DATA_DIRS : "${final.gnome.gnome-shell}/share/gsettings-schemas/${final.gnome.gnome-shell.name}"
|
||||
)
|
||||
'';
|
||||
});
|
||||
# disable squeekboard because it takes 20 minutes to compile when emulated
|
||||
phog = prev.phog.override { squeekboard = null; };
|
||||
phosh = prev.phosh.overrideAttrs (upstream: {
|
||||
buildInputs = upstream.buildInputs ++ [
|
||||
final.libadwaita # "plugins/meson.build:41:2: ERROR: Dependency "libadwaita-1" not found, tried pkgconfig"
|
||||
|
|
102
pkgs/additional/phog/default.nix
Normal file
102
pkgs/additional/phog/default.nix
Normal file
|
@ -0,0 +1,102 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, gcr
|
||||
, glib
|
||||
, gnome-desktop
|
||||
, gtk3
|
||||
, libgudev
|
||||
, libjson
|
||||
, json-glib
|
||||
, libhandy
|
||||
, networkmanager
|
||||
, linux-pam
|
||||
, systemd
|
||||
, upower
|
||||
, wayland
|
||||
, libxkbcommon
|
||||
, python3
|
||||
, phoc
|
||||
, bash
|
||||
, gnome
|
||||
, squeekboard ? null
|
||||
, wayland-scanner
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "phog";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "mobian1";
|
||||
repo = "phog";
|
||||
rev = version;
|
||||
hash = "sha256-zny1FUYKwVXVSBGTh8AFVtMBS7dWZHTKO2gkPNPSL2M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./sway-compat.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs build-aux/post_install.py
|
||||
sed -i /phog_plugins_dir/d build-aux/post_install.py
|
||||
substituteInPlace src/greetd.c \
|
||||
--replace '/usr/share/wayland-sessions' '/run/current-system/sw/share/wayland-sessions/' \
|
||||
--replace '/usr/share/xsessions' '/run/current-system/sw/share/xsessions'
|
||||
'' + lib.optionalString (squeekboard == null) ''
|
||||
substituteInPlace data/phog.in \
|
||||
--replace " & squeekboard" ""
|
||||
'';
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH : ${lib.makeBinPath [ bash squeekboard ]}
|
||||
--prefix XDG_DATA_DIRS : "${gnome.gnome-shell}/share/gsettings-schemas/${gnome.gnome-shell.name}"
|
||||
)
|
||||
'';
|
||||
|
||||
|
||||
mesonFlags = [ "-Dcompositor=${phoc}/bin/phoc" ];
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gcr
|
||||
glib
|
||||
gnome-desktop
|
||||
gtk3
|
||||
libgudev
|
||||
libjson
|
||||
json-glib
|
||||
libhandy
|
||||
networkmanager
|
||||
linux-pam
|
||||
systemd
|
||||
upower
|
||||
wayland
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
glib
|
||||
wayland-scanner
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Greetd-compatible greeter for mobile phones";
|
||||
homepage = "https://gitlab.com/mobian1/phog/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ matthewcroughan ];
|
||||
};
|
||||
}
|
31
pkgs/additional/phog/sway-compat.patch
Normal file
31
pkgs/additional/phog/sway-compat.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
commit 86593b754405a194e749e424e27710aa08533853
|
||||
Author: Colin <colin@uninsane.org>
|
||||
Date: 2023-08-26 12:26:36 +0000
|
||||
|
||||
make phoc-specific wayland interface optional: zphoc_layer_shell_effects_v1
|
||||
|
||||
diff --git a/src/drag-surface.c b/src/drag-surface.c
|
||||
index 0e1a371f..56f7a307 100644
|
||||
--- a/src/drag-surface.c
|
||||
+++ b/src/drag-surface.c
|
||||
@@ -204,6 +204,7 @@ phog_drag_surface_configured (PhogLayerSurface *layer_surface)
|
||||
return;
|
||||
|
||||
/* Configure drag surface if not done yet */
|
||||
+ g_return_if_fail(priv->layer_shell_effects);
|
||||
priv->drag_surface = zphoc_layer_shell_effects_v1_get_draggable_layer_surface (priv->layer_shell_effects,
|
||||
wl_layer_surface);
|
||||
zphoc_draggable_layer_surface_v1_add_listener (priv->drag_surface, &drag_surface_listener, self);
|
||||
diff --git a/src/phog-wayland.c b/src/phog-wayland.c
|
||||
index 99933116..7c2d76ad 100644
|
||||
--- a/src/phog-wayland.c
|
||||
+++ b/src/phog-wayland.c
|
||||
@@ -274,7 +274,7 @@ phog_wayland_constructed (GObject *object)
|
||||
!self->input_inhibit_manager || !self->xdg_wm_base ||
|
||||
!self->zxdg_output_manager_v1 ||
|
||||
!self->zphoc_layer_shell_effects_v1) {
|
||||
- g_error ("Wayland compositor lacks needed globals\n"
|
||||
+ g_warning ("Wayland compositor lacks needed globals\n"
|
||||
"outputs: %d, layer_shell: %p, idle_manager: %p, "
|
||||
"inhibit: %p, xdg_wm: %p, "
|
||||
"xdg_output: %p, wlr_output_manager: %p, "
|
|
@ -49,6 +49,7 @@ let
|
|||
mcg = callPackage ./additional/mcg { };
|
||||
mpv-uosc-latest = callPackage ./additional/mpv-uosc-latest { };
|
||||
mx-sanebot = callPackage ./additional/mx-sanebot { };
|
||||
phog = callPackage ./additional/phog { };
|
||||
rtl8723cs-firmware = callPackage ./additional/rtl8723cs-firmware { };
|
||||
sane-scripts = lib.recurseIntoAttrs (callPackage ./additional/sane-scripts { });
|
||||
sane-weather = callPackage ./additional/sane-weather { };
|
||||
|
|
Loading…
Reference in New Issue
Block a user