modules/ryan-packages/freedesktop.scm
83778242afc70b4d1f441f72b811c9d31d12db28
· 5.9 KB · 137 lines
raw
| 1 | (define-module (ryan-packages freedesktop) |
| 2 | #:use-module (guix download) |
| 3 | #:use-module ((guix licenses) #:prefix license:) |
| 4 | #:use-module (guix gexp) |
| 5 | #:use-module (guix build-system meson) |
| 6 | #:use-module (guix build-system qt) |
| 7 | #:use-module (guix build-system cmake) |
| 8 | #:use-module (guix build utils) |
| 9 | #:use-module (guix build glib-or-gtk-build-system) |
| 10 | #:use-module (guix packages) |
| 11 | #:use-module (guix git-download) |
| 12 | #:use-module (guix utils) |
| 13 | #:use-module (gnu packages) |
| 14 | #:use-module (gnu packages gl) |
| 15 | #:use-module (gnu packages linux) |
| 16 | #:use-module (gnu packages image) |
| 17 | #:use-module (gnu packages qt) |
| 18 | #:use-module (gnu packages cmake) |
| 19 | #:use-module (gnu packages gcc) |
| 20 | #:use-module (gnu packages pkg-config) |
| 21 | #:use-module (gnu packages freedesktop) |
| 22 | #:use-module (gnu packages xorg) |
| 23 | #:use-module (gnu packages glib) |
| 24 | #:use-module (gnu packages man) |
| 25 | #:use-module (rosenthal packages wm) |
| 26 | #:use-module (gnu packages wm)) |
| 27 | |
| 28 | (define-public xdg-desktop-portal-wlr-new |
| 29 | (package |
| 30 | (inherit xdg-desktop-portal-wlr) |
| 31 | (version "0.7.0") |
| 32 | (source (origin |
| 33 | (method git-fetch) |
| 34 | (uri (git-reference |
| 35 | (url "https://github.com/emersion/xdg-desktop-portal-wlr") |
| 36 | (commit (string-append "v" version)))) |
| 37 | (sha256 |
| 38 | (base32 |
| 39 | "1b3hpp3ybjgnnmnwsyb5bsnvz9q5nr3zz0j1alh02g24f68lf00k")) |
| 40 | (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch")))) |
| 41 | (native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr) |
| 42 | (append wlroots))))) |
| 43 | |
| 44 | (define-public xdg-desktop-portal-hyprland-ryan |
| 45 | (package |
| 46 | (name "xdg-desktop-portal-hyprland") |
| 47 | (version "1.2.4") |
| 48 | (source (origin |
| 49 | (method git-fetch) |
| 50 | (uri (git-reference |
| 51 | (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland") |
| 52 | (commit (string-append "v" version)))) |
| 53 | (file-name (git-file-name name version)) |
| 54 | (sha256 |
| 55 | (base32 |
| 56 | "1m82rrir2fg7h2cpch6wm3h1rkpnbh9pawlw1wdknw75mi6139r0")))) |
| 57 | (build-system meson-build-system) |
| 58 | (arguments |
| 59 | (list |
| 60 | #:modules |
| 61 | '((guix build utils) |
| 62 | (guix build meson-build-system) |
| 63 | ((guix build qt-build-system) #:prefix qt:)) |
| 64 | #:imported-modules |
| 65 | (append %meson-build-system-modules |
| 66 | %qt-build-system-modules) |
| 67 | #:tests? #f |
| 68 | #:configure-flags #~(list "-Dsystemd=disabled") |
| 69 | #:phases |
| 70 | ;; After building the portal, we need to build the share selector using qt |
| 71 | #~(modify-phases %standard-phases |
| 72 | (add-after 'install 'chdir |
| 73 | (lambda _ (chdir "../source/hyprland-share-picker/"))) |
| 74 | (add-after 'chdir 'check-setup |
| 75 | (assoc-ref qt:%standard-phases 'check-setup)) |
| 76 | (add-after 'check-setup 'qt-build |
| 77 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 78 | ((assoc-ref qt:%standard-phases 'build) |
| 79 | #:inputs inputs |
| 80 | #:outputs outputs |
| 81 | #:configure-flags '() |
| 82 | #:qtbase #$(this-package-native-input "qtbase-5")))) |
| 83 | (add-after 'qt-build 'qt-install |
| 84 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 85 | (let ((share-picker (string-append (assoc-ref outputs "out") |
| 86 | "/bin"))) |
| 87 | (install-file "build/hyprland-share-picker" share-picker) |
| 88 | #t))) |
| 89 | (add-after 'qt-install 'qt-wrap |
| 90 | (assoc-ref qt:%standard-phases 'qt-wrap)) |
| 91 | (add-after 'qt-wrap 'dep-wrap |
| 92 | (lambda* (#:key inputs #:allow-other-keys) |
| 93 | (let ((hyprland-share-picker (string-append #$output "/bin/hyprland-share-picker"))) |
| 94 | (wrap-program hyprland-share-picker |
| 95 | `("PATH" suffix |
| 96 | ,(map (lambda (program) |
| 97 | (dirname (search-input-file |
| 98 | inputs (string-append "/bin/" program)))) |
| 99 | '("slurp")))))))))) |
| 100 | (native-inputs (list gcc-13 cmake pkg-config qtbase-5)) |
| 101 | (inputs (list elogind hyprland hyprland-protocols slurp pipewire wayland-protocols wayland libinih mesa sdbus-c++ qtwayland-5 `(,util-linux "lib"))) |
| 102 | (home-page "") |
| 103 | (synopsis "test") |
| 104 | (description "test") |
| 105 | (license license:bsd-3))) |
| 106 | |
| 107 | (define-public wl-mirror |
| 108 | (package |
| 109 | (name "wl-mirror") |
| 110 | (version "0.13.2") |
| 111 | (source (origin |
| 112 | (method git-fetch) |
| 113 | (uri (git-reference |
| 114 | (url "https://github.com/Ferdi265/wl-mirror") |
| 115 | (commit (string-append "v" version)) |
| 116 | (recursive? #t))) |
| 117 | (file-name (git-file-name name version)) |
| 118 | (sha256 |
| 119 | (base32 |
| 120 | "0vkd73x5r2585s3w1ckvslc2mq9qbzrm5xkwg8gpy9ydaxhn8hmp")))) |
| 121 | (inputs (list wayland egl-wayland mesa)) |
| 122 | (native-inputs (list pkg-config scdoc wayland-protocols)) |
| 123 | (build-system cmake-build-system) |
| 124 | (arguments (list |
| 125 | #:tests? #f |
| 126 | #:phases |
| 127 | #~(modify-phases %standard-phases |
| 128 | (add-before 'configure 'touch |
| 129 | (lambda _ |
| 130 | (invoke "touch" "proto/wayland-protocols/.git") |
| 131 | (invoke "touch" "proto/wlr-protocols/.git")))))) |
| 132 | (home-page "bleh") |
| 133 | (synopsis "mirror displays") |
| 134 | (description "mirror displays") |
| 135 | (license license:expat))) |
| 136 | |
| 137 | xdg-desktop-portal-hyprland-ryan |