Merge pull request #125281 from zhaofengli/phosh-systemd

phosh: 0.10.2 -> 0.11.0
This commit is contained in:
Linus Heckemann 2021-06-22 08:23:29 +02:00 committed by GitHub
commit 203e81e4ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 27 deletions

View File

@ -143,10 +143,14 @@ in {
oskItem
];
systemd.packages = [ pkgs.phosh ];
programs.feedbackd.enable = true;
security.pam.services.phosh = {};
hardware.opengl.enable = mkDefault true;
services.gnome.core-shell.enable = true;
services.gnome.core-os-services.enable = true;
services.xserver.displayManager.sessionPackages = [ pkgs.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"
)
'';