modules/ryan-packages/freedesktop.scm
9672616f431c8c4161238fe7ad1e2b4cf3040320
· 8.1 KB · 195 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 cmake) |
| 7 | #:use-module (guix build-system qt) |
| 8 | #:use-module (guix build utils) |
| 9 | #:use-module (guix packages) |
| 10 | #:use-module (guix git-download) |
| 11 | #:use-module (guix utils) |
| 12 | #:use-module (gnu packages) |
| 13 | #:use-module (gnu packages gl) |
| 14 | #:use-module (gnu packages linux) |
| 15 | #:use-module (gnu packages image) |
| 16 | #:use-module (gnu packages qt) |
| 17 | #:use-module (gnu packages bash) |
| 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.3.1") |
| 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 | "0fdbzxanmmzrvb9wfzg1pdsnlg7dl6v5k8bl44w10n48s7bbbzn0")))) |
| 57 | (build-system qt-build-system) |
| 58 | (arguments |
| 59 | (list |
| 60 | #:tests? #f |
| 61 | #:configure-flags #~(list "-Dsystemd=disabled") |
| 62 | #:phases |
| 63 | ;; After building the portal, we need to build the share selector using qt |
| 64 | #~(modify-phases %standard-phases |
| 65 | (add-after `unpack `fix-path |
| 66 | (lambda* (#:key inputs #:allow-other-keys) |
| 67 | (substitute* (find-files "." "\\.cp?*$") |
| 68 | (("/bin/sh") "sh") |
| 69 | (("\\<(sh|grim|hyprctl|slurp)\\>" _ cmd) |
| 70 | (search-input-file inputs (string-append "/bin/" cmd))) |
| 71 | (("\\<(hyprctl-share-picker)\\>" _ cmd) |
| 72 | (string-append #$output "/bin/" cmd)))))))) |
| 73 | (native-inputs (list gcc-13 pkg-config wayland hyprlang)) |
| 74 | (inputs (list bash-minimal grim hyprland hyprland-protocols mesa pipewire qtbase-5 sdbus-c++ slurp wayland-protocols qtwayland-5)) |
| 75 | (home-page "") |
| 76 | (synopsis "test") |
| 77 | (description "test") |
| 78 | (license license:bsd-3))) |
| 79 | |
| 80 | (define-public xdg-desktop-portal-hyprland-old |
| 81 | (package |
| 82 | (name "xdg-desktop-portal-hyprland") |
| 83 | (version "1.2.4") |
| 84 | (source (origin |
| 85 | (method git-fetch) |
| 86 | (uri (git-reference |
| 87 | (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland") |
| 88 | (commit (string-append "v" version)))) |
| 89 | (file-name (git-file-name name version)) |
| 90 | (sha256 |
| 91 | (base32 |
| 92 | "1m82rrir2fg7h2cpch6wm3h1rkpnbh9pawlw1wdknw75mi6139r0")))) |
| 93 | (build-system meson-build-system) |
| 94 | (arguments |
| 95 | (list |
| 96 | #:modules |
| 97 | '((guix build utils) |
| 98 | (guix build meson-build-system) |
| 99 | ((guix build qt-build-system) #:prefix qt:)) |
| 100 | #:imported-modules |
| 101 | (append %meson-build-system-modules |
| 102 | %qt-build-system-modules) |
| 103 | #:tests? #f |
| 104 | #:configure-flags #~(list "-Dsystemd=disabled") |
| 105 | #:phases |
| 106 | ;; After building the portal, we need to build the share selector using qt |
| 107 | #~(modify-phases %standard-phases |
| 108 | (add-after 'install 'chdir |
| 109 | (lambda _ (chdir "../source/hyprland-share-picker/"))) |
| 110 | (add-after 'chdir 'check-setup |
| 111 | (assoc-ref qt:%standard-phases 'check-setup)) |
| 112 | (add-after 'check-setup 'qt-build |
| 113 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 114 | ((assoc-ref qt:%standard-phases 'build) |
| 115 | #:inputs inputs |
| 116 | #:outputs outputs |
| 117 | #:configure-flags '() |
| 118 | #:qtbase #$(this-package-native-input "qtbase-5")))) |
| 119 | (add-after 'qt-build 'qt-install |
| 120 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 121 | (let ((share-picker (string-append (assoc-ref outputs "out") |
| 122 | "/bin"))) |
| 123 | (install-file "build/hyprland-share-picker" share-picker) |
| 124 | #t))) |
| 125 | (add-after 'qt-install 'qt-wrap |
| 126 | (assoc-ref qt:%standard-phases 'qt-wrap)) |
| 127 | (add-after 'qt-wrap 'dep-wrap |
| 128 | (lambda* (#:key inputs #:allow-other-keys) |
| 129 | (let ((hyprland-share-picker (string-append #$output "/bin/hyprland-share-picker"))) |
| 130 | (wrap-program hyprland-share-picker |
| 131 | `("PATH" suffix |
| 132 | ,(map (lambda (program) |
| 133 | (dirname (search-input-file |
| 134 | inputs (string-append "/bin/" program)))) |
| 135 | '("slurp")))))))))) |
| 136 | (native-inputs (list gcc-13 cmake pkg-config qtbase-5)) |
| 137 | (inputs (list elogind hyprland hyprland-protocols slurp pipewire wayland-protocols wayland libinih mesa sdbus-c++ qtwayland-5 `(,util-linux "lib"))) |
| 138 | (home-page "") |
| 139 | (synopsis "test") |
| 140 | (description "test") |
| 141 | (license license:bsd-3))) |
| 142 | |
| 143 | (define-public hyprlang |
| 144 | (package |
| 145 | (name "hyprlang") |
| 146 | (version "0.3.2") |
| 147 | (source (origin |
| 148 | (method git-fetch) |
| 149 | (uri (git-reference |
| 150 | (url "https://github.com/hyprwm/hyprlang") |
| 151 | (commit (string-append "v" version)))) |
| 152 | (file-name (git-file-name name version)) |
| 153 | (sha256 |
| 154 | (base32 |
| 155 | "1sxr7whzjamjg9pcvpbxniwph5p3yy2qs87n91zqwb5y9z3gfd7m")))) |
| 156 | (build-system cmake-build-system) |
| 157 | (native-inputs |
| 158 | (list gcc-13)) |
| 159 | (home-page "") |
| 160 | (synopsis "test") |
| 161 | (description "test") |
| 162 | (license license:gpl3))) |
| 163 | |
| 164 | |
| 165 | (define-public wl-mirror |
| 166 | (package |
| 167 | (name "wl-mirror") |
| 168 | (version "0.16.1") |
| 169 | (source (origin |
| 170 | (method git-fetch) |
| 171 | (uri (git-reference |
| 172 | (url "https://github.com/Ferdi265/wl-mirror") |
| 173 | (commit (string-append "v" version)) |
| 174 | (recursive? #t))) |
| 175 | (file-name (git-file-name name version)) |
| 176 | (sha256 |
| 177 | (base32 |
| 178 | "06i4jrip4q9j1gp81j0jr79cwfj9zdcfcr1n0jpyqlxsysppidlc")))) |
| 179 | (inputs (list wayland egl-wayland mesa)) |
| 180 | (native-inputs (list pkg-config scdoc wayland-protocols)) |
| 181 | (build-system cmake-build-system) |
| 182 | (arguments (list |
| 183 | #:tests? #f |
| 184 | #:phases |
| 185 | #~(modify-phases %standard-phases |
| 186 | (add-before 'configure 'touch |
| 187 | (lambda _ |
| 188 | (invoke "touch" "proto/wayland-protocols/.git") |
| 189 | (invoke "touch" "proto/wlr-protocols/.git")))))) |
| 190 | (home-page "bleh") |
| 191 | (synopsis "mirror displays") |
| 192 | (description "mirror displays") |
| 193 | (license license:expat))) |
| 194 | |
| 195 | xdg-desktop-portal-hyprland-ryan |