phosh: 0.10.2 -> 0.11.0

Fixes #123735.
This commit is contained in:
Zhaofeng Li 2021-05-23 21:24:28 +00:00
parent d7d0a67765
commit 104e512cab
2 changed files with 7 additions and 27 deletions

View File

@ -143,6 +143,8 @@ in {
oskItem
];
systemd.packages = [ pkgs.phosh ];
programs.feedbackd.enable = true;
security.pam.services.phosh = {};

View File

@ -35,36 +35,16 @@ let
rev = "ae1a34aafce7026b8c0f65a43c9192d756fe1057";
sha256 = "0a4qh5pgyjki904qf7qmvqz2ksxb0p8xhgl2aixfbhixn0pw6saw";
};
executable = writeText "phosh" ''
PHOC_INI=@out@/share/phosh/phoc.ini
GNOME_SESSION_ARGS="--disable-acceleration-check --session=phosh --debug"
if [ -f /etc/phosh/phoc.ini ]; then
PHOC_INI=/etc/phosh/phoc.ini
elif [ -f /etc/phosh/rootston.ini ]; then
# honor old configs
PHOC_INI=/etc/phosh/rootston.ini
fi
# Run gnome-session through a login shell so it picks
# variables from /etc/profile.d (XDG_*)
[ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput
export WLR_BACKENDS
exec "${phoc}/bin/phoc" -C "$PHOC_INI" \
-E "bash -lc 'XDG_DATA_DIRS=$XDG_DATA_DIRS:\$XDG_DATA_DIRS ${gnome.gnome-session}/bin/gnome-session $GNOME_SESSION_ARGS'"
'';
in stdenv.mkDerivation rec {
pname = "phosh";
version = "0.10.2";
version = "0.11.0";
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = pname;
rev = "v${version}";
sha256 = "07i8wpzl7311dcf9s57s96qh1v672c75wv6cllrxx7fsmpf8fhx4";
sha256 = "104qib4blh32s7bg6j3xza3s9syrxrvyh2wpyh5yx7v5wqarr20x";
};
nativeBuildInputs = [
@ -104,6 +84,8 @@ in stdenv.mkDerivation rec {
# Temporarily disabled - Test is broken (SIGABRT)
doCheck = false;
mesonFlags = [ "-Dsystemd=true" "-Dcompositor=${phoc}/bin/phoc" ];
postUnpack = ''
rmdir $sourceRoot/subprojects/gvc
ln -s ${gvc} $sourceRoot/subprojects/gvc
@ -123,15 +105,11 @@ in stdenv.mkDerivation rec {
runHook postCheck
'';
# Replace the launcher script with ours
postInstall = ''
substituteAll ${executable} $out/bin/phosh
'';
# Depends on GSettings schemas in gnome-shell
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${gnome.gnome-shell}/share/gsettings-schemas/${gnome.gnome-shell.name}"
--set GNOME_SESSION "${gnome.gnome-session}/bin/gnome-session"
)
'';