[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#44400] [PATCH 1/2] WIP: gnu: Add phoc.
From: |
Jonathan Brielmaier |
Subject: |
[bug#44400] [PATCH 1/2] WIP: gnu: Add phoc. |
Date: |
Mon, 2 Nov 2020 23:28:26 +0100 |
* gnu/packages/gnome.scm (phoc): New variable.
---
gnu/packages/gnome.scm | 73 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index cd7bc0ceba..af5ea09e55 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -12034,3 +12034,76 @@ for the GNOME 3.x platform with many features. It
aims to be a very complete
editing environment for translation issues within the GNU gettext/GNOME desktop
world.")
(license license:gpl3+)))
+
+(define-public phoc
+ (package
+ (name "phoc")
+ (version "0.4.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://source.puri.sm/Librem5/phoc.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08nqlmbklyjiirqdv56cs94rjs0bjwzjcccmbgzmjdbxxpklqy9k"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ; source of wlroots required in subprojects/wlroots folder
+ (add-after 'unpack 'get-wlroots
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "wlroots-librem5-source")
+ "subprojects/wlroots")
+ #t))
+ (add-after 'get-wlroots 'patch-paths
+ (lambda _
+ (substitute* "src/server.c"
+ (("/bin/sh") (which "sh")))
+ (substitute* "tests/test-run.c"
+ (("/bin/true") (which "true"))
+ (("/bin/false") (which "false")))
+ #t))
+ ;; Those check a running phoc server against some screenshots in the
repo.
+ ;; They differ only by the mouse cursor (shadow vs. no shadow).
+ (add-before 'patch-paths 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/meson.build"
+ (("'layer-shell',") "")
+ (("'xdg-shell',") "")
+ (("'phosh'") ""))
+ #t))
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Tests require a running X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ #t)))))
+ (native-inputs
+ `(("gobject-introspection" ,gobject-introspection)
+ ("glib:bin" ,glib "bin")
+ ("gnome-desktop" ,gnome-desktop)
+ ("libinput" ,libinput)
+ ("libxkbcommon" ,libxkbcommon)
+ ("pkg-config" ,pkg-config)
+ ("wayland" ,wayland)
+ ("wayland-protocols" ,wayland-protocols)
+ ("wlroots-librem5-source" ; patched version for Librem 5
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://source.puri.sm/Librem5/wlroots.git")
+ (commit "7723a09a226d812aa51d1439c2b5e8e21238d45c")))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0k7662x40ssc0zvvz1qpwcwl98ndfpv2363hg9lsff5y0p4gk653"))))
+ ("xorg-server" ,xorg-server-for-tests)))
+ (propagated-inputs
+ `(("mutter" ,mutter)))
+ (synopsis "wlroots based phone compositor")
+ (description "Phoc is a...")
+ (home-page "https://source.puri.sm/Librem5/phoc")
+ (license license:gpl3))) ; TODO or gpl3+?
--
2.29.2