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