mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2024-11-07 04:56:09 -05:00
added initial, but broken, code
This commit is contained in:
parent
7dfd35ba5b
commit
c12f78564d
1 changed files with 78 additions and 2 deletions
|
@ -18,7 +18,9 @@
|
|||
#:use-module (gnu packages cmake)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages man)
|
||||
#:use-module (rosenthal packages wm)
|
||||
#:use-module (gnu packages wm))
|
||||
|
@ -39,7 +41,7 @@
|
|||
(native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
|
||||
(append wlroots)))))
|
||||
|
||||
(define-public xdg-desktop-portal-hyprland
|
||||
(define xdg-desktop-portal-hyprland-old-original
|
||||
(package
|
||||
(name "xdg-desktop-portal-hyprland")
|
||||
(version "0.5.0")
|
||||
|
@ -132,4 +134,78 @@
|
|||
(description "mirror displays")
|
||||
(license license:expat)))
|
||||
|
||||
wl-mirror
|
||||
(define-public xdg-desktop-portal-hyprland
|
||||
(package
|
||||
(name "xdg-desktop-portal-hyprland")
|
||||
(version "1.1.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"05gcdg3fw7plc9fri6rpq9la1xjij93jqkqmq57mrqjgwg3jlmrb"))))
|
||||
(build-system meson-build-system)
|
||||
(arguments
|
||||
(list #:imported-modules
|
||||
(append %meson-build-system-modules
|
||||
%qt-build-system-modules)
|
||||
#:modules
|
||||
'((guix build utils)
|
||||
(guix build meson-build-system)
|
||||
((guix build qt-build-system) #:prefix qt:))
|
||||
#:tests? #f ;No tests
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-path
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(substitute* (find-files "." "\\.cp?*$")
|
||||
(("/bin/sh") "sh")
|
||||
(("\\<(sh|grim|slurp)\\>" _ cmd)
|
||||
(search-input-file inputs (string-append "/bin/" cmd)))
|
||||
(("\"(hyprland-share-picker)\"" _ cmd)
|
||||
(string-append "\"" #$output "/bin/" cmd "\"")))))
|
||||
;; After building the portal, we need to build the share selector
|
||||
;; using qt
|
||||
(add-after 'install 'chdir
|
||||
(lambda _
|
||||
(chdir "../source/hyprland-share-picker/")))
|
||||
(add-after 'chdir 'qt-build
|
||||
(lambda* (#:key (make-flags '()) (parallel-build? #t)
|
||||
#:allow-other-keys)
|
||||
((assoc-ref qt:%standard-phases 'build)
|
||||
#:make-flags make-flags
|
||||
#:parallel-build? parallel-build?)))
|
||||
(add-after 'qt-build 'install-hyprland-share-picker
|
||||
(lambda _
|
||||
(install-file "build/hyprland-share-picker"
|
||||
(string-append #$output "/bin"))))
|
||||
(add-after 'install-hyprland-share-picker 'qt-wrap
|
||||
(assoc-ref qt:%standard-phases 'qt-wrap)))))
|
||||
(native-inputs (list cmake-minimal pkg-config))
|
||||
(inputs
|
||||
(list bash-minimal
|
||||
basu
|
||||
grim
|
||||
hyprland-protocols
|
||||
libinih
|
||||
mesa
|
||||
pipewire
|
||||
sdbus-c++
|
||||
qtbase-5
|
||||
slurp
|
||||
`(,util-linux "lib")
|
||||
wayland
|
||||
wayland-protocols))
|
||||
(home-page "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
|
||||
(synopsis "XDG Desktop Portal backend for Hyprland")
|
||||
(description
|
||||
"This package provides @code{xdg-desktop-portal-hyprland}, which extends
|
||||
@code{xdg-desktop-portal-wlr} for Hyprland with support for
|
||||
@code{xdg-desktop-portal} screenshot and casting interfaces, while adding a few
|
||||
extra portals specific to Hyprland, mostly for window sharing.")
|
||||
(license license:expat)))
|
||||
|
||||
xdg-desktop-portal-hyprland
|
||||
|
|
Loading…
Reference in a new issue