moby: add experimental support for phog greeter
This commit is contained in:
parent
c96b951895
commit
fbf62f0531
|
@ -65,11 +65,13 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
sane.gui.sxmo.greeter = mkOption {
|
sane.gui.sxmo.greeter = mkOption {
|
||||||
type = types.enum [ "lightdm-mobile" "sway" ];
|
type = types.enum [ "lightdm-mobile" "phog" "sway" ];
|
||||||
default = "lightdm-mobile";
|
default = "lightdm-mobile";
|
||||||
|
# default = "phog";
|
||||||
description = ''
|
description = ''
|
||||||
which greeter to use.
|
which greeter to use.
|
||||||
"lightdm-mobile" => keypad style greeter. can only enter digits 0-9 as password.
|
"lightdm-mobile" => keypad style greeter. can only enter digits 0-9 as password.
|
||||||
|
"phog" => phosh-based greeter. keypad (0-9) with option to open an on-screen keyboard.
|
||||||
"sway" => layered sway greeter. behaves as if you booted to swaylock.
|
"sway" => layered sway greeter. behaves as if you booted to swaylock.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -343,6 +345,13 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(lib.mkIf (cfg.greeter == "phog") {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings.default_session.command = "${pkgs.phog}/bin/phog";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
# old, greeterless options:
|
# old, greeterless options:
|
||||||
# services.xserver.windowManager.session = [{
|
# services.xserver.windowManager.session = [{
|
||||||
# name = "sxmo";
|
# name = "sxmo";
|
||||||
|
|
|
@ -25,6 +25,12 @@ in [
|
||||||
hash = "sha256-CjVAFRcnTjA9DpOdwFwifgriQ9QFFGzchMB0tIVlAQM=";
|
hash = "sha256-CjVAFRcnTjA9DpOdwFwifgriQ9QFFGzchMB0tIVlAQM=";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(fetchpatch' {
|
||||||
|
title = "phog: init at 0.1.3";
|
||||||
|
prUrl = "https://github.com/NixOS/nixpkgs/pull/251249";
|
||||||
|
hash = "sha256-e38Z7sO7xDQHzE9UOfbptc6vJuONE5eP9JFp2Nzx53E=";
|
||||||
|
})
|
||||||
|
|
||||||
# (fetchpatch' {
|
# (fetchpatch' {
|
||||||
# # TODO: check back in on this around 2023-10-01
|
# # TODO: check back in on this around 2023-10-01
|
||||||
# title = "libkiwix: 12.0.0 -> 12.1.0";
|
# title = "libkiwix: 12.0.0 -> 12.1.0";
|
||||||
|
|
|
@ -402,14 +402,6 @@ in {
|
||||||
# '';
|
# '';
|
||||||
# });
|
# });
|
||||||
|
|
||||||
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
|
|
||||||
colord = prev.colord.overrideAttrs (upstream: {
|
|
||||||
# fixes: (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH.
|
|
||||||
nativeBuildInputs = upstream.nativeBuildInputs ++ lib.optionals (!prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform) [
|
|
||||||
final.mesonEmulatorHook
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
# conky = ((useEmulatedStdenv prev.conky).override {
|
# conky = ((useEmulatedStdenv prev.conky).override {
|
||||||
# # docbook2x dependency doesn't cross compile
|
# # docbook2x dependency doesn't cross compile
|
||||||
# docsSupport = prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform;
|
# docsSupport = prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform;
|
||||||
|
@ -1324,6 +1316,37 @@ in {
|
||||||
# fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable"
|
# fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable"
|
||||||
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
|
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
|
||||||
phoc = mvToNativeInputs [ final.wayland-scanner final.glib ] prev.phoc;
|
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.makeBinaryWrapper # not makeWrapper only because nix complains
|
||||||
|
];
|
||||||
|
# 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
|
||||||
|
'';
|
||||||
|
postInstall = (upstream.postInstall or "") + ''
|
||||||
|
wrapProgram $out/bin/phog --prefix PATH : ${lib.makeBinPath [ final.bash final.squeekboard ]}
|
||||||
|
'';
|
||||||
|
});
|
||||||
phosh = prev.phosh.overrideAttrs (upstream: {
|
phosh = prev.phosh.overrideAttrs (upstream: {
|
||||||
buildInputs = upstream.buildInputs ++ [
|
buildInputs = upstream.buildInputs ++ [
|
||||||
final.libadwaita # "plugins/meson.build:41:2: ERROR: Dependency "libadwaita-1" not found, tried pkgconfig"
|
final.libadwaita # "plugins/meson.build:41:2: ERROR: Dependency "libadwaita-1" not found, tried pkgconfig"
|
||||||
|
@ -1703,47 +1726,49 @@ in {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
# squeekboard = prev.squeekboard.overrideAttrs (upstream: {
|
squeekboard = prev.squeekboard.overrideAttrs (upstream: {
|
||||||
# # fixes: "meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file"
|
# fixes: "meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file"
|
||||||
# # new error: "meson.build:1:0: ERROR: Rust compiler rustc --target aarch64-unknown-linux-gnu -C linker=aarch64-unknown-linux-gnu-gcc can not compile programs."
|
# new error: "meson.build:1:0: ERROR: Rust compiler rustc --target aarch64-unknown-linux-gnu -C linker=aarch64-unknown-linux-gnu-gcc can not compile programs."
|
||||||
# # NB(2023/03/04): upstream nixpkgs has a new squeekboard that's closer to cross-compiling; use that
|
# NB(2023/03/04): upstream nixpkgs has a new squeekboard that's closer to cross-compiling; use that
|
||||||
# mesonFlags =
|
# NB(2023/08/24): this emulates the entire rust build process
|
||||||
# let
|
mesonFlags =
|
||||||
# # ERROR: 'rust' compiler binary not defined in cross or native file
|
let
|
||||||
# crossFile = final.writeText "cross-file.conf" ''
|
# ERROR: 'rust' compiler binary not defined in cross or native file
|
||||||
# [binaries]
|
crossFile = final.writeText "cross-file.conf" ''
|
||||||
# rust = [ 'rustc', '--target', '${final.rust.toRustTargetSpec final.stdenv.hostPlatform}' ]
|
[binaries]
|
||||||
# '';
|
rust = [ 'rustc', '--target', '${final.rust.toRustTargetSpec final.stdenv.hostPlatform}' ]
|
||||||
# in
|
'';
|
||||||
# # upstream.mesonFlags or [] ++
|
in
|
||||||
# [
|
# upstream.mesonFlags or [] ++
|
||||||
# "-Dtests=false"
|
[
|
||||||
# "-Dnewer=false"
|
"-Dtests=false"
|
||||||
# "-Donline=false"
|
"-Dnewer=true"
|
||||||
# ]
|
"-Donline=false"
|
||||||
# ++ lib.optional
|
]
|
||||||
# (final.stdenv.hostPlatform != final.stdenv.buildPlatform)
|
++ lib.optional
|
||||||
# "--cross-file=${crossFile}"
|
(final.stdenv.hostPlatform != final.stdenv.buildPlatform)
|
||||||
# ;
|
"--cross-file=${crossFile}"
|
||||||
|
;
|
||||||
|
|
||||||
# cargoDeps = null;
|
# cargoDeps = null;
|
||||||
# cargoVendorDir = "vendor";
|
# cargoVendorDir = "vendor";
|
||||||
|
|
||||||
# depsBuildBuild = upstream.depsBuildBuild or [] ++ [
|
depsBuildBuild = upstream.depsBuildBuild or [] ++ [
|
||||||
# final.pkg-config
|
final.pkg-config
|
||||||
# ];
|
];
|
||||||
# nativeBuildInputs = with final; [
|
# this looks to be identical to upstream: probably not needed?
|
||||||
# meson
|
nativeBuildInputs = with final; [
|
||||||
# ninja
|
meson
|
||||||
# pkg-config
|
ninja
|
||||||
# glib
|
pkg-config
|
||||||
# wayland
|
glib
|
||||||
# wrapGAppsHook
|
wayland
|
||||||
# rustPlatform.cargoSetupHook
|
wrapGAppsHook
|
||||||
# cargo
|
rustPlatform.cargoSetupHook
|
||||||
# rustc
|
cargo
|
||||||
# ];
|
rustc
|
||||||
# });
|
];
|
||||||
|
});
|
||||||
|
|
||||||
# squeekboard = prev.squeekboard.override {
|
# squeekboard = prev.squeekboard.override {
|
||||||
# inherit (emulated)
|
# inherit (emulated)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user