diff options
Diffstat (limited to 'modules/freya/packages/wm.scm')
-rw-r--r-- | modules/freya/packages/wm.scm | 277 |
1 files changed, 277 insertions, 0 deletions
diff --git a/modules/freya/packages/wm.scm b/modules/freya/packages/wm.scm new file mode 100644 index 0000000..f333fcb --- /dev/null +++ b/modules/freya/packages/wm.scm @@ -0,0 +1,277 @@ +(define-module (freya packages wm) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages wm) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages cpp) + #:use-module (gnu packages gcc) + #:use-module (gnu packages build-tools) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gl) + #:use-module (gnu packages linux) + #:use-module (gnu packages pciutils) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) + #:use-module (guix build-system meson) + #:use-module (guix build utils) + #:use-module (rosenthal packages wm) + #:use-module (rosenthal packages freedesktop) + #:use-module (guix utils)) + + +(define-public swaylock-effects-new + (package + (inherit swaylock-effects) + (version "1.6.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jirutka/swaylock-effects") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0j7dxn66xqlf6iv2arqzz7mxlh7nf85anvpyf30d2frcidarda9h")))) + (inputs (modify-inputs (package-inputs swaylock-effects) (delete "linux-pam"))))) + + +(define hwdata-for-hyprland + (package + (inherit hwdata) + (arguments + (substitute-keyword-arguments (package-arguments hwdata) + ((#:phases _) #~%standard-phases))) + (outputs '("out")))) + + +(define libdrm-for-hyprland + (package + (inherit libdrm) + (name "libdrm") + (version "2.4.120") + (source (origin + (method url-fetch) + (uri (string-append + "https://dri.freedesktop.org/libdrm/libdrm-" + version ".tar.xz")) + (sha256 + (base32 + "0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v")))))) + + +(define wayland-protocols-new + (package + (inherit wayland-protocols) + (name "wayland-protocols") + (version "1.36") + (source (origin + (method url-fetch) + (uri (string-append + "https://gitlab.freedesktop.org/wayland/wayland-protocols" + "/-/releases/" version "/downloads/" + "wayland-protocols-" version ".tar.xz")) + (sha256 + (base32 + "14kyxywpfkgpjpkrybs28q1s2prnz30k1b4zap5a3ybrbvh4vzbi")))))) + + +(define hyprland-unbundle-wlroots-patch + (origin + (method url-fetch) + (uri (string-append "https://github.com/hyprwm/Hyprland" "/raw/" + "cba1ade848feac44b2eda677503900639581c3f4" + "/nix/patches/meson-build.patch")) + (sha256 + (base32 "0fwvsshz3k6061p3hdl175pydmj80vnw5rm4xfcn64w1ssfq7liw")))) + + +(define wayland-protocols-for-hyprland + (package + (inherit wayland-protocols) + (name "wayland-protocols") + (version "1.36") + (source (origin + (method url-fetch) + (uri (string-append + "https://gitlab.freedesktop.org/wayland/wayland-protocols" + "/-/releases/" version "/downloads/" + "wayland-protocols-" version ".tar.xz")) + (sha256 + (base32 + "14kyxywpfkgpjpkrybs28q1s2prnz30k1b4zap5a3ybrbvh4vzbi")))))) + + +(define wlroots-for-hyprland + (let ((base wlroots) + (revision "1") + (commit "5c1d51c5a2793480f5b6c4341ad0797052aec2ea")) + (package + (inherit base) + (name "wlroots") + (version (git-version "0.18.0-dev-hyprland" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hyprwm/wlroots-hyprland") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gy0g0kxb3q1wjqrypnvmrxcb4ld3advikchygpwpfp4s9v0mmvd")))) + (arguments + (substitute-keyword-arguments (package-arguments wlroots) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'adjust-patching-script + (lambda _ + (substitute* "patches/apply.sh" + (("apply \\|\\| check_applied \\|\\| fail") + "patch -Np1 < $PATCH")))))))) + (propagated-inputs + (modify-inputs (package-propagated-inputs wlroots) + (prepend libdrm-for-hyprland) + (replace "libinput-minimal" libinput-minimal-1.24.0) + (replace "wayland-protocols" wayland-protocols-for-hyprland))) + (native-inputs + (modify-inputs (package-native-inputs base) + (replace "hwdata" `(,hwdata-for-hyprland "out"))))))) + + +(define-public hyprland-new + (package + (inherit hyprland) + (version "0.40.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/hyprwm/Hyprland" + "/releases/download/v" version + "/source-v" version ".tar.gz")) + (patches (list hyprland-unbundle-wlroots-patch)) + (sha256 + (base32 + "0f4hs8qzmfmg4lr491b2inanb02xn4xa0gwb8a0ks3m64iwzx589")))) + (inputs + (modify-inputs + (package-inputs hyprland) + (append tomlplusplus))))) + + +(define-public hyprland-plugin-hy3 + (package + (name "hyprland-plugin-hy3") + (version "0.40.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/outfoxxed/hy3" + "/archive/refs/tags/hl" version ".tar.gz")) + (sha256 + (base32 + "13rnv24nc52fzvh7ryl7q91cr59z0qsv4vlnps5vr78g58lx11j0")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f + #:configure-flags '("DCMAKE_BUILD_TYPE=Release"))) + (native-inputs + (list meson pkg-config)) + (inputs + (list pixman + libdrm + pango + gcc-13 + libinput + hyprland-new + hyprland-protocols + hyprwayland-scanner + hyprlang + wayland + wlroots-for-hyprland)) + (license license:gpl3) + (home-page "https://github.com/outfoxxed/hy3") + (synopsis "i3 / sway like layout for hyprland.") + (description "Hyprland plugin for an i3 / sway like manual tiling layout"))) + + +(define-public hyprland-plugin-hyprbars + (let ((commit "fd133914bf1921db2a26627698f914478f6a9471") + (revision "1")) + (package + (name "hyprland-plugin-hyprbars") + (version (git-version "0.40.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hyprwm/hyprland-plugins.git") + (commit commit))) + (sha256 + (base32 + "0518ggbam7rllf9xfzhfn9fp364rbiycsrkag74jscy5br5cyl4g")) + (file-name (git-file-name name version)))) + (build-system meson-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "../source/hyprbars/")))))) + (native-inputs + (list pkg-config)) + (inputs + (list pango + gcc-13 + libinput + hyprland-new + hyprland-protocols + hyprwayland-scanner + hyprlang + wayland + wlroots-for-hyprland)) + (license license:bsd-3) + (home-page "https://github.com/hyprwm/hyprland-plugins") + (synopsis "adds simple title bars to windows") + (description "adds simple title bars to windows")))) + + +(define-public hyprlock + (let ((commit "d9a6229434fba475ea42b634ee2f03919236798d") + (revision "1")) + (package + (name "hyprlock") + (version (git-version "0.3.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hyprwm/hyprlock") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "19cg8vj4sgz5pxib9m08af1lilay9bckjhlr6h333s014l7y09sw")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f)) + (native-inputs + (list gcc-13 + pkg-config + mesa-headers + wayland)) + (inputs + (list cairo + pango + libxkbcommon + hyprlang + mesa + wayland-protocols + linux-pam)) + (propagated-inputs + (list libdrm + libglvnd)) + (home-page "https://github.com/hyprwm/hyprlock") + (license license:bsd-3) + (synopsis "Screen locker for Hyprland") + (description "Screen locker for hyprland.")))) + |