summary refs log tree commit diff
path: root/pkgs/applications/misc/phoc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/phoc/default.nix')
-rw-r--r--pkgs/applications/misc/phoc/default.nix45
1 files changed, 13 insertions, 32 deletions
diff --git a/pkgs/applications/misc/phoc/default.nix b/pkgs/applications/misc/phoc/default.nix
index babd3578d25..db53bf937a5 100644
--- a/pkgs/applications/misc/phoc/default.nix
+++ b/pkgs/applications/misc/phoc/default.nix
@@ -1,6 +1,6 @@
 { lib
 , stdenv
-, fetchFromGitLab
+, fetchurl
 , fetchpatch
 , meson
 , ninja
@@ -16,6 +16,8 @@
 , libdrm
 , libxkbcommon
 , wlroots
+, xorg
+, nixosTests
 }:
 
 let
@@ -25,43 +27,19 @@ let
       # https://source.puri.sm/Librem5/phosh/-/issues/422
       (fetchpatch {
         name = "0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
-        url = "https://source.puri.sm/Librem5/wlroots/-/commit/4f66b0931aaaee65367102e9c4ccb736097412c7.patch";
-        hash = "sha256-2Vy5a4lWh8FP2PN6xRIZv6IlUuLZibT0MYW+EyvVULs=";
+        url = "https://gitlab.gnome.org/World/Phosh/phoc/-/raw/acb17171267ae0934f122af294d628ad68b09f88/subprojects/packagefiles/wlroots/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch";
+        hash = "sha256-uNJaYwkZImkzNUEqyLCggbXAoIRX5h2eJaGbSHj1B+o=";
       })
-
-      # xdg-activation: Deduplicate token creation code
-      (fetchpatch {
-        name = "xdg-activation-deduplicate-token-creation-code.patch";
-        url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/dd03d839ab56c3e5d7c607a8d76e58e0b75edb85.patch";
-        sha256 = "sha256-mxt68MISC24xpaBtVSc1F2W4cyNs5wQowtbUQH9Eqr8=";
-      })
-
-      # seat: Allow to cancel touches
-      (fetchpatch {
-        name = "seat-Allow-to-cancel-touches.patch";
-        url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/17b2b06633729f1826715c1d0b84614aa3cedb3a.patch";
-        sha256 = "sha256-BAeXa3ZB5TXnlq0ZP2+rZlVXEPWpLP4Wi4TLwoXjkz4=";
-      })
-
-      # From
-      # https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/13fcdba75cf5f21cfd49c1a05f4fa62f77619b40
-      # which has been merged upstream, but doesn't cleanly apply on to the
-      # latest released version.
-      ./0001-handle-outputs-that-arent-in-the-layout.patch
     ];
   });
 in stdenv.mkDerivation rec {
   pname = "phoc";
-  version = "0.27.0";
+  version = "0.31.0";
 
-  src = fetchFromGitLab {
-    domain = "gitlab.gnome.org";
-    group = "World";
-    owner = "Phosh";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-4/Fxo72KXLy3gxXMS+PrTUbZl0EFt2GPMXg8+/fE7MY=";
-    fetchSubmodules = true;
+  src = fetchurl {
+    # This tarball includes the meson wrapped subproject 'gmobile'.
+    url = "https://storage.puri.sm/releases/phoc/phoc-${version}.tar.xz";
+    hash = "sha256-P7Bs9JMv6KNKo4d2ID0/Ba4+Nel6DMn8o4I7EDvY4vY=";
   };
 
   nativeBuildInputs = [
@@ -83,6 +61,7 @@ in stdenv.mkDerivation rec {
     gnome.mutter
     wayland
     phocWlroots
+    xorg.xcbutilwm
   ];
 
   mesonFlags = ["-Dembed-wlroots=disabled"];
@@ -92,6 +71,8 @@ in stdenv.mkDerivation rec {
     patchShebangs build-aux/post_install.py
   '';
 
+  passthru.tests.phosh = nixosTests.phosh;
+
   meta = with lib; {
     description = "Wayland compositor for mobile phones like the Librem 5";
     homepage = "https://gitlab.gnome.org/World/Phosh/phoc";