git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #125281 from zhaofengli/phosh-systemd

phosh: 0.10.2 -> 0.11.0

commit203e81e4ee5a522c43352df6be645c7929a0b6c2 authorLinus Heckemann <git@sphalerite.org> dateTue 22 Jun 2021, 08:23 (5 years ago) parent2473f4e544bf2c
2 files changed+9−27
nixos/modules/programs/phosh.nix+4 pkgs/applications/window-managers/phosh/default.nix+5−27
nixos/modules/programs/phosh.nix+4
@@ -143,10 +143,14 @@ in {
143143 oskItem
144144 ];
145145
146+ systemd.packages = [ pkgs.phosh ];
147+
146148 programs.feedbackd.enable = true;
147149
148150 security.pam.services.phosh = {};
149151
152+ hardware.opengl.enable = mkDefault true;
153+
150154 services.gnome.core-shell.enable = true;
151155 services.gnome.core-os-services.enable = true;
152156 services.xserver.displayManager.sessionPackages = [ pkgs.phosh ];
pkgs/applications/window-managers/phosh/default.nix+5−27
@@ -35,36 +35,16 @@ let
3535 rev = "ae1a34aafce7026b8c0f65a43c9192d756fe1057";
3636 sha256 = "0a4qh5pgyjki904qf7qmvqz2ksxb0p8xhgl2aixfbhixn0pw6saw";
3737 };
38−
39− executable = writeText "phosh" ''
40− PHOC_INI=@out@/share/phosh/phoc.ini
41− GNOME_SESSION_ARGS="--disable-acceleration-check --session=phosh --debug"
42−
43− if [ -f /etc/phosh/phoc.ini ]; then
44− PHOC_INI=/etc/phosh/phoc.ini
45− elif [ -f /etc/phosh/rootston.ini ]; then
46− # honor old configs
47− PHOC_INI=/etc/phosh/rootston.ini
48− fi
49−
50− # Run gnome-session through a login shell so it picks
51− # variables from /etc/profile.d (XDG_*)
52− [ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput
53− export WLR_BACKENDS
54− exec "${phoc}/bin/phoc" -C "$PHOC_INI" \
55− -E "bash -lc 'XDG_DATA_DIRS=$XDG_DATA_DIRS:\$XDG_DATA_DIRS ${gnome.gnome-session}/bin/gnome-session $GNOME_SESSION_ARGS'"
56− '';
57−
5838in stdenv.mkDerivation rec {
5939 pname = "phosh";
60− version = "0.10.2";
40+ version = "0.11.0";
6141
6242 src = fetchFromGitLab {
6343 domain = "source.puri.sm";
6444 owner = "Librem5";
6545 repo = pname;
6646 rev = "v${version}";
67− sha256 = "07i8wpzl7311dcf9s57s96qh1v672c75wv6cllrxx7fsmpf8fhx4";
47+ sha256 = "104qib4blh32s7bg6j3xza3s9syrxrvyh2wpyh5yx7v5wqarr20x";
6848 };
6949
7050 nativeBuildInputs = [
@@ -104,6 +84,8 @@ in stdenv.mkDerivation rec {
10484 # Temporarily disabled - Test is broken (SIGABRT)
10585 doCheck = false;
10686
87+ mesonFlags = [ "-Dsystemd=true" "-Dcompositor=${phoc}/bin/phoc" ];
88+
10789 postUnpack = ''
10890 rmdir $sourceRoot/subprojects/gvc
10991 ln -s ${gvc} $sourceRoot/subprojects/gvc
@@ -123,15 +105,11 @@ in stdenv.mkDerivation rec {
123105 runHook postCheck
124106 '';
125107
126− # Replace the launcher script with ours
127− postInstall = ''
128− substituteAll ${executable} $out/bin/phosh
129− '';
130−
131108 # Depends on GSettings schemas in gnome-shell
132109 preFixup = ''
133110 gappsWrapperArgs+=(
134111 --prefix XDG_DATA_DIRS : "${gnome.gnome-shell}/share/gsettings-schemas/${gnome.gnome-shell.name}"
112+ --set GNOME_SESSION "${gnome.gnome-session}/bin/gnome-session"
135113 )
136114 '';
137115